예제 #1
0
        private void InitTimeKeeperColumn()
        {
            HRM_SALARY_TABLELIST hRMSALARYTABLELIST = new HRM_SALARY_TABLELIST();

            if (!hRMSALARYTABLELIST.Exist(this.m_Month, this.m_Year))
            {
                DIC_SALARY_FORMULA dICSALARYFORMULA = new DIC_SALARY_FORMULA();
                dICSALARYFORMULA.Get();
                if (dICSALARYFORMULA.OvertimeSaturdayType != 0)
                {
                    this.colOvertime200.Caption = "TC. T7 & Chủ nhật (h)";
                    this.colOvertime260.Caption = "TCĐ. T7 & Chủ nhật (h)";
                }
                else
                {
                    this.colOvertime200.Caption = "TC. Chủ nhật (h)";
                    this.colOvertime260.Caption = "TCĐ. Chủ nhật (h)";
                }
            }
            else
            {
                hRMSALARYTABLELIST.Get(this.m_Month, this.m_Year);
                if (hRMSALARYTABLELIST.OvertimeSaturdayType != 0)
                {
                    this.colOvertime200.Caption = "TC. T7 & Chủ nhật (h)";
                    this.colOvertime260.Caption = "TCĐ. T7 & Chủ nhật (h)";
                }
                else
                {
                    this.colOvertime200.Caption = "TC. Chủ nhật (h)";
                    this.colOvertime260.Caption = "TCĐ. Chủ nhật (h)";
                }
            }
        }
 private void CreateSalaryTabelList()
 {
     Options.SetWaitDialogCaption("Đang khởi tạo dữ liệu...");
     if ((new HRM_TIMEKEEPER_TABLELIST()).Exist(this.m_Month, this.m_Year))
     {
         HRM_SALARY_TABLELIST hRMSALARYTABLELIST = new HRM_SALARY_TABLELIST();
         DIC_SALARY_FORMULA   dICSALARYFORMULA   = new DIC_SALARY_FORMULA();
         dICSALARYFORMULA.Get();
         if (!hRMSALARYTABLELIST.Exist(this.m_Month, this.m_Year))
         {
             Guid guid = Guid.NewGuid();
             if (hRMSALARYTABLELIST.Insert(guid.ToString(), string.Concat("Tháng ", this.m_Month.ToString(), " - ", this.m_Year.ToString()), this.m_Month, this.m_Year, dICSALARYFORMULA.SocialInsurance, dICSALARYFORMULA.HealthInsurance, dICSALARYFORMULA.UnemploymentInsurance, dICSALARYFORMULA.SocialInsurance1, dICSALARYFORMULA.HealthInsurance1, dICSALARYFORMULA.UnemploymentInsurance1, dICSALARYFORMULA.OvertimeSaturdayType, false, false) == "OK")
             {
                 HRM_SALARY_ALLOWANCE.Create(guid.ToString(), true);
                 HRM_SALARY_INCOME.Create(guid.ToString());
                 HRM_SALARY.Create(0, "", guid.ToString(), string.Concat("Tháng ", this.m_Month.ToString(), " - ", this.m_Year.ToString()), this.m_Month, this.m_Year);
             }
             this.RaiseCreatedHandler();
         }
         Options.HideDialog();
     }
     else
     {
         MessageBox.Show("Bảng chấm công tháng này chưa được khởi tạo! Vui lòng tạo bảng chấm công trước khi thực hiện tính lương!");
         Options.HideDialog();
     }
 }
예제 #3
0
        private void UpdateEmployeeSalary()
        {
            HRM_TIMEKEEPER_TABLELIST hRMTIMEKEEPERTABLELIST = new HRM_TIMEKEEPER_TABLELIST();
            HRM_SALARY_TABLELIST     hRMSALARYTABLELIST     = new HRM_SALARY_TABLELIST();

            hRMSALARYTABLELIST.GetByID(this.m_SalaryTableListID);
            hRMTIMEKEEPERTABLELIST.Get(hRMSALARYTABLELIST.Month, hRMSALARYTABLELIST.Year);
            Guid timeKeeperTableListID = hRMTIMEKEEPERTABLELIST.TimeKeeperTableListID;

            HRM_SALARY.EmployeeUpdate(timeKeeperTableListID.ToString(), this.m_SalaryTableListID.ToString(), hRMSALARYTABLELIST.Month, hRMSALARYTABLELIST.Year, this.m_EmployeeCode);
        }
