private void frmEmployeeActivateSelection_Load(object sender, System.EventArgs e)
        {
            try
            {
                Pen3Pixels = new Pen(Color.Black, 3);
                Pen1Pixel  = new Pen(Color.Black, 1);

                clsISUtilities = new clsISUtilities(this, "busEmployeeActivateSelection");

                this.lblPayrollType.Paint    += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblEmployee.Paint       += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblChosenEmployee.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                clsISUtilities.Create_Calender_Control_From_TextBox(this.txtDate);

                clsISUtilities.NotDataBound_Date_TextBox(txtDate, "Capture Tax Effective Date.");
                clsISUtilities.NotDataBound_ComboBox(this.cboRunDate, "Select Tax Effective Date.");

                object[] objParm = new object[2];
                objParm[0] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo"));
                objParm[1] = AppDomain.CurrentDomain.GetData("FromProgramInd").ToString();

                pvtbytCompress = (byte[])clsISUtilities.DynamicFunction("Get_Form_Records", objParm);

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                pvtSalaryDateDataView = null;
                pvtSalaryDateDataView = new DataView(pvtDataSet.Tables["SalaryPrevDate"],
                                                     "COMPANY_NO = " + Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo")),
                                                     "",
                                                     DataViewRowState.CurrentRows);

                for (int intRow = 0; intRow < pvtDataSet.Tables["PayrollType"].Rows.Count; intRow++)
                {
                    this.dgvPayrollTypeDataGridView.Rows.Add(pvtDataSet.Tables["PayrollType"].Rows[intRow]["PAYROLL_TYPE_DESC"].ToString());
                }

                pvtblnPayrollTypeDataGridViewLoaded = true;

                if (dgvPayrollTypeDataGridView.Rows.Count > 0)
                {
                    this.Set_DataGridView_SelectedRowIndex(dgvPayrollTypeDataGridView, 0);
                    dgvPayrollTypeDataGridView.Refresh();
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
예제 #2
0
        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);
            }
        }