예제 #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 InitData()
        {
            string[] text;
            this.dtSignDate.DateTime = DateTime.Now;
            this.dtFromDate.DateTime = DateTime.Now;
            this.dtToDate.DateTime   = DateTime.Now;
            this.dtSignDate.DateTime = DateTime.Now;
            HRM_EMPLOYEE hRMEMPLOYEE = new HRM_EMPLOYEE();

            hRMEMPLOYEE.AddGridLookupEdit(this.glkEmployeeCode);
            hRMEMPLOYEE.AddGridLookupEdit(this.glkSignerCode);
            clsContractOption _clsContractOption = new clsContractOption();

            this.txtSigner.Text            = _clsContractOption.Signer;
            this.txtSignerNationality.Text = _clsContractOption.SignerNationality;
            this.txtSignerPosition.Text    = _clsContractOption.SignerPosition;


            this.txtCompany.Text      = "SAIGONACT";
            this.txtAddress.Text      = "Phan Văn Hớn";
            this.txtTel.Text          = "09099999999";
            this.txtContractName.Text = "Hợp đồng lao động";
            this.txtCreatePlace.Text  = "";

            foreach (DataRow row in (new DIC_SHIFT()).GetList().Rows)
            {
                TextEdit textEdit = this.txtWorkTime;
                text = new string[] { this.txtWorkTime.Text, row["ShiftName"].ToString(), " - ", row["ShiftCode"].ToString(), " (", null, null, null, null };
                DateTime dateTime = DateTime.Parse(row["BeginTime"].ToString());
                text[5]       = dateTime.ToShortTimeString();
                text[6]       = "->";
                dateTime      = DateTime.Parse(row["EndTime"].ToString());
                text[7]       = dateTime.ToShortTimeString();
                text[8]       = "); ";
                textEdit.Text = string.Concat(text);
            }
            DIC_SALARY_FORMULA dICSALARYFORMULA = new DIC_SALARY_FORMULA();

            dICSALARYFORMULA.Get();
            TextEdit textEdit1 = this.txtInsurance;

            text = new string[6];
            double socialInsurance1 = dICSALARYFORMULA.SocialInsurance1;

            text[0]          = socialInsurance1.ToString();
            text[1]          = " % BHXH, ";
            socialInsurance1 = dICSALARYFORMULA.HealthInsurance1;
            text[2]          = socialInsurance1.ToString();
            text[3]          = " % BHYT, ";
            socialInsurance1 = dICSALARYFORMULA.UnemploymentInsurance1;
            text[4]          = socialInsurance1.ToString();
            text[5]          = " % BHTN";
            textEdit1.Text   = string.Concat(text);
        }
예제 #4
0
        private void InitSalaryOvertimeColumn()
        {
            DIC_SALARY_FORMULA dICSALARYFORMULA = new DIC_SALARY_FORMULA();

            dICSALARYFORMULA.Get();
            if (!dICSALARYFORMULA.IsGroupSalaryOvertime)
            {
                this.bandSalaryOvertime.Visible = false;
            }
            else
            {
                this.bandSalaryOvertime.Visible = true;
            }
        }
예제 #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();
        }