public frmEditActivities(string MembershipID, DateTime ADate, int Course) { // // Required for Windows Form Designer support // InitializeComponent(); myCommon = new ACMS.Utils.Common(); connectionString = (string)ConfigurationSettings.AppSettings["Main.ConnectionString"]; connection = new SqlConnection(connectionString); strMembershipID = MembershipID; nCourse = Course; txt_ActDate.EditValue = ADate; // System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("en-US"); // string formats = {"dd/MM/yyyy hh:mm tt", "dd/MM/yy hh:mm tt"}; // DateTime a = DateTime.ParseExact(ADate.ToString(), formats, System.Globalization.CultureInfo.InvariantCulture, Globalization.DateTimeStyles.NoCurrentDateDefault); // // MessageBox.Show(a.ToShortDateString()); // // // // TODO: Add any constructor code after InitializeComponent call // }
public frmEditActivities(string MembershipID,DateTime ADate, int Course) { // // Required for Windows Form Designer support // InitializeComponent(); myCommon = new ACMS.Utils.Common(); connectionString = (string)ConfigurationSettings.AppSettings["Main.ConnectionString"]; connection = new SqlConnection(connectionString); strMembershipID=MembershipID; nCourse=Course; txt_ActDate.EditValue=ADate; // System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("en-US"); // string formats = {"dd/MM/yyyy hh:mm tt", "dd/MM/yy hh:mm tt"}; // DateTime a = DateTime.ParseExact(ADate.ToString(), formats, System.Globalization.CultureInfo.InvariantCulture, Globalization.DateTimeStyles.NoCurrentDateDefault); // // MessageBox.Show(a.ToShortDateString()); // // // // TODO: Add any constructor code after InitializeComponent call // }
public frmReward_Add() { InitializeComponent(); myCommon = new ACMS.Utils.Common(); connectionString = (string)ConfigurationSettings.AppSettings["Main.ConnectionString"]; connection = new SqlConnection(connectionString); }
public frmGIRO_Add(int nEmployeeID, string aTerminalBranchCode) { // // Required for Windows Form Designer support // InitializeComponent(); myCommon = new ACMS.Utils.Common(); // // TODO: Add any constructor code after InitializeComponent call // this.nEmployeeID = nEmployeeID; ucMemberID1.StrBranchCode = aTerminalBranchCode; }
public frmReward_Edit(int ItemCode) { InitializeComponent(); myCommon = new ACMS.Utils.Common(); connectionString = (string)ConfigurationSettings.AppSettings["Main.ConnectionString"]; connection = new SqlConnection(connectionString); pkItemCode = ItemCode; // // TODO: Add any constructor code after InitializeComponent call // }
public frmReward_Edit(int ItemCode) { InitializeComponent(); myCommon = new ACMS.Utils.Common(); connectionString = (string)ConfigurationSettings.AppSettings["Main.ConnectionString"]; connection = new SqlConnection(connectionString); pkItemCode=ItemCode; // // TODO: Add any constructor code after InitializeComponent call // }
public frmItem_Add() { // // Required for Windows Form Designer support // InitializeComponent(); myCommon = new ACMS.Utils.Common(); connectionString = (string)ConfigurationSettings.AppSettings["Main.ConnectionString"]; connection = new SqlConnection(connectionString); // // TODO: Add any constructor code after InitializeComponent call // }
private void frmIPP_Add_Load(object sender, System.EventArgs e) { string strSQL; strSQL = "select * from tblBank"; DataTable dt = new ACMS.Utils.Common().ExecuteQuery(strSQL); new ACMS.XtraUtils.LookupEditBuilder.ManagerBankLookupEditBuilder(dt, luedtBank.Properties); strSQL = "select * from tblBranch"; dt = new ACMS.Utils.Common().ExecuteQuery(strSQL); new ACMS.XtraUtils.LookupEditBuilder.ManagerBranchCodeLookupEditBuilder(dt, luedtBranch.Properties); dateEdit1.EditValue = DateTime.Now.Date; }
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 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 frmIPP_Add_Load(object sender, System.EventArgs e) { string strSQL; strSQL="select * from tblBank"; DataTable dt = new ACMS.Utils.Common().ExecuteQuery(strSQL); new ACMS.XtraUtils.LookupEditBuilder.ManagerBankLookupEditBuilder(dt, luedtBank.Properties); strSQL="select * from tblBranch"; dt = new ACMS.Utils.Common().ExecuteQuery(strSQL); new ACMS.XtraUtils.LookupEditBuilder.ManagerBranchCodeLookupEditBuilder(dt, luedtBranch.Properties); dateEdit1.EditValue = DateTime.Now.Date; }
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"); }