コード例 #1
0
 protected void cbxChonCanBo_Selected(object sender, DirectEventArgs e)
 {
     try
     {
         var id     = int.Parse(cbxChonCanBo.SelectedItem.Value);
         var hs     = RecordController.GetById(id);
         var hsTeam = TeamController.GetByRecordId(id);
         if (hs == null)
         {
             return;
         }
         txtEmployeeCode.Text = hs.EmployeeCode;
         txtBirthDate.Text    = hs.BirthDateVn;
         txtDepartment.Text   = hs.DepartmentName;
         txtPosition.Text     = hs.PositionName;
         txtJobTitle.Text     = hs.JobTitleName;
         txtIDNumber.Text     = hs.IDNumber;
         txtIDIssueDate.Text  = hs.IDIssueDate.ToString();
         txtTeam.Text         = hsTeam.TeamName;
         txtConstruction.Text = hsTeam.ConstructionName;
     }
     catch (Exception ex)
     {
         ExtNet.Msg.Alert("Thông báo từ hệ thống", "Có lỗi xảy ra khi chọn cán bộ: " + ex.Message).Show();
     }
 }
コード例 #2
0
        protected void InitWindowFluctuation(object sender, DirectEventArgs e)
        {
            int id;

            if (!int.TryParse(hdfKeyRecord.Text, out id) || id <= 0)
            {
                return;
            }
            var recordId   = int.Parse(hdfRecordId.Text);
            var hs         = RecordController.GetById(recordId);
            var hsTeam     = TeamController.GetByRecordId(recordId);
            var hsSalary   = SalaryDecisionController.GetCurrent(recordId);
            var hsContract = ContractController.GetByConditionRecord(recordId);

            if (hs != null)
            {
                cbxChonCanBo.SelectedItem.Text = hs.FullName;
                txtEmployeeCode.Text           = hs.EmployeeCode;
                txtDepartment.Text             = hs.DepartmentName;
                txtBirthDate.Text = hs.BirthDateVn;
                txtPosition.Text  = hs.PositionName;
            }

            txtTeam.Text            = hsTeam.TeamName;
            txtConstruction.Text    = hsTeam.ConstructionName;
            txtSalaryInsurance.Text = hsSalary.InsuranceSalary.ToString();
            txtInsuranceSubmit.Text = (hsSalary.InsuranceSalary * (decimal)0.32).ToString();
            txtContractNumber.Text  = hsContract.ContractNumber;
            if (hsContract.ContractDate != null)
            {
                txtContractDate.SelectedDate = (DateTime)hsContract.ContractDate;
            }
            if (hsContract.EffectiveDate != null)
            {
                txtEffectiveDate.SelectedDate = (DateTime)hsContract.EffectiveDate;
            }
            var fluc = hr_FluctuationInsuranceServices.GetById(Convert.ToInt32(hdfKeyRecord.Text));

            txtReason.Text = fluc.Reason;
            if (fluc.Type == false)
            {
                rbIncrease.Checked = true;
            }
            else
            {
                rbDecrease.Checked = true;
            }

            wdCreateFluctuation.Title = @"Cập nhật quyết định tăng giảm BHXH, BHYT, BHTN";
            wdCreateFluctuation.Show();
            hdfCommandName.Text = @"Update";
            hdfChonCanBo.Text   = hsTeam.RecordId.ToString();
        }
コード例 #3
0
        protected void InitWindowFluctuation(object sender, DirectEventArgs e)
        {
            int id;

            if (!int.TryParse(hdfKeyRecord.Text, out id) || id <= 0)
            {
                return;
            }
            var recordId = int.Parse(hdfRecordId.Text);
            var hs       = RecordController.GetById(recordId);
            var hsTeam   = TeamController.GetByRecordId(recordId);

            if (hs != null)
            {
                cbxChonCanBo.SelectedItem.Text = hs.FullName;
                txtEmployeeCode.Text           = hs.EmployeeCode;
                txtDepartment.Text             = hs.DepartmentName;
                txtBirthDate.Text = hs.BirthDateVn;
                txtPosition.Text  = hs.PositionName;
                txtJobTitle.Text  = hs.JobTitleName;
                txtIDNumber.Text  = hs.IDNumber;
                if (hs.IDIssueDate != null)
                {
                    txtIDIssueDate.SelectedDate = (DateTime)hs.IDIssueDate;
                }
            }

            if (hsTeam == null)
            {
                return;
            }
            txtTeam.Text         = hsTeam.TeamName;
            txtConstruction.Text = hsTeam.ConstructionName;
            var fluc = hr_FluctuationEmployeeServices.GetById(Convert.ToInt32(hdfKeyRecord.Text));

            txtReason.Text       = fluc.Reason;
            txtDate.SelectedDate = fluc.Date;
            if (fluc.Type == false)
            {
                rbIncrease.Checked = true;
            }
            else
            {
                rbDecrease.Checked = true;
            }

            wdCreateFluctuation.Title = @"Cập nhật quyết định tăng giảm nhân sự";
            wdCreateFluctuation.Show();
            hdfCommandName.Text = @"Update";
            hdfChonCanBo.Text   = hsTeam.RecordId.ToString();
        }
コード例 #4
0
 protected void cbxChonCanBo_Selected(object sender, DirectEventArgs e)
 {
     try
     {
         var id         = int.Parse(cbxChonCanBo.SelectedItem.Value);
         var hs         = RecordController.GetById(id);
         var hsTeam     = TeamController.GetByRecordId(id);
         var hsSalary   = SalaryDecisionController.GetCurrent(id);
         var hsContract = ContractController.GetByConditionRecord(id);
         if (hs == null)
         {
             return;
         }
         txtEmployeeCode.Text    = hs.EmployeeCode;
         txtBirthDate.Text       = hs.BirthDateVn;
         txtDepartment.Text      = hs.DepartmentName;
         txtPosition.Text        = hs.PositionName;
         txtTeam.Text            = hsTeam.TeamName;
         txtConstruction.Text    = hsTeam.ConstructionName;
         txtSalaryInsurance.Text = hsSalary.InsuranceSalary.ToString();
         if (hsSalary.InsuranceSalary != null)
         {
             txtInsuranceSubmit.Text = (hsSalary.InsuranceSalary * (decimal)0.32).ToString();
         }
         txtContractNumber.Text = hsContract.ContractNumber;
         if (hsContract.ContractDate != null)
         {
             txtContractDate.SelectedDate = (DateTime)hsContract.ContractDate;
         }
         if (hsContract.EffectiveDate != null)
         {
             txtEffectiveDate.SelectedDate = (DateTime)hsContract.EffectiveDate;
         }
     }
     catch (Exception ex)
     {
         ExtNet.Msg.Alert("Thông báo từ hệ thống", "Có lỗi xảy ra khi chọn cán bộ: " + ex.Message).Show();
     }
 }