private void frmGIRO_Add_Load(object sender, System.EventArgs e) { DataTable dt; // dt = myCommon.ExecuteQuery("up_get_Membercmb"); // new ManagerMemberIDLookupEditBuilder(dt, luedtMemberID.Properties); dt = myCommon.ExecuteQuery("Select * from tblBank"); new ManagerBankLookupEditBuilder(dt, luedtBank.Properties); dt = myCommon.ExecuteQuery("Select * from tblBankBranch"); new ManagerBankBranchLookupEditBuilder(dt, luedtBankBranch.Properties); dt = myCommon.ExecuteQuery("Select strBranchCode,strBranchName from tblBranch"); new ManagerBranchCodeLookupEditBuilder(dt, luedtBranch.Properties); dt = myCommon.ExecuteQuery("Select strPackageCode,strDescription from tblPackage"); new ManagerPackageLookupEditBuilder(dt, luedtPackage.Properties); }
private void BindInit() { myCommon = new ACMS.Utils.Common(); DataTable dt; dt = myCommon.ExecuteQuery("Select strBranchCode,strBranchName from tblBranch Where strBranchCode In (Select strBranchCode from tblemployeebranchrights Where nEmployeeId = " + EmployeeId + ")"); new ManagerBranchCodeLookupEditBuilder(dt, this.lkBranch.Properties); dt = myCommon.ExecuteQuery("Select nEmployeeID, strEmployeeName from tblEmployee"); new ManagerEmployeeIDLookupEditBuilder(dt, this.lkEmployee.Properties); string strSQL = "Select strLeaveCode, strDescription from tblLeaveType order by strLeaveCode"; comboBind(cmbLeaveType, strSQL, "strLeaveCode", "strDescription", true); this.cmbLeaveType.Properties.Items.Insert(0, new DevExpress.XtraEditors.Controls.ImageComboBoxItem("- Please Select -", "")); cmbLeaveType.SelectedIndex = 0; strSQL = "Select distinct nYearID from tblLeave order by nYearID desc"; comboBind(Year, strSQL, "nYearID", "nYearID", true); Year.SelectedIndex = 0; if (Year.SelectedIndex == -1) { this.Year.Properties.Items.Insert(0, new DevExpress.XtraEditors.Controls.ImageComboBoxItem(DateTime.Today.Year.ToString(), "")); } Year.SelectedIndex = 0; comboBind(ToYear, strSQL, "nYearID", "nYearID", true); ToYear.SelectedIndex = 0; if (ToYear.SelectedIndex == -1) { this.ToYear.Properties.Items.Insert(0, new DevExpress.XtraEditors.Controls.ImageComboBoxItem(DateTime.Today.Year.ToString(), "")); } ToYear.SelectedIndex = 0; }
private void InitLoad() { DataSet _ds; DataTable dt; myCommon = new ACMS.Utils.Common(); dt = myCommon.ExecuteQuery("Select strBranchCode,strBranchName from tblBranch Where strBranchCode In (Select strBranchCode from tblemployeebranchrights Where nEmployeeId = " + EmployeeID + ")"); new ManagerBranchCodeLookupEditBuilder(dt, this.lkBranch.Properties); _ds = new DataSet(); string strSQL = "select strPromotionCode, strDescription from tblPromotion"; SqlHelper.FillDataset(connection, CommandType.StoredProcedure, "UP_GETDATA", _ds, new string[] { "table" }, new SqlParameter("@strSQL", strSQL)); dt = _ds.Tables["table"]; DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2]; col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strPromotionCode", "Promotion Code", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None); col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription", "Description", 15, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Default, DevExpress.Data.ColumnSortOrder.None); new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lkPromotion.Properties, dt, col, "strDescription", "strPromotionCode", "Promotion Code"); }
private void BindInit() { myCommon = new ACMS.Utils.Common(); DataTable dt; dt = myCommon.ExecuteQuery("Select strBranchCode,strBranchName from tblBranch Where strBranchCode In (Select strBranchCode from tblemployeebranchrights Where nEmployeeId = " + EmployeeId + ")"); new ManagerBranchCodeLookupEditBuilder(dt, this.lkBranch.Properties); dt = myCommon.ExecuteQuery("Select nEmployeeID, strEmployeeName from tblEmployee"); new ManagerEmployeeIDLookupEditBuilder(dt, this.lkEmployee.Properties); string strSQL = "Select strLeaveCode, strDescription from tblLeaveType order by strLeaveCode"; comboBind(cmbLeaveType, strSQL, "strLeaveCode", "strDescription", true); this.cmbLeaveType.Properties.Items.Insert(0,new DevExpress.XtraEditors.Controls.ImageComboBoxItem("- Please Select -","")); cmbLeaveType.SelectedIndex = 0; strSQL = "Select distinct nYearID from tblLeave order by nYearID desc"; comboBind(Year, strSQL, "nYearID", "nYearID", true); Year.SelectedIndex = 0; if (Year.SelectedIndex == -1) this.Year.Properties.Items.Insert(0,new DevExpress.XtraEditors.Controls.ImageComboBoxItem(DateTime.Today.Year.ToString(),"")); Year.SelectedIndex = 0; comboBind(ToYear, strSQL, "nYearID", "nYearID", true); ToYear.SelectedIndex = 0; if (ToYear.SelectedIndex == -1) this.ToYear.Properties.Items.Insert(0,new DevExpress.XtraEditors.Controls.ImageComboBoxItem(DateTime.Today.Year.ToString(),"")); ToYear.SelectedIndex = 0; }
private void InitLoad() { DataSet _ds; DataTable dt; myCommon = new ACMS.Utils.Common(); dt = myCommon.ExecuteQuery("Select strBranchCode,strBranchName from tblBranch Where strBranchCode In (Select strBranchCode from tblemployeebranchrights Where nEmployeeId = " + EmployeeID + ")"); new ManagerBranchCodeLookupEditBuilder(dt, this.lkBranch.Properties); _ds = new DataSet(); string strSQL = "select strPromotionCode, strDescription from tblPromotion"; SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) ); dt = _ds.Tables["table"]; DevExpress.XtraEditors.Controls.LookUpColumnInfo[] col = new DevExpress.XtraEditors.Controls.LookUpColumnInfo[2]; col[0] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strPromotionCode","Promotion Code",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None); col[1] = new DevExpress.XtraEditors.Controls.LookUpColumnInfo("strDescription","Description",15,DevExpress.Utils.FormatType.None,"",true,DevExpress.Utils.HorzAlignment.Default,DevExpress.Data.ColumnSortOrder.None); new ACMS.XtraUtils.LookupEditBuilder.CommonLookupEditBuilder(this.lkPromotion.Properties,dt,col,"strDescription","strPromotionCode","Promotion Code"); }