private void frmLeaveType_Load(object sender, System.EventArgs e) { try { clsISUtilities = new clsISUtilities(this, "busLeaveType"); this.lblLeaveType.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint); this.lblPayrollType.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint); PayrollLinkDataGridViewCellStyle = new DataGridViewCellStyle(); PayrollLinkDataGridViewCellStyle.BackColor = Color.Magenta; PayrollLinkDataGridViewCellStyle.SelectionBackColor = Color.Magenta; this.dgvPayrollTypeDataGridView.Rows.Add("Wages"); this.dgvPayrollTypeDataGridView.Rows.Add("Salaries"); this.pvtblnPayrollTypeDataGridViewLoaded = true; this.Set_DataGridView_SelectedRowIndex(this.dgvPayrollTypeDataGridView, 0); object[] objParm = new object[1]; objParm[0] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo")); byte[] bytCompress = (byte[])clsISUtilities.DynamicFunction("Get_Form_Records", objParm); pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(bytCompress); DataRow dtDataRow; //Table DataTable DataTable = new DataTable("PERCENT_PAID"); DataTable.Columns.Add("PERCENT_PAID_VALUE", typeof(System.Int16)); pvtDataSet.Tables.Add(DataTable); for (int intValue = 1; intValue < 101; intValue++) { dtDataRow = pvtDataSet.Tables["PERCENT_PAID"].NewRow(); dtDataRow["PERCENT_PAID_VALUE"] = intValue; pvtDataSet.Tables["PERCENT_PAID"].Rows.Add(dtDataRow); } pvtDataSet.AcceptChanges(); clsISUtilities.DataBind_ComboBox_Load(this.cboPercentage, pvtDataSet.Tables["PERCENT_PAID"], "PERCENT_PAID_VALUE", "PERCENT_PAID_VALUE"); Load_CurrentForm_Records(); } catch (Exception eException) { clsISUtilities.ErrorHandler(eException); } }
private void frmDeduction_Load(object sender, System.EventArgs e) { try { clsISUtilities = new clsISUtilities(this, "busDeduction"); this.lblDeductionSpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint); this.lblPayrollTypeSpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint); this.lblPercentEarningsSpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint); this.dgvPayrollTypeDataGridView.Rows.Add("Wages"); this.dgvPayrollTypeDataGridView.Rows.Add("Salaries"); pvtblnPayrollTypeDataGridViewLoaded = true; this.Set_DataGridView_SelectedRowIndex(this.dgvPayrollTypeDataGridView, 0); LockedPayrollRunDataGridViewCellStyle = new DataGridViewCellStyle(); LockedPayrollRunDataGridViewCellStyle.BackColor = Color.Magenta; LockedPayrollRunDataGridViewCellStyle.SelectionBackColor = Color.Magenta; pvtDataSet = new DataSet(); object[] objParm = new object[3]; objParm[0] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo")); objParm[1] = AppDomain.CurrentDomain.GetData("AccessInd").ToString(); objParm[2] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("UserNo")); pvtbytCompress = (byte[])clsISUtilities.DynamicFunction("Get_Form_Records", objParm); pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress); clsISUtilities.DataBind_ComboBox_Load(this.cboNumberSubAccount, pvtDataSet.Tables["SubAccount"], "DEDUCTION_SUB_ACCOUNT_COUNT", "DEDUCTION_SUB_ACCOUNT_COUNT"); clsISUtilities.NotDataBound_ComboBox(this.cboDay, "Select Day of Month."); Load_CurrentForm_Records(); } catch (Exception eException) { clsISUtilities.ErrorHandler(eException); } }
private void frmNormalSickLeave_Load(object sender, System.EventArgs e) { try { clsISUtilities = new clsISUtilities(this, "busNormalSickLeave"); PayrollLinkDataGridViewCellStyle = new DataGridViewCellStyle(); PayrollLinkDataGridViewCellStyle.BackColor = Color.Magenta; PayrollLinkDataGridViewCellStyle.SelectionBackColor = Color.Magenta; this.lblDescription.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint); this.lblPayrollType.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint); this.dgvPayrollTypeDataGridView.Rows.Add("Wages"); this.dgvPayrollTypeDataGridView.Rows.Add("Salaries"); pvtblnPayrollTypeDataGridViewLoaded = true; this.Set_DataGridView_SelectedRowIndex(this.dgvPayrollTypeDataGridView, 0); object[] objParm = new object[3]; objParm[0] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo")); objParm[1] = AppDomain.CurrentDomain.GetData("AccessInd").ToString(); objParm[2] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("UserNo")); pvtbytCompress = (byte[])clsISUtilities.DynamicFunction("Get_Form_Records", objParm); pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress); DataRow dtDataRow; //Table DataTable DataTable = new DataTable("DAYS50"); DataTable.Columns.Add("DAYS50_DESC", typeof(System.String)); DataTable.Columns.Add("DAYS50_VALUE", typeof(System.Int16)); pvtDataSet.Tables.Add(DataTable); DataTable = new DataTable("DAYS365"); DataTable.Columns.Add("DAYS365_VALUE", typeof(System.Int16)); pvtDataSet.Tables.Add(DataTable); DataTable = new DataTable("HOURS24"); DataTable.Columns.Add("HOURS24_VALUE", typeof(System.Int16)); pvtDataSet.Tables.Add(DataTable); for (int intValue = 0; intValue < 51; intValue++) { if (intValue < 24) { dtDataRow = pvtDataSet.Tables["HOURS24"].NewRow(); dtDataRow["HOURS24_VALUE"] = intValue; pvtDataSet.Tables["HOURS24"].Rows.Add(dtDataRow); } if (intValue >= 0 & intValue < 51) { dtDataRow = pvtDataSet.Tables["DAYS50"].NewRow(); dtDataRow["DAYS50_DESC"] = intValue.ToString("00"); dtDataRow["DAYS50_VALUE"] = intValue; pvtDataSet.Tables["DAYS50"].Rows.Add(dtDataRow); } } for (int intValue = 180; intValue < 366; intValue++) { dtDataRow = pvtDataSet.Tables["DAYS365"].NewRow(); dtDataRow["DAYS365_VALUE"] = intValue; pvtDataSet.Tables["DAYS365"].Rows.Add(dtDataRow); } DataTable = new DataTable("MINUTE"); DataTable.Columns.Add("MINUTE_VALUE", typeof(System.Int16)); pvtDataSet.Tables.Add(DataTable); dtDataRow = pvtDataSet.Tables["MINUTE"].NewRow(); dtDataRow["MINUTE_VALUE"] = 0; pvtDataSet.Tables["MINUTE"].Rows.Add(dtDataRow); dtDataRow = pvtDataSet.Tables["MINUTE"].NewRow(); dtDataRow["MINUTE_VALUE"] = 15; pvtDataSet.Tables["MINUTE"].Rows.Add(dtDataRow); dtDataRow = pvtDataSet.Tables["MINUTE"].NewRow(); dtDataRow["MINUTE_VALUE"] = 30; pvtDataSet.Tables["MINUTE"].Rows.Add(dtDataRow); dtDataRow = pvtDataSet.Tables["MINUTE"].NewRow(); dtDataRow["MINUTE_VALUE"] = 45; pvtDataSet.Tables["MINUTE"].Rows.Add(dtDataRow); pvtDataSet.AcceptChanges(); clsISUtilities.DataBind_ComboBox_Load(this.cboNormalPaid, this.pvtDataSet.Tables["DAYS50"], "DAYS50_DESC", "DAYS50_VALUE"); clsISUtilities.DataBind_ComboBox_Load(this.cboSickPaid, this.pvtDataSet.Tables["DAYS50"], "DAYS50_DESC", "DAYS50_VALUE"); clsISUtilities.DataBind_ComboBox_Load(this.cboMaxShifts, this.pvtDataSet.Tables["DAYS365"], "DAYS365_VALUE", "DAYS365_VALUE"); clsISUtilities.NotDataBound_ComboBox(this.cboMinShiftHours, "Select Minimum Hours for a valid shift."); clsISUtilities.NotDataBound_ComboBox(this.cboMinShiftMinutes, "Select Minimum Mibnutes for a valid shift."); for (int intRow = 0; intRow < this.pvtDataSet.Tables["HOURS24"].Rows.Count; intRow++) { this.cboMinShiftHours.Items.Add(Convert.ToInt32(this.pvtDataSet.Tables["HOURS24"].Rows[intRow]["HOURS24_VALUE"]).ToString("00")); } for (int intRow = 0; intRow < this.pvtDataSet.Tables["MINUTE"].Rows.Count; intRow++) { this.cboMinShiftMinutes.Items.Add(Convert.ToInt32(this.pvtDataSet.Tables["MINUTE"].Rows[intRow]["MINUTE_VALUE"]).ToString("00")); } Load_CurrentForm_Records(); } catch (Exception eException) { clsISUtilities.ErrorHandler(eException); } }