// public void FindGLID() { try { frmLookUp sForm = new frmLookUp( "ac_strid", "ac_title,ac_atitle,Ordering", fTableNameCOA, lTitle, 1, "ID,Account Title, Alternate Title,Ordering", "10,20,20,10", "T,T,T,T", true, "" ); // sForm.lupassControl = new frmLookUp.LUPassControl(PassGLData); sForm.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Exception, GL Lookup: " + ex.Message,fTitle); } }
// public void FindGLID() { try { frmLookUp sForm = new frmLookUp( "ac_strid", "ac_title,ac_atitle,Ordering", fTableNameCOA, lTitle, 1, "ID,Account Title, Alternate Title,Ordering", "10,20,20,10", "T,T,T,T", true, "" ); // sForm.lupassControl = new frmLookUp.LUPassControl(PassGLData); sForm.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Exception, GL Lookup: " + ex.Message, fTitle); } }
private void LookUp_Voc() { frmLookUp sForm = new frmLookUp( // SELECT d.DNId, d.Date, i.cgdDesc AS ItemGroupName, dept.department_name, //e.first_name + ' ' + e.last_name AS EmpName, d.Note //FROM DN d //INNER JOIN CatDtl i ON d.ItemGroupId = i.cgdCode AND i.cgCode = 6 //INNER JOIN PR_Department dept ON d.DepartmentId = dept.departmentid //INNER JOIN PR_Employee e ON d.EmployeeId = e.employeeid "d.DNId", //select "d.Date, i.cgdDesc AS ItemGroupName, dept.department_name,e.first_name + ' ' + e.last_name AS EmpName, d.Note", //select " DN d INNER JOIN CatDtl i ON d.ItemGroupId = i.cgdCode AND i.cgCode = 6 INNER JOIN PR_Department dept ON d.DepartmentId = dept.departmentid INNER JOIN PR_Employee e ON d.EmployeeId = e.employeeid", //from and join this.Text.ToString(), 1, "DN #,DN Date,Item Group,Department,Employee Name,Note", // displayed columns names "10,8,12,12,12,15", // column width " T, T, T, T, T, T", //Column type true, "", "", "TextBox" //text box is the type of gate inword ); txtDemandNote.Text = string.Empty; sForm.lupassControl = new frmLookUp.LUPassControl(PassDataVocID); sForm.ShowDialog(); if (txtDemandNote.Text != null) { if (txtDemandNote.Text != null) { if (txtDemandNote.Text.ToString() == "" || txtDemandNote.Text.ToString() == string.Empty) { return; } if (txtDemandNote.Text.ToString().Trim().Length > 0) { // PopulateRecords(); } } } }
private void LookUp_Voc() { frmLookUp sForm = new frmLookUp( //// select p.POId, p.Date, p.DNId, p.DNDate, e.first_name + ' ' + e.last_name AS EmployeeName, p.Note // from PO p // INNER JOIN PR_Employee e ON p.EmployeeId = e.employeeid "p.POId", " p.Date, p.DNId, p.DNDate, e.first_name + ' ' + e.last_name AS EmployeeName, p.Note", " PO p INNER JOIN PR_Employee e ON p.EmployeeId = e.employeeid", //from and join this.Text.ToString(), 1, "P.O.#, P.O. Date, Demand Note #, D.N.Date, Employee Name, Note", // displayed columns names "10,8,12,12,12,15", // column width " T, T, T, T, T, T", //Column type true, "", "", "TextBox" //text box is the type of gate inword ); txtPurchaseOrder.Text = string.Empty; sForm.lupassControl = new frmLookUp.LUPassControl(PassDataVocID); sForm.ShowDialog(); if (txtPurchaseOrder.Text != null) { if (txtPurchaseOrder.Text != null) { if (txtPurchaseOrder.Text.ToString() == "" || txtPurchaseOrder.Text.ToString() == string.Empty) { return; } if (txtPurchaseOrder.Text.ToString().Trim().Length > 0) { // PopulateRecords(); } } } }
private void LookUp_Voc() { frmLookUp sForm = new frmLookUp( "gi.GateInwordId", "gi.Date, cd.cgdDesc AS ItemGroupName, " + "g.GRNId,g.Date AS GRNDate,g.Note,gi.GateTime, gt.cgdDesc AS GateName", " GateInword gi INNER JOIN CatDtl cd ON gi.ItemGroupID=cd.cgdCode AND cd.cgCode=6 LEFT OUTER JOIN GRN g ON gi.GateInwordId=g.GateInwordId INNER JOIN CatDtl gt ON gi.GateID = gt.cgdCode AND gt.cgCode = 20 ", this.Text.ToString(), 1, "GateInword#,Date,Item Group Name,Grn Id,Grn Date,Note, Gate Time ", "10,8,12,12,12,15,8", " T, T, T, T, T, T, T", true, "", "", "TextBox" //text box is the type of gate inword ); txtGateInwordNumber.Text = string.Empty; sForm.lupassControl = new frmLookUp.LUPassControl(PassDataVocID); sForm.ShowDialog(); if (txtGateInwordNumber.Text != null) { if (txtGateInwordNumber.Text != null) { if (txtGateInwordNumber.Text.ToString() == "" || txtGateInwordNumber.Text.ToString() == string.Empty) { return; } if (txtGateInwordNumber.Text.ToString().Trim().Length > 0) { // PopulateRecords(); } } } }
private void LookUpGLID() { // 1- KeyField // 2- Field List // 3- Table Name // 4- Form Title // 5- Default Find Field (Int) 0,1,2,3 etc Default = 1 = title field // 6- Grid Title List // 7- Grid Title Width // 8- Grid Title format T = Text, N = Numeric etc // 9- Bool One Table = True, More Then One = False // 10 Join String Otherwise Empty String. // 11 Optional Where // 11 Return Control Type TextBox or MaskedTextBox Default mtextBox // if (!chkSelectedControlAc.Checked) { fGenAddWhere = "istran = 1"; } frmLookUp sForm = new frmLookUp( "ac_strid", "ac_title,ac_atitle,Ordering", "gl_ac", "GL COA", 1, "ID,Account Title,Account Alternate Title,Ordering", "10,20,20,20", "T,T,T,T", true, "", fGenAddWhere // here ); sForm.lupassControl = new frmLookUp.LUPassControl(ViewGLID); // private void PassData(object sender) is a method sForm.ShowDialog(); if (mtext.Text != null) { if (mtext.Text.ToString() == "" || mtext.Text.ToString() == string.Empty) { return; } mtextID.Text = mtext.Text.ToString(); SendKeys.Send("{TAB}"); } }