예제 #4
0
        private void UpdateEmployeeSalary()
        {
            HRM_TIMEKEEPER_TABLELIST hRMTIMEKEEPERTABLELIST = new HRM_TIMEKEEPER_TABLELIST();
            HRM_SALARY_TABLELIST     hRMSALARYTABLELIST     = new HRM_SALARY_TABLELIST();

            hRMTIMEKEEPERTABLELIST.Get(this.m_Month, this.m_Year);
            hRMSALARYTABLELIST.Get(this.m_Month, this.m_Year);
            string str = hRMTIMEKEEPERTABLELIST.TimeKeeperTableListID.ToString();
            Guid   salaryTableListID = hRMSALARYTABLELIST.SalaryTableListID;

            HRM_SALARY.EmployeeUpdate(str, salaryTableListID.ToString(), this.m_Month, this.m_Year, this.m_EmployeeCode);
        }
예제 #5
0
        protected override void ReCreate()
        {
            base.ReCreate();
            Options.SetWaitDialogCaption("Đang tính lại lương...");
            HRM_SALARY_TABLELIST hRMSALARYTABLELIST = new HRM_SALARY_TABLELIST();
            DIC_SALARY_FORMULA   dICSALARYFORMULA   = new DIC_SALARY_FORMULA();

            dICSALARYFORMULA.Get();
            hRMSALARYTABLELIST.Update(this.m_SalaryTableListID.ToString(), this.bbeName.EditValue.ToString(), this.m_Month, this.m_Year, dICSALARYFORMULA.SocialInsurance, dICSALARYFORMULA.HealthInsurance, dICSALARYFORMULA.UnemploymentInsurance, dICSALARYFORMULA.SocialInsurance1, dICSALARYFORMULA.HealthInsurance1, dICSALARYFORMULA.UnemploymentInsurance1, dICSALARYFORMULA.OvertimeSaturdayType, false, false);
            clsSalaryOption _clsSalaryOption = new clsSalaryOption();

            HRM_SALARY_ALLOWANCE.Create(this.m_SalaryTableListID.ToString(), _clsSalaryOption.IsAllowanceReCreate);
            HRM_SALARY_INCOME.Create(this.m_SalaryTableListID.ToString());
            HRM_SALARY.Create(this.m_Level, this.m_Code, this.m_SalaryTableListID.ToString(), this.bbeName.EditValue.ToString(), this.m_Month, this.m_Year);
            this.LoadGrid();
            Options.HideDialog();
        }
