Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~18.2K People Reached
This member's community profile is only visible to logged in members until they have earned 15 reputation points.

42 Posted Topics

Member Avatar for leo88

I am currently stuck with problem of set the dll file location path in my javascript object, in the classid i currently do this: "classid="http:RFID_AUCMS.dll#RFID_AUCMS.Main" This work fine if i put the dll file in same folder with the project module file( aspx). However I actually needs to put the …

Member Avatar for Troy III
0
176
Member Avatar for leo88

Hi, I am writting a program to let user generate excel file from the datagrid in web page. Below is the codes: Private Sub ConvertToExcel(ByVal Data As ProductionScheduleData) Dim stringwrite As New System.IO.StringWriter Dim htmlWrite As New System.Web.UI.HtmlTextWriter(stringwrite) GridExcel.RenderControl(htmlWrite) Response.Clear() Response.ClearContent() Response.ClearHeaders() Response.BufferOutput = True Response.AddHeader("Content-Disposition", "attachment;filename=" + "ProductionSchedule" + …

Member Avatar for Member #949455
0
142
Member Avatar for leo88

Hi, I wants to ask about how to call the javascript function/method in .aspx file from code behind(or server code)? for example: Javascript: [CODE] function initCard(userid) { //userid, balance, subsidy breakfast, subsidy lunch, subsidy dinner var iRet = winCtrl.initCard(userid, 0, 0, 0, 0); } [/CODE] code behind: [CODE] Dim sb …

Member Avatar for G_Waddell
0
432
Member Avatar for leo88

Hi, I wants to ask how to pending the coding in code behind before the javascript function is finished execute? for example: [CODE] ScriptManager.RegisterStartupScript(Me, Me.GetType(), Guid.NewGuid().ToString(), "initCard('" & 28 & "');" & Page.ClientScript.GetPostBackEventReference(Me, ""), True) Me.Response.Redirect("~/MasterData/StaffMaintain.aspx", False) [/CODE] From the coding above, I call a javascript function of "initcard()",before redirect …

0
75
Member Avatar for leo88

Hi, take a look to my coding: [CODE] Dim Dir As New DirectoryInfo("C:\Users\Leo\Desktop\Data Lau") Dim svrDir As New DirectoryInfo(" C:\Users\Leo\Desktop\Server") Dim FileList As FileInfo() = Dir.GetFiles("*.*", SearchOption.TopDirectoryOnly) Dim svrFileList As FileInfo() = Dir.GetFiles("*.*", SearchOption.TopDirectoryOnly) Dim fi As IO.FileInfo Dim svrfi As IO.FileInfo Dim isSame As Boolean = False Dim storfilelist …

Member Avatar for leo88
0
122
Member Avatar for leo88

Hi, I would like to ask how to pass "select count" query value into variable? [CODE] string workstr = "SELECT COUNT(Indicator)FROM PunchIn WHERE EmployeeName='" + selectedItem + "'AND Months='" + selectedItem1 + "'"; AccessDb_Cmd.ExecuteNonQuery(workstr, Access_Db); int count = (int)??.ExecuteScalar();//what should put into "??" ? [/CODE]

Member Avatar for leo88
0
157
Member Avatar for sreekar_222

refer this [url]http://www.codeproject.com/KB/IP/httpwebrequest_response.aspx[/url]

Member Avatar for leo88
0
71
Member Avatar for leo88

Hi, I have problems with passing parameters in a object to string, take a look to my codes: [CODE] DataTable dt = new DataTable(); string SQLStr = ""; // sql query dt = AccessDb_Cmd.RetrieveData(SQLStr, Access_Db).Tables[0]; string c1,c2,c3,c4,c5,c6; int i; foreach (DataRow row in dt.Rows) { i = 0; object array …

Member Avatar for leo88
0
143
Member Avatar for leo88

Hi, I am now doing a window form application which are contains several window form interfaces My question is that : Firstly I enter texts in a text box of interface A (login page) , then I clicks a button to hide A and go to interface B. At B, …

Member Avatar for sametyildirim
0
368
Member Avatar for leo88

Hi, I have 2 links within a datagridview. The 2 links are in the same row, let say link A and link B. How to let link A go to Form A and link B go to Form B? [CODE] Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) …

Member Avatar for Stefan_Lam88
0
148
Member Avatar for leo88

Hi, I am a new in stored procedure and I now do the following function: [CODE] ALTER PROCEDURE dbo.ViewFaultyTbl @id int AS SET NOCOUNT ON; DECLARE @indicator int SELECT @indicator=Indicator FROM FautyScanTbl if @indicator=0 BEGIN SELECT * FROM FautyScanTbl WHERE ID=@id END ELSE BEGIN END [/CODE] Indicator is a column …

Member Avatar for leo88
0
129
Member Avatar for leo88

Hi, look into codes below: [CODE] Sub Main() Dim tmr As New Timers.Timer tmr.Interval = TimeSpan.FromMinutes(5).TotalMilliseconds tmr.Start() 'Do function End Sub [/CODE] As my program above, i set the time interval to every 5 minute which it will do the function. However, after 5 minites it does not affect any …

Member Avatar for leo88
0
1K
Member Avatar for leo88

Hi, I am exploring a timer function which I wants my program function runs every 10 minit interval. Below is my coding: [CODE] Dim timer As Timer timer = New Timer(600000) 'timer.Enabled = True timer.Interval = 600000 timer.Start() 'Do function timer.Stop() [/CODE] Actually I am not familiar with timer function, …

Member Avatar for leo88
0
278
Member Avatar for leo88

Hi, I am doing login using data reader of C#. Here is my codes, [CODE] try { Access_Db.OpenTransaction(); Access_Db.BeginTransaction(); bool usrExist = false; string SQLStr = "SELECT ID,Password FROM RegisterEmployee"; OleDbCommand sqlComm = new OleDbCommand(SQLStr); OleDbDataReader reader = sqlComm.ExecuteReader(); // program got exception when run till here while(reader.Read()) { if …

Member Avatar for leo88
0
306
Member Avatar for leo88

Hi, I wants to ask how to convert DBNull to Date type? [CODE] For Each row As DataRow In dt.Rows i = 0 Dim array As Object = row.ItemArray Dim a As String If array(i + 10) IsNot Nothing Then a = CDate(array(i + 10)).ToString("yyyy-MM-dd hh:mm:ss") Else array(i + 10) …

Member Avatar for leo88
0
1K
Member Avatar for leo88

Hi, I am doing a window servise application using VB.net. I have faced problems with sql suery, as below: [CODE] Dim dt As New DataTable() SQLStr = "SELECT FautyScanTbl.Model, FautyScanTbl.Version, FautyScanTbl.WIP, FautyScanTbl.ScanNo, FautyScanTbl.LotSize, FautyScanTbl.SerialNo, FautyScanTbl.PIC," & _ "SerialNoTbl.SetWeight, SerialNoTbl.AccesWeight, SerialNoTbl.pdmid, ScannedPartNoTbl.ScannedTime " & _ "FROM FautyScanTbl LEFT OUTER JOIN " …

Member Avatar for sandeepparekh9
0
125
Member Avatar for leo88

hi, I am from c# field and now are doing a project using VB, I wants to ask about question as below: 1) private static DataSet ds; I wants to convert the C# codes above to VB syntax, but VB seems like don't have equivalent keywords of "static"(Correct me if …

Member Avatar for leo88
0
297
Member Avatar for leo88

Hi, I am doing a window service application using C#. I wants to select many columns from many table and print into text file. Below is my coding: [CODE] protected override void OnStart(string[] args) { try { base.OnStart(args); Access_Db.OpenTransaction(); Access_Db.BeginTransaction(); DataTable dtPartNo = new DataTable(); SQLStr = "SELECT IDTbl.ModelID,WIPTbl.WIP FROM …

Member Avatar for Mitja Bonca
0
234
Member Avatar for leo88

Hi, I wants to read data from a datatable, but after I executes the program it does not output anything. Can help me check what is the problem? [CODE] string SQLStr; string output=""; SQLClass Access_Db = new SQLClass(); AccessDbCmd AccessDb_Cmd = new AccessDbCmd(); try { Access_Db.OpenTransaction(); Access_Db.BeginTransaction(); DataTable myTable = …

Member Avatar for Mitja Bonca
0
97
Member Avatar for leo88

hi, I wants to do register function in window form application microsoft visual studio 2008 and insert the data into microsoft Access 2007 table by using C#. Below is my codes: [CODE] SQLStr = "INSERT INTO RegisterEmployee(EmployeeName,Password,Gender,ContactNumber)" + "VALUES ('" + SQLStrCmd.ReplaceStr(nameReg.Text) + "', '" + SQLStrCmd.ReplaceStr(passReg.Text) + "', '" …

Member Avatar for leo88
0
195
Member Avatar for leo88

hi, now I wants to insert some records into table in Microsoft Access and C#, below is my codes : [CODE] SQLStr = "Insert Into RegisterEmployee(EmployeeName,Password,Gender,ContactNumber,Position) " + "Values ('" + SQLStrCmd.ReplaceStr(nameReg.Text) + "', '" + SQLStrCmd.ReplaceStr(passReg.Text) + "', '" + SQLStrCmd.ReplaceStr(genReg.Text) + "', '" + SQLStrCmd.ReplaceStr(Hptxt.Text) + "', '" …

Member Avatar for leo88
0
221
Member Avatar for leo88

Hi, i am here to ask some button control problem in Visual studio: [CODE] private void button1_Click(object sender, EventArgs e) { Report newMDIChild = new Report(); // Set the parent form of the child window. newMDIChild.MdiParent = this; // Display the new form. newMDIChild.Show(); } [/CODE] In my program, when …

Member Avatar for polczym
0
388
Member Avatar for leo88

Hi, I am still a new in C# and visual Studio. I now wants to create a database in visual studio, after i click file in visual studio, as step below : 1)file>> new >> project 2) Other Project types >> Database Is that my steps correct? Where to find …

Member Avatar for leo88
0
96
Member Avatar for leo88
Member Avatar for leo88
0
184
Member Avatar for leo88

Hi, i am confused about some text box problems, as below: [CODE] double v3; foreach (String cvt in sortList2.Keys) { if (!(sortList8.ContainsKey(cvt))) { sortList2.TryGetValue(cvt, out v3); sortList8.Add(cvt, v3); sortList8[cvt] = (v3 * 100 / textBox2.Lines.Length); } } [/CODE] In codes above, v3 is double typed values like 1,2,3,4..(not 1.1, 2.3..). …

0
53
Member Avatar for eoop.org
Member Avatar for Momerath
0
127
Member Avatar for leo88

hi, I have a button control problem: [CODE] public void Display1() { listbox.Items.Clear(); Dictionary<string, double> sortList2 = new Dictionary<string, double>(); Dictionary<string, double> sortList8 = new Dictionary<string, double>(); string getText = textBox2.Text; Array arr; StringReader re1 = new StringReader(getText); string[] firstString = new string[textBox2.Lines.Length]; string[] secondString = new string[Comset2.Items.Count]; sortList8.Clear(); foreach …

0
65
Member Avatar for leo88

Hi, i have a convert problem: [CODE] double v3; foreach (String cvt in sortList2.Keys) { if (!(sortList8.ContainsKey(cvt))) { sortList2.TryGetValue(cvt, out v3); sortList8.Add(cvt, v3); String.Format("{0:0.00}", sortList8[cvt]); sortList8[cvt] = (v3 * 100 / textBox2.Lines.Length); // how to convert the result to 2 decimal? } } IDictionaryEnumerator enumerator2 = sortList8.GetEnumerator(); while (enumerator2.MoveNext()) { …

Member Avatar for Momerath
0
227
Member Avatar for leo88

Hi, i have some problems with arraylist: [code] ArrayList arr=new ArrayList(); string a="1 2"; // how to split this and store to arraylist? [/code] How to split the string "1 2" and store into arrayList arr?

Member Avatar for Saikalyankumar
0
114
Member Avatar for leo88

hi, i have a question about string. [code] string a = "1 2 2 4 5"; string b = "2 5"; if (a.Substring(b)) // or need use contains? { Console.WriteLine("yes"); } else Console.WriteLine("No"); } [/code] I want to check that if "2 5" is in a, then it will print …

Member Avatar for leo88
0
343
Member Avatar for leo88

hey, i have 2 listboxs (listbox1 and listbox2), both the listboxs contains output as following: listbox1 1 2 1 4 1 5 1 2 4 2 4 5 listbox2 1 2 2 4 5 1 3 4 5 I wants to compare the 2 listboxs, for each line of listbox1, …

Member Avatar for leo88
0
161
Member Avatar for leo88

hi, i wants to ask some string problems, as below: string []first 1 2 3 4 5 1 4 5 1 3 4 5 string second="2 3"; [code] double sum=0; foreach(string a in first) { if( ) // what should i write here? { sum++; } } [/code] In program …

Member Avatar for leo88
0
103
Member Avatar for leo88

hi there, i got some problems in extract the minimum value in a sortedlist, as below: [code] Dictionary<string, double> sortList = new Dictionary<string, double>(); double min; sortList.Add(1,2); sortList.Add(2,5); // min = sortList5.Min(x => x.Value); [/code] I wants to find minimum value of the sortlist.value, is there has any functions of …

Member Avatar for leo88
0
7K
Member Avatar for leo88

Hi, i got some problems with remove and split: i have the outputs, as below: {1 2} 3 How to remove the syimbol {} and split the 3 ?for example. it will become 1 2 3 anyone know? Please help me..

Member Avatar for Momerath
0
184
Member Avatar for leo88

Hi, i wants to add key and value of enumerator into a dictionary list, what should i do? My code as below: [code] public void Display1() { Dictionary<string, double> sortList2 = new Dictionary<string, double>(); Dictionary<string, double> sortList3 = new Dictionary<string, double>(); foreach (string sortComb in listbox1.Items) { if (!(sortList2.ContainsKey(sortComb))) { …

Member Avatar for leo88
0
383
Member Avatar for leo88

Hi, i wants to store the key and value of an enumerator to a dictionary, but i have no idea about how to convert enumerator.value to type of double : [code] public void Display1() { listbox.Items.Clear(); Dictionary<string, double> sortList2 = new Dictionary<string, double>(); Dictionary<string, double> sortList3 = new Dictionary<string, double>(); …

Member Avatar for leo88
0
108
Member Avatar for leo88

Hi, i had write the following code but it seems like gt exception, can help me check got what problem? Dictionary<string, double> sortList4 = new Dictionary<string, double>(); List<double> list = ISUPP.Items.OfType<double>().ToList(); double[] value1=list.ToArray(); int c = 0; foreach (string gk in Comset2.Items) { sortList4.Add(gk, value1[0]); c++; }

Member Avatar for leo88
0
142
Member Avatar for leo88

How to get minimum value? [code] ArrayList arrKey = new ArrayList(); double v; double min; foreach (string subKey in sortList4.Keys) { foreach(string mee in arrKey) { sortList5.Add(mee,1); if(sortList3.ContainsKey(mee)) { sortList3.TryGetValue(mee, out v); if(v>min) { //what should do at here? } }}} [/code]

Member Avatar for leo88
0
148
Member Avatar for leo88

hi, i wants to take the items from a listbox and then store to a dictionary list like this: Dictionary<string, double> sortList3 = new Dictionary<string, double>(); In the dictionary, the key is string and value is double. The listbox content is as below: {1 2} 4 {1 4} 6 {1 …

Member Avatar for Mitja Bonca
0
181
Member Avatar for leo88

hi,I work using window form C#, my problem is as below: output += myArray1[prune]; string ipt = null; while ((ipt=re.ReadLine()) != null) { string ListSplitLineByLine1 = ""; String[] SplitItemLineByLine2 = (ipt).Split(new string[] { "\n\r\t", " " }, StringSplitOptions.None); foreach (string lineByLine1 in SplitItemLineByLine2) { ListSplitLineByLine1 += "\r\n" + lineByLine1; } …

Member Avatar for Mitja Bonca
0
2K
Member Avatar for leo88

I have some problems in display the dictionary, as example in below: SortedList mySL = new SortedList(); Console.WriteLine( "\t-KEY-\t-VALUE-" ); for ( int i = 0; i < myList.Count; i++ ) { Console.WriteLine( "\t{0}:\t{1}", mySL.GetKey(i), mySL.GetByIndex(i) ); } For the codes in above,"myList.GetKey(i), myList.GetByIndex(i)" just can work if mySL is …

Member Avatar for Momerath
0
117
Member Avatar for leo88

Hi,i am doing window form using VB C#. My problem as below: Dictionary<string, double> sortList1 = new Dictionary<string, double>();//contain key and //values Dictionary<string, double> sortList2 = new Dictionary<string, double>();//empty // do events int j = 0; foreach (double doub5 in sortList1.Values) { holder = (doub5 * 100 / richTextBox2.Lines.Length) * …

Member Avatar for leo88
0
100

The End.