|
seems to be helpful
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
modified on Monday, February 18, 2008 5:12 AM
|
|
|
|
|
SQL server runs as Windows services. Make sure that the services run manually rather than automatically. To prevent users from starting the SQL server services, deny them Windows Administrative rights; that way, they can start or stop services.
NB. From your question, it would seem that SQL server is installed on a user machine ; my solution only makes sense in that context.
|
|
|
|
|
Hi all,
Iam doing nested data grid operations iam facing a problem in that please help me on this
I have a gridview controls in asp.net page which is fetching data from data base then
RowDataBound of that data grid iam creating gridview dynamically i.e
means if there is 3 records in main gridview its creating 3 child gridview which has few data
i want to access the data of the child grid views but i can access only the last child grid views
data not all the child grid view data.i have attached my code here plase have a look on it.
protected void GridView_RowDataBound1(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow || e.Row.RowType == DataControlRowType.EmptyDataRow)
{
id++;
Int64 catId =Convert.ToInt64(e.Row.Cells[1].Text.ToString());
ds = new DataSet();
ds = objExitInterviewBLL.getQuestions(0, 'S', "", catId);
int count = 0;
if (ds.Tables[0].Rows.Count > 0)
{
NewDg = new GridView();
//NewDg= new GridView();
NewDg.ID = "NewDg" + id ;
txtHidden.Text = txtHidden.Text + "," + NewDg.ID;
NewDg.Attributes.Add("runat", "server");
NewDg.AutoGenerateColumns = false;
BoundField bc1 = new BoundField();
bc1.DataField = "Sno";
bc1.HeaderText = "Sno";
BoundField bc2 = new BoundField();
bc2.DataField = "Question";
bc2.HeaderText = "Question";
BoundField bc3 = new BoundField();
bc3.DataField = "Responsetp";
bc3.Visible = false;
TemplateField tc1 = new TemplateField();
tc1.ItemTemplate = new DataGridTemplate(ListItemType.Item, "Column1");
tc1.HeaderText = "Answers";
NewDg.Columns.Add(bc1);
NewDg.Columns.Add(bc2);
NewDg.Columns.Add(bc3);
NewDg.Columns.Add(tc1);
NewDg.DataSource = ds.Tables[0];
NewDg.DataBind();
while (ds.Tables[0].Rows.Count > count)
{
string question = ds.Tables[0].Rows[count]["Responsetp"].ToString();
if (string.Equals(question, "1"))
{
TextBox tx = (TextBox)(NewDg.Rows[count].Cells[3].FindControl("txt"));
tx.Visible = false;
DropDownList ddlList = (DropDownList)(NewDg.Rows[count].Cells[3].FindControl("ddl"));
ddlList.Visible = false;
TextBox txMultiline = (TextBox)(NewDg.Rows[count].Cells[3].FindControl("txtMultiline"));
txMultiline.Visible = false;
ListBox lst = (ListBox)(NewDg.Rows[count].Cells[3].FindControl("lst"));
Int64 tb032_id = Convert.ToInt64(NewDg.Rows[count].Cells[0].Text.ToString());
DataSet ds1 = objExitInterviewBLL.getListAnswers(0, 'S', "", tb032_id, 0);
if (ds1.Tables[0].Rows.Count > 0)
{
lst.DataSource = ds1;
lst.DataTextField = "Data_Text";
lst.DataBind();
}
else
{
lst.Visible = false;
}
}
else if (string.Equals(question, "0"))
{
DropDownList ddlList = (DropDownList)(NewDg.Rows[count].Cells[3].FindControl("ddl"));
ddlList.Visible = false;
TextBox tx = (TextBox)(NewDg.Rows[count].Cells[3].FindControl("txt"));
tx.Visible = true;
ListBox lst = (ListBox)(NewDg.Rows[count].Cells[3].FindControl("lst"));
lst.Visible = false;
TextBox txMultiline = (TextBox)(NewDg.Rows[count].Cells[3].FindControl("txtMultiline"));
txMultiline.Visible = false;
}
else if (string.Equals(question, "2"))
{
TextBox txMultiline = (TextBox)(NewDg.Rows[count].Cells[3].FindControl("txtMultiline"));
txMultiline.Visible = true;
TextBox tx = (TextBox)(NewDg.Rows[count].Cells[3].FindControl("txt"));
tx.Visible = false;
DropDownList ddlList = (DropDownList)(NewDg.Rows[count].Cells[3].FindControl("ddl"));
ddlList.Visible = false;
ListBox lst = (ListBox)(NewDg.Rows[count].Cells[3].FindControl("lst"));
lst.Visible = false;
}
count++;
}
NewDg.Height = Unit.Percentage(100.00);
SetProps(NewDg);
System.IO.StringWriter sw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
NewDg.RenderControl(htw);
string DivStart = "<DIV id='uniquename" + e.Row.RowIndex.ToString() + "' style='DISPLAY: none; HEIGHT: 100%;'>";
string DivBody = sw.ToString();
string DivEnd = "</DIV>";
string FullDIV = DivStart + DivBody + DivEnd;
int LastCellPosition = e.Row.Cells.Count - 1;
int NewCellPosition = e.Row.Cells.Count - 2;
e.Row.Cells[0].ID = "CellInfo" + e.Row.RowIndex.ToString();
if (ViewState["Mode"] != null && ViewState["Mode"].ToString() == "ShowDetails")
{
if (this.txtExpandedFields.Text.IndexOf(e.Row.Cells[0].ClientID) != -1)
{
//make it expand.
FullDIV = FullDIV.Replace("DISPLAY: none", "DISPLAY: block");
e.Row.Cells[0].Text = "<A>-</A>";
}
}
//match color
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[LastCellPosition].Text = e.Row.Cells[LastCellPosition].Text + "</td><tr><td bgcolor='f5f5f5'></td><td colspan='" + NewCellPosition + "'>" + FullDIV;
}
else
{
e.Row.Cells[LastCellPosition].Text = e.Row.Cells[LastCellPosition].Text + "</td><tr><td bgcolor='d3d3d3'></td><td colspan='" + NewCellPosition + "'>" + FullDIV;
}
e.Row.Cells[0].Attributes["onclick"] = "HideShowPanel('uniquename" + e.Row.RowIndex.ToString() + "'); ChangeHLText('" + e.Row.Cells[0].ClientID + "'); SetExpanded('" + e.Row.Cells[0].ClientID + "','" + txtExpandedFields.ClientID + "');";
e.Row.Cells[0].Attributes["onmouseover"] = "this.style.cursor='hand'";
e.Row.Cells[0].Attributes["onmouseout"] = "this.style.cursor='hand'";
}
}
}
catch (Exception ex)
{
}
finally
{
ds = null;
}
}
public class DataGridTemplate : ITemplate
{
ListItemType templateType;
string columnName;
public DataGridTemplate(ListItemType type, string colname)
{
templateType = type;
columnName = colname;
}
int id = 0;
public void InstantiateIn(System.Web.UI.Control container)
{
Literal lc = new Literal();
switch (templateType)
{
case ListItemType.Item:
DropDownList ddl = new DropDownList();
ddl.ID = "ddl";
ddl.Width = 100;
container.Controls.Add(ddl);
TextBox txt1 = new TextBox();
txt1.Width = 150;
txt1.ID = "txt";
container.Controls.Add(txt1);
ListBox lst1 = new ListBox();
lst1.Width = 100;
lst1.Height = 110;
lst1.ID = "lst";
container.Controls.Add(lst1);
TextBox txtMultiline = new TextBox();
txtMultiline.ID = "txtMultiline";
txtMultiline.Width = 200;
txtMultiline.Height = 60;
txtMultiline.Attributes.Add("textmode", "multiline");
container.Controls.Add(txtMultiline);
break;
}
}
}
protected void btnSave_Click(object sender, EventArgs e)
{
BindData();
string childGdIdList = txtHidden.Text.ToString();
string[] childGdId = childGdIdList.Split(new Char[] { ',' });
for (int i = 0; i < childGdId.Length; i++)
{
if (childGdId[i].ToString() != "")
{
string id = childGdId[i].ToString();
NewDg.ID = "NewDg" + i;
//NewDg.ID = "NewDg" + i;
for (int j = 0; j < NewDg.Rows.Count; j++)
{
string u = NewDg.Rows[j].Cells[0].Text.ToString();
}
}
}
}
private void DataGrid1_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{
//clean up expanded records.
txtExpandedFields.Text = "";
//DataGrid1.CurrentPageIndex = e.NewPageIndex;
BindData();
}
public void BindData()
{
try
{
ds = new DataSet();
ds = objExitInterviewBLL.getCategory(0, 'A', "");
if (ds.Tables[0].Rows.Count > 0)
{
DataGrid1.DataSource = ds;
DataGrid1.DataBind();
}
}
catch (Exception ex)
{
}
finally
{
ds = null;
}
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
BindData();
}
}
i want to join this group
|
|
|
|
|
Hi all,
Thanks in advance ,
I m developing a software for MLM company any i have to calculate member in the left and member in right every month so, please help me to find the total number of member of a specific member let it be "1001".
help as a alias.
Be happy and make others happy.Cheer up...........
|
|
|
|
|
Hello,
I wish to develop a on screen keyboard just like the one which comes with Windows XP so that I can transfer data to any application which is selected for example notepad, webpage, word, excel etc. Any help with code samples is highly appreciated.
Cheers!
|
|
|
|
|
I guess you want to create a program which shows a keyboard, remembers the window handle you want to send keys to, and sends keyboard events to that window.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I have already developed an application in VB6 which works exactly like the Windows XP built-in "On Screen Keyboard". The problem is I have developed this with using "SendKey" function and the keys pressed passes through the main system messaging loop. I want to transfer the data to other application through "Inter-process Communication" either DDE, pipes or any other IPC method making sure that its process to process not through system messaging queue.
Any help is especially code sample is appreciated....
Cheers!
|
|
|
|
|
An on-screen keyboard can be a seriously user-hostile interface.
When I see an on-screen keyboard I assume I can press the buttons on the screen.
Unless the system has a touch-screen I see no point in having an on-screen keyboard.
Don't ever require the user to use the mouse to enter alphanumeric characters; we have keyboards for that.
<Anecdote>
The check-in system at one (or was it two?) of the daycare centers where I used to take my son was such a beast.
It had an on-screen keyboard with the letters alphabetized (rather than QWERTY) and someone (the staff I assume) would hide the physical keyboard behind the computer and pretty much require using the mouse to enter an eight-character code to check kids in and out.
I always pulled the physical keyboard out and typed in my code; it was so much quicker and easier with much less damage to the carpal tunnel.
</Anecdote>
|
|
|
|
|
You are quite right there but my application requires this. An application to communicate with the other application (both on the same system) i.e Virtual Keyboard sending character by character data to any text editor or webpage but it has to be app-2-app communication rather than communication through system messaging queue.
Any help is highly appreciated.
Cheers!
|
|
|
|
|
But why does it need to be on-screen? Why won't the real keyboard work?
|
|
|
|
|
The question here is not "WHY", its "HOW" and the simple answer to your question is I am writing a research paper to prove a concept, your efforts regarding code will be acknowledged...
Cheers!
|
|
|
|
|
I am filling an Excel spreadsheet using C# and Interop.Excel. When I Excel.Quit();, then manually close and exit Excel the process 'Excel.exe' is left running. (in the windows tack manager). If I do multiple runs, each run leaves behind an Excel.exe process.
thanks Murray D.
|
|
|
|
|
|
Hi
I have application in Netbeans. Can i convert that to C# using JLCA or not ?
Do i have to convert the application to J# first. And would that be easy task ?
And does JLCA does a good job and would i be able to add code in C# to that application after conversion ?
Thank You
James
|
|
|
|
|
Converting from Java to C# shouldn't be that hard. You'll have to do it by hand AFAIK...
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I've use JLCA to some effect, however you still end up having to fix a lot of code by hand.
|
|
|
|
|
Using the code below. Set up a button that would take the value of textbox 2 so that I can pass it to another part of this application? How would you suggest setting up two other queries that would join with the first query to fill in other textboxes?
EX:
Textbox 1 = query1 (main query) textbox 2 = query1 (main query) textbox 3 =query2 (sub query) textbox 4 = query3 (sub query 2)
Sub query -> select column a from table2, table1 where id.table1 = id.table2
And then
Sub query 2 -> select column c from table 2, table 1 where id.table1 = id.table2 and column a – column b
Thank you in advance
public Form1()<br />
<br />
{<br />
<br />
InitializeComponent();<br />
<br />
}<br />
<br />
string tb1 = "*";<br />
<br />
string tb2 = "*";<br />
<br />
private void textBox1_TextChanged(object sender, EventArgs e)<br />
<br />
{<br />
<br />
if (textBox1.Text.Length > 0)<br />
<br />
{<br />
<br />
tb1 = textBox1.Text;<br />
<br />
}<br />
<br />
else <br />
<br />
{ <br />
<br />
tb1 = "*";<br />
<br />
}<br />
<br />
performQuery();<br />
<br />
}<br />
<br />
private void textBox2_TextChanged(object sender, EventArgs e)<br />
<br />
{<br />
<br />
if (textBox2.Text.Length > 0)<br />
<br />
{<br />
<br />
tb2 = textBox2.Text;<br />
<br />
}<br />
<br />
else<br />
<br />
{<br />
<br />
tb2 = "*";<br />
<br />
}<br />
<br />
performQuery();<br />
<br />
}<br />
<br />
public void performQuery()<br />
<br />
{<br />
<br />
string yourQuery = "SELECT * FROM Table1 WHERE Column1 = " + tb1 + " AND Column2 = " + tb2;<br />
<br />
<br />
}
|
|
|
|
|
cmandy,
This sounds a bit homework related...
Regards,
Gareth.
|
|
|
|
|
Gareth,
I graduted 3 years ago. I am new to the c# .net world.
|
|
|
|
|
At the core, if this is not homework, then the answer is, 'don't do this'. Your code is wide open for SQL injection attacks. Give your variables real names, use stored procs, and use delegates to get different classes in your app communicating with each other.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How can make a programs that understand visual object like Simulator programs.
|
|
|
|
|
That is a pretty big topic. Good luck
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
That's a pretty open ended question. Did you have a specific type of simulator in mind?
/ravi
|
|
|
|
|
Hi all,
In my application when some works are finished the program should automatically send an email to some persons (their emails are known before). The point is, different user can do this operation on different PCs, so I want to get the standard email account on the PC where my application is started from.
Using the class "MailMessage" like:
MailMessage message = new MailMessage(
"myhardcodedemail@myprovider.com",
"email.address@mycollegue.com",
"The Subject.",
"Some useless text to build the body….");
works perfect, but I don’t want to write the “from” email hard coded, I want to get it programmatically (All users are using MS Office Outlook 2007 – if this is important).
Another Question is: is it possible to send at once the email to many people (how should the “to” field looks like ?), or I must send it to each one (repeating the step for each user – this works).
For any idea thanks in advance.
Best Regards,
Emil
|
|
|
|
|
Emanuil ACHIM wrote: I want to get it programmatically
You might want to consider querying a remote service (or data store) to get the information (such as the user's email address) specific to the user.
Emanuil ACHIM wrote: is it possible to send at once the email to many people
Yes. See the CC property.
/ravi
|
|
|
|