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();
     }
 }
Beispiel #2
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();
        }