コード例 #1
0
        public DataTable GetListJustExpiration(int Level, string Code)
        {
            clsContractOption _clsContractOption = new clsContractOption();

            string[] strArrays = new string[] { "@Level", "@Code", "@NumberDayWarning" };
            object[] level     = new object[] { Level, Code, _clsContractOption.NumberDayWarning };
            return((new SqlHelper()).ExecuteDataTable("HRM_CONTRACT_GetListJustExpiration", strArrays, level));
        }
コード例 #2
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);
        }
コード例 #3
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            rptListContract _rptListContract;
            rptContract     _rptContract;
            xfmReport       _xfmReport = new xfmReport("Hợp Đồng Lao Động");

            if (this.m_Value == 1)
            {
                _rptListContract = new rptListContract(this.m_Level, this.m_Code, "0");
                _xfmReport.SetTitle("Danh Sách Tất Cả HĐLĐ Của Nhân Viên");
                _xfmReport.ShowPrintPreview(_rptListContract);
            }
            else if (this.m_Value == 2)
            {
                _rptListContract = new rptListContract(this.m_Level, this.m_Code, "1");
                _xfmReport.SetTitle("Danh Sách Nhân Viên Sắp Hết Hạn HĐLĐ");
                _xfmReport.ShowPrintPreview(_rptListContract);
            }
            else if (this.m_Value == 3)
            {
                _rptListContract = new rptListContract(this.m_Level, this.m_Code, "2");
                _xfmReport.SetTitle("Danh Sách Nhân Viên Đã Hết Hạn HĐLĐ");
                _xfmReport.ShowPrintPreview(_rptListContract);
            }
            else if (!(this.m_Value == 5 ? false : this.m_Value != 0))
            {
                _xfmReport.SetTitle("Hợp Đồng Lao Động");
                HRM_CONTRACT hRMCONTRACT = new HRM_CONTRACT();
                hRMCONTRACT.Get(this.m_ContractCode);
                clsContractOption _clsContractOption = new clsContractOption();

                // HD Xác định thoi hạn

                if (hRMCONTRACT.ContractType == 0)
                {
                    if (!(_clsContractOption.FilePath0 == ""))
                    {
                        _rptContract = new rptContract(this.m_ContractCode, this.m_EmployeeCode, _clsContractOption.FilePath0);
                        _xfmReport.ShowPrintPreview(_rptContract);
                    }
                    else
                    {
                        _xfmReport.ShowPrintPreview(new rptContract0(this.m_ContractCode, this.m_EmployeeCode));
                    }
                }

                // khong xác dinh thoi han
                else if (hRMCONTRACT.ContractType == 1)
                {
                    if (!(_clsContractOption.FilePath1 == ""))
                    {
                        _rptContract = new rptContract(this.m_ContractCode, this.m_EmployeeCode, _clsContractOption.FilePath1);
                        _xfmReport.ShowPrintPreview(_rptContract);
                    }
                    else
                    {
                        _xfmReport.ShowPrintPreview(new rptContract1(this.m_ContractCode, this.m_EmployeeCode));
                    }
                }
                else if (hRMCONTRACT.ContractType == 2)
                {
                    if (!(_clsContractOption.FilePath2 == ""))
                    {
                        _rptContract = new rptContract(this.m_ContractCode, this.m_EmployeeCode, _clsContractOption.FilePath2);
                        _xfmReport.ShowPrintPreview(_rptContract);
                    }
                    else
                    {
                        _xfmReport.ShowPrintPreview(new rptContract2(this.m_ContractCode, this.m_EmployeeCode));
                    }
                }
                else if (hRMCONTRACT.ContractType == 3)
                {
                    if (!(_clsContractOption.FilePath3 == ""))
                    {
                        _rptContract = new rptContract(this.m_ContractCode, this.m_EmployeeCode, _clsContractOption.FilePath3);
                        _xfmReport.ShowPrintPreview(_rptContract);
                    }
                    else
                    {
                        _xfmReport.ShowPrintPreview(new rptContract3(this.m_ContractCode, this.m_EmployeeCode));
                    }
                }
            }
            else if (this.m_Value == 6)
            {
                _rptListContract = new rptListContract(this.m_Level, this.m_Code, "6");
                _xfmReport.SetTitle("Danh Sách HĐLĐ Đang Quản Lý");
                _xfmReport.ShowPrintPreview(_rptListContract);
            }
        }