|
Ok, I have implemented the same procedure told by Eddy. But I was searching for the another possible ways for doing it...
Thank you for replying Eddy and Marco....
|
|
|
|
|
Pratik_P wrote: Ok, I have implemented the same procedure told by Eddy. But I was searching for the another possible ways for doing it...
No need to worry, sometimes the easy way is better hand the hard way.
Pratik_P wrote: Thank you for replying Eddy and Marco....
You are welcome, glad that we were able to help you.
People becoming wiser in order to notice the stupid things they did back in the young days. This doesn't mean that they really stop doing those things. Wise people still do stupid things, only on purpose.
|
|
|
|
|
I need to save and restore printer settings that are kept in the devmode structure. I found an article here that helped get me that far.
I am concerned at what might happen if the printer's driver is updated. I saw it mentioned here or elsewhere that attempting to load the devmode might do terrible things if we attempted to save the devmode then load it under a different operating system. Presumably changing the driver version might have similar effect.
I was hoping to programatically verify that the operating system and print driver had not changed in order to prevent disasters. Thing is, I haven't seen even a hint of how to identify the printer driver version.
|
|
|
|
|
Hi,
I am building an entire survey dynamically. I just have a panel defined on the page, and adding controls dynamically to this panel to render my page. The survey question and answers are all stored in the database. So, i have built controls for textbox areas, checkboxlist.
I am kind of stumped on the radiobuttonlist control. It is not working on the ID part. I have defined a radiobuttonlist, and adding this list. If I define the ID outside the for loop, on submitting the code fails on "Multiple controls with the same rdb value. And if I add it inside the for loop, you are to select multiple radio buttons, which is not right.
Any ideas?? Thanks!
RadioButtonList rbL = new RadioButtonList();
rbL.ID = "rdb_";
foreach (string s in eachQ[i].answer.Split(','))
{
rbL.Items.Add(new ListItem(s));
rbL.ID = "rdb_" + eachQ[i].answerid.ToString();
pnlQuestions.Controls.Add(rbL);
}
|
|
|
|
|
Try something like:
var rbl = new RadioButtonList();
rbl.ID = "rdb_" + eachQ[i].answerid;
var options = eachQ[i].answer.Split(',');
for (int optionIndex = 0; optionIndex < options.Length; optionIndex++)
{
rbl.Items.Add(new ListItem(options[optionIndex], optionIndex.ToString()));
}
pnlQuestions.Controls.Add(rbl);
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
RadioButtonList rbL = new RadioButtonList();
is above line in any other loop ?
If yes then update your question with that code as well.
Regards,
CodeBlack
|
|
|
|
|
You probably know this - a group of radio boxes need to be within a panel or group control
in order to 'group' them together so that they act in unison.
If you are placing a large number of radioboxes within one panel their behaviour will be unpredictable.
For instance an 'on/off' radio selection need to being their own panel or group in order to act exclusively on each other.
You probably know all the above.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Hello ,
Am a c# beginner and currently able to bind data from mysql to a C# DataViewGrid through dataTable and dataAdapters . I'm Wondering ,is there a way of mapping the same column by column to a DataviewGrid with already constructed columns like i do in Delphi&XstringGrid ..code snippet below......
sqlstr:=' select rno,rdate,accountof,tenant,building,receivedfrom,account,amount,posted,approved,crct from receipts where reversed <> 9 and ';
i:=1;
xs.RowCount := recordcount + 2;
while not eof do begin
xs.cells[0,i] := fieldbyname('rno').asstring;
xs.cells[1,i] := fieldbyname('accountof').asstring;
xs.cells[2,i] := fieldbyname('rdate').asstring;
xs.cells[3,i] := fieldbyname('tenant').asstring;
xs.cells[4,i] := fieldbyname('receivedfrom').asstring;
xs.cells[5,i] := fieldbyname('building').asstring;
xs.cells[6,i] := fieldbyname('account').asstring;
xs.cells[7,i] := fieldbyname('amount').asstring;
if fieldbyname('posted').asinteger = 0 then xs.cells[8,i] := 'No' else xs.cells[8,i] := 'Yes';
xs.cells[9,i] := fieldbyname('accountof').asstring;
xs.cells[12,i] := fieldbyname('crct').asstring;
building := fieldbyname('building').asstring;
if fieldbyname('approved').asinteger = 0 then xs.cells[13,i] := 'No' else xs.cells[13,i] := 'Yes';
next;Inc(i,1);
end;
end;
end;
|
|
|
|
|
|
Hello. I have taken backup of MySql database using MySqlDump and it is named as MyBackup.Sql (SchemaName = TestSchema, TableName = TestTable). Now let us suppose I don't have MySql Workbench so I can not examine this database using Data Import.
Now how do I add/update/delete records using this .sql file? I don't know what the connection string will look like and all the related stuff. Thanks for any input.
|
|
|
|
|
Django_Untaken wrote: Now how do I add/update/delete records using this .sql file? You can't; a backup of a database does not offer the same functionality as a database.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Then how will I deploy the database with my .exe? I want this database (along with my .exe project) to be available on other computer where there is no visual studio, no sql server or no mysql workbench?
|
|
|
|
|
If you don't have SQL or MySql installed and available, then your backup is completely useless.
If you are looking at a single user for the database, then consider changing to SQLite or SQLCE, or even Access, none of which require a dedicated server application to use a database - just a couple of DLL files which can be distributed with your application.
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
hello sir/madam,
I am Shrirkishna i looking for code and details about online exam project.
|
|
|
|
|
What exam? Any specific code, or should I list every .NET project from CodePlex?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.
Try it yourself, you may find it is not as difficult as you think!
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
I guess he asked about an online Campus where he can learn about C# and MySQL server (even though I'd rather go for MariaDB) - He's not on the homework-asking level yet
People becoming wiser in order to notice the stupid things they did back in the young days. This doesn't mean that they really stop doing those things. Wise people still do stupid things, only on purpose.
|
|
|
|
|
Try creating something and then post any issues you run into.
|
|
|
|
|
There is plenty of self-learning stuff out there:
Connect C# to MySQL[^]
ZetCode.com MySQL C# Tutorial[^]
People becoming wiser in order to notice the stupid things they did back in the young days. This doesn't mean that they really stop doing those things. Wise people still do stupid things, only on purpose.
|
|
|
|
|
Hello,
First of all sorry for my english.
My Case:
I have ann application to querry Active directory and some log files and show the output in a nice GUI.
Thiss app help many of my collegas to get information about users.
I would like to be able to notify my stuff about one of the user:
i can't understand how i can temporary save all output of my querry on the server and then send a notification to a concerned collega.
Hi might be able to retrive the result of the querry.
-----
I have already a running server with Objects necessary for my application on tcp channel with singlecall.
Thanks in advance for help
|
|
|
|
|
Don't post this in multiple places - it duplicates work and annoys people.
You have this posted in QA, so leave it there and don't add it elsewhere...
The only instant messaging I do involves my middle finger.
English doesn't borrow from other languages.
English follows other languages down dark alleys, knocks them over and goes through their pockets for loose grammar.
|
|
|
|
|
This is my XML structure after serializing
="1.0"
<ArrayOfTaskModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<TaskModel>
<TaskID>Task ID 1</TaskID>
<TaskDecs>Task Desc 1</TaskDecs>
<TaskPerson>Task Person 1</TaskPerson>
<TaskLong>Task Long 1</TaskLong>
<TaskLat>Task lat 1</TaskLat>
<TaskQuestions>
<TaskQuestion>
<TaskQuestionId>1</TaskQuestionId>
<TaskQuestionType>Task Type 1</TaskQuestionType>
<TaskQuestionTitle>Task Title 1</TaskQuestionTitle>
<TaskQuestionDesc>Task Desc 1</TaskQuestionDesc>
<TaskQuestionAnswers>
<string>test</string>
<string>test2</string>
</TaskQuestionAnswers>
<Answers>
<string>test</string>
<string>test2</string>
</Answers>
</TaskQuestion>
</TaskQuestions>
</TaskModel>
</ArrayOfTaskModel>
Now I want to add all data from this xml file into my datagridview. I tried to use this code
XmlSerializer xmlser = new XmlSerializer(typeof(List<TaskModel>));
StreamReader srdr = new StreamReader(@"D:\myfile.xml");
List<TaskModel> p = (List<TaskModel>)xmlser.Deserialize(srdr);
srdr.Close();
dataGridView1.DataSource = p;
With my TaskModel class is
public class TaskModel
{
public string TaskID { get; set; }
public string TaskTitle { get; set; }
public string TaskDecs { get; set; }
public string TaskPerson { get; set; }
public string TaskLong { get; set; }
public string TaskLat { get; set; }
public string TaskTime { get; set; }
public List<TaskQuestion> TaskQuestions { get; set; }
}
And TaskQuestion.cs is
public class TaskQuestion
{
public string TaskQuestionId { get; set; }
public string TaskQuestionType { get; set; }
public string TaskQuestionTitle { get; set; }
public string TaskQuestionDesc { get; set; }
public List<string> TaskQuestionAnswers { get; set; }
public List<string> Answers { get; set; }
}
If I deserialize with the above code, I just get some element of TaskModel, except TaskQuestions because it
TaskID | TaskTitle | Task Desc | TaskQuestionID | TaskQuestionType | TaskQuestionAnswers Please help me.
|
|
|
|
|
don't use this code as follow:
ManagementBaseObject inPar = null;
ManagementBaseObject outPar = null;
ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = mc.GetInstances();
<pre lang="cs">inPar = mo.GetMethodParameters("EnableStatic");
inPar["IPAddress"] = new string[] { "192.168.16.248", "192.168.16.249" };
inPar["SubnetMask"] = new string[] { "255.255.255.0", "255.255.255.0" };
outPar = mo.InvokeMethod("EnableStatic", inPar, null);
If the WMI service is not open, then you can not use it
Is there any other way????
|
|
|
|
|
|
+1
|
|
|
|