コード例 #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult dlgResult = CustomMessageBox.Show("Are you sure you want to Delete this File?",
                                                               this.Text,
                                                               MessageBoxButtons.YesNo,
                                                               MessageBoxIcon.Warning);

                if (dlgResult == DialogResult.Yes)
                {
                    object[] objParm = new object[3];
                    objParm[0] = pvtintUserNo;
                    objParm[1] = pvtstrFileUploadDatetime;
                    objParm[2] = pvtstrFileName;

                    clsISUtilities.DynamicFunction("Delete_Record", objParm);

                    this.pvtUserFileDataview[pvtintUserFileDataGridViewRowIndex].Delete();

                    this.pvtDataSet.AcceptChanges();

                    this.Set_DataGridView_SelectedRowIndex(this.dgvUserDataGridView, this.Get_DataGridView_SelectedRowIndex(this.dgvUserDataGridView));
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #2
0
        private void frmConvertEmployeeType_Load(object sender, EventArgs e)
        {
            try
            {
                clsISUtilities = new clsISUtilities(this, "busConvertEmployeeType");

                this.lblEmployee.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblCostCentreSpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblPayrollType.Paint           += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblPayCategoryDesc.Paint       += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblPayCategorySelectDesc.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblNormalLeave.Paint           += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblNormalLeaveSelected.Paint   += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                pvtDataSet = new DataSet();

                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);

                Load_CurrentForm_Records();
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #3
0
        private void frmResetEmployeeTakeOn_Load(object sender, EventArgs e)
        {
            try
            {
                this.pvtint64CompanyNo = Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo"));

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

                this.lblPayrollType.Paint    += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblPayCategory.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);

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

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

                this.dgvPayrollTypeDataGridView.Rows.Add("Wages");
                this.dgvPayrollTypeDataGridView.Rows.Add("Salaries");
                this.dgvPayrollTypeDataGridView.Rows.Add("Time Attendance");

                this.pvtblnPayrollTypeDataGridViewLoaded = true;

                this.Set_DataGridView_SelectedRowIndex(this.dgvPayrollTypeDataGridView, 0);
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #4
0
        private void frmDataDownload_Load(object sender, System.EventArgs e)
        {
            try
            {
                clsISUtilities = new InteractPayroll.clsISUtilities(this, "busDataDownload");
                //Local
                clsISClientUtilities = new clsISClientUtilities(this, "busClientDataDownload");

                this.lblCostCentreSpreadsheetHeader.Paint         += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblSelectedCostCentreSpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblCostCentreDelete.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                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_New", objParm);

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                Load_CurrentForm_Records();
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #5
0
        private void btnTest_Click(object sender, EventArgs e)
        {
            try
            {
                double dblTest = 0;

                if (double.TryParse(this.txtIP1.Text, out dblTest) == false
                    | double.TryParse(this.txtIP2.Text, out dblTest) == false
                    | double.TryParse(this.txtIP3.Text, out dblTest) == false
                    | double.TryParse(this.txtIP4.Text, out dblTest) == false)
                {
                    CustomMessageBox.Show("Setup a Valid IP Number.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);

                    return;
                }
                else
                {
                    object[] obj = null;

                    string strOk = (string)clsISUtilities.DynamicFunction("Ping", obj);

                    if (strOk == "OK")
                    {
                        CustomMessageBox.Show("Communication Successful.", "Communication", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }
            }
            catch (Exception ex)
            {
                clsISUtilities.ErrorHandler(ex);
            }
        }
コード例 #6
0
        private void frmUserMenuAccess_Load(object sender, System.EventArgs e)
        {
            try
            {
                //This Must Replace TreeView First Row (Happens When GUI is Changed)
                //AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0yLjAuMC4w

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

                this.lblUserSpreadsheetHeader.Paint          += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblCompanySpreadsheetHeader.Paint       += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblMenuStructureSpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblMenuAccessSpreadsheetHeader.Paint    += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                Build_Menu_Structure();

                pvtDataSet = new DataSet();

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

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                Load_Users();
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #7
0
        private void frmTimeAttendanceCompany_Load(object sender, System.EventArgs e)
        {
            try
            {
                PayrollLinkDataGridViewCellStyle                    = new DataGridViewCellStyle();
                PayrollLinkDataGridViewCellStyle.BackColor          = Color.Magenta;
                PayrollLinkDataGridViewCellStyle.SelectionBackColor = Color.Magenta;

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

                this.lblCompanySpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                pvtDataSet = new DataSet();

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

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                Set_Form_For_Read();
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #8
0
        private void frmPublicHoliday_Load(object sender, System.EventArgs e)
        {
            try
            {
                clsISUtilities = new clsISUtilities(this, "busPublicHoliday");

                if (AppDomain.CurrentDomain.GetData("AccessInd").ToString() == "S")
                {
                    this.btnAll.Visible = true;
                }

                this.lblDescription.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

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

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(bytCompress);

                this.dgvPublicHolidayDataGridView.Columns[0].HeaderText = "Date (" + AppDomain.CurrentDomain.GetData("DateFormat").ToString() + ")";

                Load_CurrentForm_Records();

                Set_Form_For_Read();
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #9
0
        private void frmFileDownload_Load(object sender, EventArgs e)
        {
            try
            {
                clsISUtilities = new clsISUtilities(this, "busFileDownload");
                clsCrc32       = new clsCrc32();

                this.lblUserSpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblFileDesc.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                try
                {
                    //User For Time Attendance Client (Not Payroll / Time Attendance Internet)
                    miLinkedMenuItem = (ToolStripMenuItem)AppDomain.CurrentDomain.GetData("LinkedMenuItem");
                }
                catch
                {
                }

                pvtDataSet = new DataSet();

                if (AppDomain.CurrentDomain.GetData("AccessInd").ToString() != "S")
                {
                    this.btnDelete.Visible = false;
                    this.btnClose.Top      = this.btnDelete.Top;
                    this.grbToUser.Visible = false;
                }

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

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(bytCompress);

                for (int intRow = 0; intRow < pvtDataSet.Tables["User"].Rows.Count; intRow++)
                {
                    this.dgvUserDataGridView.Rows.Add(pvtDataSet.Tables["User"].Rows[intRow]["USER_ID"].ToString(),
                                                      pvtDataSet.Tables["User"].Rows[intRow]["SURNAME"].ToString(),
                                                      pvtDataSet.Tables["User"].Rows[intRow]["FIRSTNAME"].ToString(),
                                                      pvtDataSet.Tables["User"].Rows[intRow]["USER_NO"].ToString());
                }

                pvtblnUserDataGridViewLoaded = true;

                if (this.dgvUserDataGridView.Rows.Count > 0)
                {
                    this.Set_DataGridView_SelectedRowIndex(this.dgvUserDataGridView, 0);
                }
                else
                {
                    CustomMessageBox.Show("There are No Files to Download.", "File Download", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #10
0
        public void btnSave_Click(object sender, System.EventArgs e)
        {
            try
            {
                int intDataViewRow = 0;

                for (int intRow = 0; intRow < pvtEmployeeDataView.Count; intRow++)
                {
                    intDataViewRow = Convert.ToInt32(this.dgvEmployeesDataGridView[7, intRow].Value);

                    if (Convert.ToDouble(this.dgvEmployeesDataGridView[4, intRow].Value) == Convert.ToDouble(pvtEmployeeDataView[intDataViewRow]["PREV_NORMAL_LEAVE_DAYS"])
                        & Convert.ToDouble(this.dgvEmployeesDataGridView[5, intRow].Value) == Convert.ToDouble(pvtEmployeeDataView[intDataViewRow]["NORMAL_LEAVE_DAYS"])
                        & Convert.ToDouble(this.dgvEmployeesDataGridView[6, intRow].Value) == Convert.ToDouble(pvtEmployeeDataView[intDataViewRow]["SICK_LEAVE_DAYS"]))
                    {
                        continue;
                    }

                    pvtEmployeeDataView[intDataViewRow]["PREV_NORMAL_LEAVE_DAYS"] = Math.Round(Convert.ToDouble(this.dgvEmployeesDataGridView[4, intRow].Value), 2);
                    pvtEmployeeDataView[intDataViewRow]["NORMAL_LEAVE_DAYS"]      = Math.Round(Convert.ToDouble(this.dgvEmployeesDataGridView[5, intRow].Value), 2);
                    pvtEmployeeDataView[intDataViewRow]["SICK_LEAVE_DAYS"]        = Math.Round(Convert.ToDouble(this.dgvEmployeesDataGridView[6, intRow].Value), 2);
                }

                pvtTempDataSet = null;
                pvtTempDataSet = new DataSet();

                DataTable myDataTable = this.pvtDataSet.Tables["Employee"].Clone();
                pvtTempDataSet.Tables.Add(myDataTable);

                if (pvtEmployeeDataView != null)
                {
                    for (int intRow = 0; intRow < pvtEmployeeDataView.Count; intRow++)
                    {
                        if (pvtEmployeeDataView[intRow].Row.RowState == DataRowState.Modified)
                        {
                            pvtTempDataSet.Tables["Employee"].ImportRow(pvtEmployeeDataView[intRow].Row);
                        }
                    }
                }

                if (pvtTempDataSet.Tables["Employee"].Rows.Count > 0)
                {
                    //Compress DataSet
                    pvtbytCompress = clsISUtilities.Compress_DataSet(pvtTempDataSet);

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

                    clsISUtilities.DynamicFunction("Update_Record", objParm);
                }

                this.pvtDataSet.AcceptChanges();

                btnCancel_Click(sender, e);
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #11
0
        private void frmEmployeeLeaveTakeOn_Load(object sender, System.EventArgs e)
        {
            try
            {
                clsISUtilities = new clsISUtilities(this, "busEmployeeLeaveTakeOn");

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

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

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                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 (pvtDataSet.Tables["PayrollType"].Rows.Count > 0)
                {
                    this.Set_DataGridView_SelectedRowIndex(dgvPayrollTypeDataGridView, 0);
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #12
0
        private void frmCalender_Load(object sender, System.EventArgs e)
        {
            try
            {
                clsISUtilities = new clsISUtilities(this, "busCalender");

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

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                for (int intYear = 2007; intYear < DateTime.Now.Year + 2; intYear++)
                {
                    this.cboYear.Items.Add(intYear.ToString());
                }

                for (int intRow = 0; intRow < 6; intRow++)
                {
                    this.dgvCalenderDataGridView.Rows.Add("",
                                                          "",
                                                          "",
                                                          "",
                                                          "",
                                                          "",
                                                          "",
                                                          "",
                                                          "");
                }

                pvtblnCalenderDataGridViewLoaded = true;

                this.btnToday.Text = DateTime.Now.ToString(pvtstrDateFormat);

                SatSunDataGridViewCellStyle                    = new DataGridViewCellStyle();
                SatSunDataGridViewCellStyle.ForeColor          = Color.Navy;
                SatSunDataGridViewCellStyle.SelectionForeColor = Color.Navy;

                PublicHolidayDataGridViewCellStyle                    = new DataGridViewCellStyle();
                PublicHolidayDataGridViewCellStyle.ForeColor          = Color.Red;
                PublicHolidayDataGridViewCellStyle.SelectionForeColor = Color.Red;

                NormalDataGridViewCellStyle                    = new DataGridViewCellStyle();
                NormalDataGridViewCellStyle.ForeColor          = Color.Black;
                NormalDataGridViewCellStyle.SelectionForeColor = Color.Black;

                LightDataGridViewCellStyle                    = new DataGridViewCellStyle();
                LightDataGridViewCellStyle.ForeColor          = Color.Gray;
                LightDataGridViewCellStyle.SelectionForeColor = Color.Gray;

                Set_Date(DateTime.Now.ToString(pvtstrDateFormat));
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #13
0
        private void frmFileUpload_Load(object sender, EventArgs e)
        {
            try
            {
                clsISUtilities       = new clsISUtilities(this, "busFileUpload");
                clsISClientUtilities = new clsISClientUtilities(this, "busBackupRestoreClientDatabase");

                clsCrc32 = new clsCrc32();

                this.lblUserSpreadsheetHeader.Paint         += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblSelectedUserSpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblFilesHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                try
                {
                    //User For Time Attendance Client (Not Payroll / Time Attendance Internet)
                    miLinkedMenuItem = (ToolStripMenuItem)AppDomain.CurrentDomain.GetData("LinkedMenuItem");
                }
                catch
                {
                }

                pvtDataSet = new DataSet();

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

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(bytCompress);

                for (int intRow = 0; intRow < pvtDataSet.Tables["User"].Rows.Count; intRow++)
                {
                    this.dgvUserDataGridView.Rows.Add(pvtDataSet.Tables["User"].Rows[intRow]["USER_ID"].ToString(),
                                                      pvtDataSet.Tables["User"].Rows[intRow]["SURNAME"].ToString(),
                                                      pvtDataSet.Tables["User"].Rows[intRow]["FIRSTNAME"].ToString(),
                                                      pvtDataSet.Tables["User"].Rows[intRow]["USER_NO"].ToString());

                    if (pvtDataSet.Tables["User"].Rows.Count == 1)
                    {
                    }
                }

                pvtblnUserDataGridViewLoaded = true;

                if (this.dgvUserDataGridView.Rows.Count > 0)
                {
                    this.Set_DataGridView_SelectedRowIndex(this.dgvUserDataGridView, 0);
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #14
0
        private void Load_CurrentForm_Records()
        {
            try
            {
                object[] objParm = new object[2];
                objParm[0] = AppDomain.CurrentDomain.GetData("AccessInd").ToString();
                objParm[1] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("UserNo"));

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(bytCompress);

                this.Clear_DataGridView(this.dgvUserDataGridView);

                pvtblnUserDataGridViewLoaded = false;

                for (int intRowCount = 0; intRowCount < this.pvtDataSet.Tables["User"].Rows.Count; intRowCount++)
                {
                    this.dgvUserDataGridView.Rows.Add(this.pvtDataSet.Tables["User"].Rows[intRowCount]["USER_ID"].ToString(),
                                                      this.pvtDataSet.Tables["User"].Rows[intRowCount]["SURNAME"].ToString(),
                                                      this.pvtDataSet.Tables["User"].Rows[intRowCount]["FIRSTNAME"].ToString(),
                                                      this.pvtDataSet.Tables["User"].Rows[intRowCount]["USER_NO"].ToString());
                }

                pvtblnUserDataGridViewLoaded = true;

                if (this.dgvUserDataGridView.Rows.Count > 0)
                {
                    this.Set_DataGridView_SelectedRowIndex(this.dgvUserDataGridView, 0);
                }
                else
                {
                    this.btnOK.Enabled = false;
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #15
0
        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);
            }
        }
コード例 #16
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                DataSet TempDataSet = new DataSet();

                TempDataSet.Tables.Add(this.pvtDataSet.Tables["EtiEmployeeSave"].Clone());

                for (int intRow = 0; intRow < this.dgvEmployeeDataGridView.Rows.Count; intRow++)
                {
                    DataRow DataRow = TempDataSet.Tables["EtiEmployeeSave"].NewRow();

                    DataRow["EMPLOYEE_NO"]    = Convert.ToInt32(this.dgvEmployeeDataGridView[EmployeeNoCol, intRow].Value);
                    DataRow["ETI_MONTH"]      = Convert.ToInt32(this.dgvEmployeeDataGridView[EmployeeEtiMonthCol, intRow].Value);
                    DataRow["TOTAL_HOURS"]    = Convert.ToDecimal(this.dgvEmployeeDataGridView[EmployeeTotalHoursCol, intRow].Value);
                    DataRow["FACTOR"]         = Convert.ToDecimal(this.dgvEmployeeDataGridView[EmployeeFactorCol, intRow].Value);
                    DataRow["TOTAL_EARNINGS"] = Convert.ToDecimal(this.dgvEmployeeDataGridView[EmployeeTotalAmountCol, intRow].Value);
                    DataRow["ETI_EARNINGS"]   = Convert.ToDecimal(this.dgvEmployeeDataGridView[EmployeeEtiAmountCol, intRow].Value);
                    DataRow["ETI_VALUE"]      = Convert.ToDecimal(this.dgvEmployeeDataGridView[EmployeeEtiCalculatedCol, intRow].Value);

                    TempDataSet.Tables["EtiEmployeeSave"].Rows.Add(DataRow);
                }

                byte[] pvtbytCompress = clsISUtilities.Compress_DataSet(TempDataSet);

                object[] objParm = new object[5];
                objParm[0] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo"));
                objParm[1] = AppDomain.CurrentDomain.GetData("AccessInd").ToString();
                objParm[2] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("UserNo"));
                objParm[3] = Convert.ToDateTime(this.pvtDataSet.Tables["EtiRunDate"].Rows[intSelectedRowIndex]["ETI_RUN_DATE"]).ToString("yyyy-MM-dd");
                objParm[4] = pvtbytCompress;

                byte[] bytCompress = (byte[])clsISUtilities.DynamicFunction("Insert_Eti_Records", objParm, true);

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(bytCompress);

                cboEtiRunDate.Items.Clear();
                this.dgvEmployeeDataGridView.Rows.Clear();
                this.dgvEmployeeExcludedDataGridView.Rows.Clear();

                for (int intRow = 0; intRow < this.pvtDataSet.Tables["EtiRunDate"].Rows.Count; intRow++)
                {
                    cboEtiRunDate.Items.Add(Convert.ToDateTime(this.pvtDataSet.Tables["EtiRunDate"].Rows[intRow]["ETI_RUN_DATE"]).ToString("MMMM yyyy"));
                }

                this.btnSave.Enabled = false;
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #17
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                DataSet tempDataSet = new DataSet();

                tempDataSet.Tables.Add(pvtDataSet.Tables["Earning"].Clone());

                pvtEarningDataView = null;
                pvtEarningDataView = new DataView(this.pvtDataSet.Tables["Earning"],
                                                  "PAY_CATEGORY_NO = " + pvtintPayCategoryNo + " AND EMPLOYEE_NO = " + this.pvtintEmployeeNo,
                                                  "",
                                                  DataViewRowState.Added | DataViewRowState.ModifiedCurrent);

                for (int intRow = 0; intRow < pvtEarningDataView.Count; intRow++)
                {
                    tempDataSet.Tables["Earning"].ImportRow(pvtEarningDataView[intRow].Row);
                }

                tempDataSet.Tables.Add(pvtDataSet.Tables["Deduction"].Clone());

                pvtEarningDataView = null;
                pvtEarningDataView = new DataView(this.pvtDataSet.Tables["Deduction"],
                                                  "EMPLOYEE_NO = " + this.pvtintEmployeeNo,
                                                  "",
                                                  DataViewRowState.Added | DataViewRowState.ModifiedCurrent);

                for (int intRow = 0; intRow < pvtEarningDataView.Count; intRow++)
                {
                    tempDataSet.Tables["Deduction"].ImportRow(pvtEarningDataView[intRow].Row);
                }

                byte[] bytCompress = clsISUtilities.Compress_DataSet(tempDataSet);

                object[] objParm = new object[5];
                objParm[0] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo"));
                objParm[1] = pvtintPayCategoryNo;
                objParm[2] = pvtstrNormPaidPerPeriod;
                objParm[3] = pvtstrSickPaidPerPeriod;
                objParm[4] = bytCompress;

                clsISUtilities.DynamicFunction("Update_Employee_Earnings_Deductions", objParm);

                this.pvtDataSet.AcceptChanges();

                btnCancel_Click(null, e);
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #18
0
        private void btnOK_Click(object sender, System.EventArgs e)
        {
            try
            {
                if (this.txtPassword1.Text.Trim().ToUpper() == this.txtPassword2.Text.Trim().ToUpper())
                {
                    if (this.txtPassword1.Text.Trim() == "")
                    {
                        CustomMessageBox.Show("Enter Passwords", this.Text,
                                              MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                        this.txtPassword1.Focus();
                        return;
                    }
                }
                else
                {
                    CustomMessageBox.Show("Passwords are NOT the same", this.Text,
                                          MessageBoxButtons.OK, MessageBoxIcon.Exclamation);

                    this.txtPassword1.Focus();
                    return;
                }

                DialogResult dlgResult = CustomMessageBox.Show("Are you sure you want to Change your Password?",
                                                               this.Text,
                                                               MessageBoxButtons.YesNo,
                                                               MessageBoxIcon.Question);

                if (dlgResult == DialogResult.Yes)
                {
                    string strPassword        = this.txtPassword1.Text.Trim().ToUpper();
                    Int64  int64CurrentUserNo = Convert.ToInt64(AppDomain.CurrentDomain.GetData("UserNo"));

                    object[] objParm = new object[2];
                    objParm[0] = int64CurrentUserNo;
                    objParm[1] = strPassword;

                    clsISUtilities.DynamicFunction("Update_Password", objParm, true);

                    AppDomain.CurrentDomain.SetData("PasswordChanged", "Y");
                    AppDomain.CurrentDomain.SetData("NewPassword", strPassword);

                    this.Close();
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
        private void pbxHorzPage1_Click(object sender, System.EventArgs e)
        {
            try
            {
                object[] objParm = new object[6];
                objParm[0] = pvtint64CompanyNo;
                objParm[1] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("UserNo"));
                objParm[2] = 1;
                objParm[3] = pvtintNumberHorizontalPages;
                objParm[4] = pvtstrEmployeePrintOrder;
                objParm[5] = pvtblnByPayCategoryParameter;

                pvtbyteCompress = (byte[])clsISUtilities.DynamicFunction("Print_Horizontal_SpreadSheet_Page", objParm);

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbyteCompress);

                //Company DataTable
                DataTable myCompanyDataTable = pvtTempDataSet.Tables["Company"].Copy();

                pvtDataSet.Tables.Add(myCompanyDataTable);

                //CompanyHeaderDetails DataTable
                DataTable myCompanyHeaderDetailsDataTable = pvtTempDataSet.Tables["CompanyHeaderDetails"].Copy();

                pvtDataSet.Tables.Add(myCompanyHeaderDetailsDataTable);

                frmRptEarningsDeductionsSpreadSheet           = new frmRptEarningsDeductionsSpreadSheet(this, pvtDataSet, pvtblnConsolidate, pvtblnByPayCategoryParameter, 1, pvtintNumberHorizontalPages, pvtstrReportHeader, pvtstrEmployeePrintOrder, "S");
                frmRptEarningsDeductionsSpreadSheet.MdiParent = this.MdiParent;
                frmRptEarningsDeductionsSpreadSheet.Text      = this.Text;
                frmRptEarningsDeductionsSpreadSheet.Show();

                this.Hide();
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #20
0
        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);
            }
        }
コード例 #21
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            try
            {
                object[] objParm = new object[4];
                objParm[0] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo"));
                objParm[1] = pvtstrPayrollType;
                objParm[2] = pvtintPayCategoryNo;
                objParm[3] = pvtintPayCategoryShiftScheduleNo;

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                frmRptRoster = new frmRptRoster(pvtDataSet);

                frmRptRoster.ShowDialog();
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #22
0
        private void frmRptEti_Load(object sender, EventArgs e)
        {
            try
            {
                clsISUtilities = new clsISUtilities(this, "busRptEti");

                this.lblRunDate.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);


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

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                this.pvtblnDateDataGridViewLoaded = false;

                for (int intRow = 0; intRow < this.pvtDataSet.Tables["EtiRunDate"].Rows.Count; intRow++)
                {
                    this.dgvDateDataGridView.Rows.Add(Convert.ToDateTime(this.pvtDataSet.Tables["EtiRunDate"].Rows[intRow]["ETI_RUN_DATE"]).ToString("MMMM yyyy"),
                                                      Convert.ToDateTime(this.pvtDataSet.Tables["EtiRunDate"].Rows[intRow]["ETI_RUN_DATE"]).ToString("yyyy-MM-dd"));
                }

                this.pvtblnDateDataGridViewLoaded = true;

                if (this.dgvDateDataGridView.Rows.Count > 0)
                {
                    this.btnOK.Enabled = true;
                    this.Set_DataGridView_SelectedRowIndex(this.dgvDateDataGridView, 0);
                }
                else
                {
                    this.btnOK.Enabled = false;
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
            this.reportViewer.RefreshReport();
        }
コード例 #23
0
        private void frmEtiRun_Load(object sender, EventArgs e)
        {
            try
            {
                clsISUtilities = new clsISUtilities(this, "busEtiRun");

                EarnsTooMuchDataGridViewCellStyle                    = new DataGridViewCellStyle();
                EarnsTooMuchDataGridViewCellStyle.BackColor          = Color.Coral;
                EarnsTooMuchDataGridViewCellStyle.SelectionBackColor = Color.Coral;

                BeyondPeriodDataGridViewCellStyle                    = new DataGridViewCellStyle();
                BeyondPeriodDataGridViewCellStyle.BackColor          = Color.MediumTurquoise;
                BeyondPeriodDataGridViewCellStyle.SelectionBackColor = Color.MediumTurquoise;

                YoungerThanEighteenDataGridViewCellStyle                    = new DataGridViewCellStyle();
                YoungerThanEighteenDataGridViewCellStyle.BackColor          = Color.Lime;
                YoungerThanEighteenDataGridViewCellStyle.SelectionBackColor = Color.Lime;

                OlderThanThirtyDataGridViewCellStyle                    = new DataGridViewCellStyle();
                OlderThanThirtyDataGridViewCellStyle.BackColor          = Color.Plum;
                OlderThanThirtyDataGridViewCellStyle.SelectionBackColor = Color.Plum;

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

                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"));

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(bytCompress);

                this.lblEarnAmount.Text = "Earns More than R" + Convert.ToDecimal(this.pvtDataSet.Tables["EtiMaxAmount"].Rows[0]["MAX_ETI_AMOUNT"]).ToString("#####0.00");

                for (int intRow = 0; intRow < this.pvtDataSet.Tables["EtiRunDate"].Rows.Count; intRow++)
                {
                    cboEtiRunDate.Items.Add(Convert.ToDateTime(this.pvtDataSet.Tables["EtiRunDate"].Rows[intRow]["ETI_RUN_DATE"]).ToString("MMMM yyyy"));
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #24
0
        private void tmrDateLoad_Tick(object sender, System.EventArgs e)
        {
            try
            {
                tmrDateLoad.Enabled = false;

                object[] objParm = new object[1];
                objParm[0] = pvtstrType;

                clsISUtilities.DynamicFunction("Insert_Dates", objParm);

                this.Close();
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #25
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);
            }
        }
コード例 #26
0
        private void frmShiftSchedule_Load(object sender, EventArgs e)
        {
            try
            {
                clsISUtilities = new clsISUtilities(this, "busShiftSchedule");

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

                clsISUtilities.Create_Calender_Control_From_TextBox(this.txtFromDate);
                clsISUtilities.Create_Calender_Control_From_TextBox(this.txtToDate);

                clsISUtilities.NotDataBound_Date_TextBox(this.txtFromDate, "Enter From Date");
                clsISUtilities.NotDataBound_Date_TextBox(this.txtToDate, "Enter To 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);

                pvtblnPayrollTypeDataGridViewLoaded = false;

                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 (this.dgvPayrollTypeDataGridView.Rows.Count > 0)
                {
                    this.Set_DataGridView_SelectedRowIndex(this.dgvPayrollTypeDataGridView, 0);
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #27
0
        public void btnSave_Click(object sender, System.EventArgs e)
        {
            try
            {
                pvtTempDataSet = null;
                pvtTempDataSet = new DataSet();
                DataTable DataTable = this.pvtDataSet.Tables["Employee"].Clone();

                pvtTempDataSet.Tables.Add(DataTable);

                pvtEmployeeDataView = null;

                pvtEmployeeDataView = new DataView(pvtDataSet.Tables["Employee"],
                                                   "PAY_CATEGORY_TYPE = '" + this.dgvPayrollTypeDataGridView[0, this.Get_DataGridView_SelectedRowIndex(dgvPayrollTypeDataGridView)].Value.ToString().Substring(0, 1) + "'",
                                                   "EMPLOYEE_CODE",
                                                   DataViewRowState.ModifiedCurrent);

                for (int intRow = 0; intRow < pvtEmployeeDataView.Count; intRow++)
                {
                    pvtTempDataSet.Tables["Employee"].ImportRow(pvtEmployeeDataView[intRow].Row);
                }

                //Compress DataSet
                pvtbytCompress = clsISUtilities.Compress_DataSet(pvtTempDataSet);

                object[] objParm = new object[4];
                objParm[0] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("CompanyNo"));
                objParm[1] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("UserNo"));
                objParm[2] = pvtstrMenuId;
                objParm[3] = pvtbytCompress;

                clsISUtilities.DynamicFunction("Update_Employee_Link", objParm, true);

                this.pvtDataSet.AcceptChanges();

                btnCancel_Click(sender, e);
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #28
0
        private void frmTimeAttendanceDataDownload_Load(object sender, System.EventArgs e)
        {
            try
            {
                clsISUtilities = new InteractPayroll.clsISUtilities(this, "busDataDownload");
                //Local
                clsISClientUtilities = new clsISClientUtilities(this, "busClientDataDownload");

                miLinkedMenuItem = (ToolStripMenuItem)AppDomain.CurrentDomain.GetData("LinkedMenuItem");

                this.lblCompany.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblCostCentreSpreadsheetHeader.Paint         += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
                this.lblSelectedCostCentreSpreadsheetHeader.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                this.lblCostCentreDelete.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                object[] objParm = new object[2];
                objParm[0] = Convert.ToInt64(AppDomain.CurrentDomain.GetData("UserNo"));
                objParm[1] = "B";

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                for (int intRow = 0; intRow < this.pvtDataSet.Tables["Company"].Rows.Count; intRow++)
                {
                    this.dgvCompanyDataGridView.Rows.Add(this.pvtDataSet.Tables["Company"].Rows[intRow]["COMPANY_DESC"].ToString(),
                                                         intRow.ToString());
                }

                pvtblnCompanyDataGridViewLoaded = true;

                if (this.dgvCompanyDataGridView.Rows.Count > 0)
                {
                    this.Set_DataGridView_SelectedRowIndex(this.dgvCompanyDataGridView, 0);
                }
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }
コード例 #29
0
        private void frmFix_Load(object sender, EventArgs e)
        {
            clsISUtilities = new clsISUtilities(this, "busFix");

            Set_Form_For_Read();

            EmployeeNotLinkedDataGridViewCellStyle                    = new DataGridViewCellStyle();
            EmployeeNotLinkedDataGridViewCellStyle.BackColor          = Color.Yellow;
            EmployeeNotLinkedDataGridViewCellStyle.SelectionBackColor = Color.Yellow;

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

            this.lblCostCentre.Paint         += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
            this.lblSelectedCostCentre.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

            this.lblLeaveType.Paint         += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
            this.lblSelectedLeaveType.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

            this.lblOccupation.Paint         += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
            this.lblSelectedOccupation.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

            this.lblPayrollType.Paint       += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
            this.lblDescription.Paint       += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
            this.lblListEmployees.Paint     += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
            this.lblEmployeeLinked.Paint    += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);
            this.lblEmployeeNotLinked.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

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

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

            pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

            this.dgvPayrollTypeDataGridView.Rows.Add("Wages");
            this.dgvPayrollTypeDataGridView.Rows.Add("Salaries");

            pvtblnPayrollTypeDataGridViewLoaded = true;

            Load_CurrentForm_Records();
        }
コード例 #30
0
        private void frmOccupationDepartment_Load(object sender, EventArgs e)
        {
            try
            {
                clsISUtilities = new clsISUtilities(this, "busOccupationDepartment");

                this.lblDescription.Paint += new System.Windows.Forms.PaintEventHandler(clsISUtilities.Label_Paint);

                pvtstrMenuId = AppDomain.CurrentDomain.GetData("MenuId").ToString();

                if (pvtstrMenuId == "3A")
                {
                    this.Name = "frmOccupation";
                    this.lblDescription.Text = "Occupation";
                    pvtstrTableName          = "OCCUPATION";

                    clsISUtilities.NotDataBound_TextBox(this.txtOccupationDepartment, "Enter Occupation.");
                }
                else
                {
                    pvtstrTableName = "DEPARTMENT";

                    clsISUtilities.NotDataBound_TextBox(this.txtOccupationDepartment, "Enter Department.");
                }

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

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

                pvtDataSet = clsISUtilities.DeCompress_Array_To_DataSet(pvtbytCompress);

                Load_CurrentForm_Records();
            }
            catch (Exception eException)
            {
                clsISUtilities.ErrorHandler(eException);
            }
        }