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
~17.4K People Reached
About Me

hi

Interests
programming
Favorite Tags
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
174
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 LastMitch
0
138
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
379
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
73
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
117
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
150
Member Avatar for sreekar_222
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
135
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
359
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
141
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
126
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
259
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
202
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
122
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
289
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
229
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
94
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
188
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
216
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
381
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
93
Member Avatar for leo88
Member Avatar for leo88
0
177
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

Is it some one hwo know how to open a form. I want to show form2 when some one presses button1?

Member Avatar for Momerath
0
120
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
61
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
190
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
109
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
332