예제 #6
0
 protected override void LoadGrid()
 {
     try
     {
         base.LoadGrid();
         this.bbeName.EditValue = string.Concat("Tháng ", this.m_Month.ToString(), " - ", this.m_Year.ToString());
         this.lbSalaryName.Text = string.Concat("Bảng Tính Lương Tháng ", this.m_Month.ToString(), " - ", this.m_Year.ToString());
         HRM_SALARY hRMSALARY = new HRM_SALARY();
         this.gcList.DataSource = hRMSALARY.GetList(this.m_Level, this.m_Code, this.m_SalaryTableListID);
         HRM_SALARY_TABLELIST hRMSALARYTABLELIST = new HRM_SALARY_TABLELIST();
         hRMSALARYTABLELIST.Get(this.m_Month, this.m_Year);
         BandedGridColumn bandedGridColumn = this.colSocialInsurance;
         double           socialInsurance  = hRMSALARYTABLELIST.SocialInsurance;
         bandedGridColumn.Caption = string.Concat("BHXH (", socialInsurance.ToString(), "%)");
         BandedGridColumn bandedGridColumn1 = this.colHealthInsurance;
         socialInsurance           = hRMSALARYTABLELIST.HealthInsurance;
         bandedGridColumn1.Caption = string.Concat("BHYT (", socialInsurance.ToString(), "%)");
         BandedGridColumn bandedGridColumn2 = this.colUnemploymentInsurance;
         socialInsurance           = hRMSALARYTABLELIST.UnemploymentInsurance;
         bandedGridColumn2.Caption = string.Concat("BHTN (", socialInsurance.ToString(), "%)");
         BandedGridColumn bandedGridColumn3 = this.colInsurance;
         socialInsurance           = hRMSALARYTABLELIST.SocialInsurance + hRMSALARYTABLELIST.HealthInsurance + hRMSALARYTABLELIST.UnemploymentInsurance;
         bandedGridColumn3.Caption = string.Concat("BHXH, BHYT, BHTN (", socialInsurance.ToString(), "%)");
         BandedGridColumn bandedGridColumn4 = this.colSocialInsurance1;
         socialInsurance           = hRMSALARYTABLELIST.SocialInsurance1;
         bandedGridColumn4.Caption = string.Concat("BHXH (", socialInsurance.ToString(), "%)");
         BandedGridColumn bandedGridColumn5 = this.colHealthInsurance1;
         socialInsurance           = hRMSALARYTABLELIST.HealthInsurance1;
         bandedGridColumn5.Caption = string.Concat("BHYT (", socialInsurance.ToString(), "%)");
         BandedGridColumn bandedGridColumn6 = this.colUnemploymentInsurance1;
         socialInsurance           = hRMSALARYTABLELIST.UnemploymentInsurance1;
         bandedGridColumn6.Caption = string.Concat("BHTN (", socialInsurance.ToString(), "%)");
         BandedGridColumn bandedGridColumn7 = this.colInsurance1;
         socialInsurance           = hRMSALARYTABLELIST.SocialInsurance1 + hRMSALARYTABLELIST.HealthInsurance1 + hRMSALARYTABLELIST.UnemploymentInsurance1;
         bandedGridColumn7.Caption = string.Concat("BHXH, BHYT, BHTN (", socialInsurance.ToString(), "%)");
     }
     catch
     {
     }
     this.InitTimeKeeperColumn();
     this.InitSalaryPlusMinus();
 }
예제 #7
0
        private void CheckSalaryTableList()
        {
            HRM_SALARY_TABLELIST hRMSALARYTABLELIST = new HRM_SALARY_TABLELIST();

            if (hRMSALARYTABLELIST.Exist(this.m_Month, this.m_Year))
            {
                hRMSALARYTABLELIST.Get(this.m_Month, this.m_Year);
                this.m_SalaryTableListID = hRMSALARYTABLELIST.SalaryTableListID;
                this.m_IsLock            = hRMSALARYTABLELIST.IsLock;
                this.m_IsFinish          = hRMSALARYTABLELIST.IsFinish;
                this.Customize();
                this.LoadGrid();
            }
            else
            {
                if (this._exportControl != null)
                {
                    this._exportControl.DataSource = null;
                }
                this.m_IsLock            = false;
                this.m_IsFinish          = false;
                this.m_SalaryTableListID = Guid.Empty;
                this.Customize();
                LabelControl labelControl = this.lbSalaryName;
                string[]     str          = new string[] { "Dữ liệu tính lương tháng ", this.m_Month.ToString(), " - ", this.m_Year.ToString(), " này không tồn tại!" };
                labelControl.Text   = string.Concat(str);
                this.lbMessage.Text = "Dữ liệu tính lương tháng này không tồn tại trong cơ sở dữ liệu của chương trình!";
                if (!this.m_IsFirstLoad)
                {
                    this.m_IsFirstLoad = true;
                }
                else
                {
                    xfmSalaryTableListAdd _xfmSalaryTableListAdd = new xfmSalaryTableListAdd(this.m_Month, this.m_Year);
                    _xfmSalaryTableListAdd.Created += new xfmSalaryTableListAdd.CreateSuccess((object s) => this.Reload());
                    _xfmSalaryTableListAdd.ShowDialog();
                }
            }
        }