private void xucSalaryCard1_Updated_1(object sender) { HRM_SALARY hRMSALARY = new HRM_SALARY(); hRMSALARY.Get(this.m_SalaryTableListID, this.m_EmployeeCode); this.UpdateRow(hRMSALARY); }
//private void SendMail(string Content, bool Attach) //{ // if (Content == "") // { // Content = this.LoadMailContent(); // } // if (!(this.l_Employee.Email == "")) // { // clsOptionPrintSalary _clsOptionPrintSalary = new clsOptionPrintSalary(); // XtraReport xtraReport = new XtraReport(); // if (_clsOptionPrintSalary.Theme == 0) // { // xtraReport = new rptSalary(this.m_Month, this.m_Year, this.m_EmployeeCode); // } // else if (_clsOptionPrintSalary.Theme != 1) // { // xtraReport = new rptSalary3(this.m_Month, this.m_Year, this.m_EmployeeCode); // } // else // { // xtraReport = new rptSalary2(this.m_Month, this.m_Year, this.m_EmployeeCode); // } // SendReportMail sendReportMail = new SendReportMail(); // string str = ""; // str = (!this.l_Employee.Sex ? "Chị" : "Anh"); // string str1 = Content.Replace("[Mã nhân viên]", this.m_EmployeeCode); // str1 = str1.Replace("[Họ lót]", this.l_Employee.FirstName); // str1 = str1.Replace("[Tên]", this.l_Employee.LastName); // string[] strArrays = new string[5]; // int birthdayDay = this.l_Employee.BirthdayDay; // strArrays[0] = birthdayDay.ToString(); // strArrays[1] = "/"; // birthdayDay = this.l_Employee.BirthdayMonth; // strArrays[2] = birthdayDay.ToString(); // strArrays[3] = "/"; // birthdayDay = this.l_Employee.BirthdayYear; // strArrays[4] = birthdayDay.ToString(); // str1 = str1.Replace("[Ngày sinh]", string.Concat(strArrays)); // str1 = str1.Replace("[Giới tính]", str); // str1 = str1.Replace("[Nơi sinh]", this.l_Employee.BirthPlace); // str1 = str1.Replace("[Địa chỉ]", this.l_Employee.MainAddress); // str1 = str1.Replace("[Tạm trú]", this.l_Employee.ContactAddress); // str1 = str1.Replace("[CMND]", this.l_Employee.IDCard); // str1 = str1.Replace("[Email]", this.l_Employee.Email); // str1 = str1.Replace("[Điện thoại]", this.l_Employee.CellPhone); // str1 = str1.Replace("[Chức vụ]", this.l_Employee.Position); // str1 = str1.Replace("[Chi nhánh]", this.l_Employee.BranchName); // str1 = str1.Replace("[Phòng ban]", this.l_Employee.DepartmentName); // str1 = str1.Replace("[Tổ nhóm]", this.l_Employee.GroupName); // decimal basicSalary = this.l_Employee.BasicSalary; // str1 = str1.Replace("[Lương căn bản]", basicSalary.ToString("#,0")); // str1 = str1.Replace("[Tháng]", this.m_Month.ToString()); // str1 = str1.Replace("[Năm]", this.m_Year.ToString()); // str1 = str1.Replace("[Xuống dòng]", "<br/>"); // sendReportMail.Send(this.l_Employee.Email, string.Concat(MyLogin.Account, " - ", MyInfo.Company), string.Concat("Phiếu Lương Tháng ", this.m_Month.ToString(), "/", this.m_Year.ToString()), str1, xtraReport, string.Concat(this.l_Employee.EmployeeCode, "_", this.m_Month.ToString(), this.m_Year.ToString()), Attach); // } // else // { // XtraMessageBox.Show("Chưa thiết lập địa chỉ email cho nhân viên này!"); // } //} public void SetData(Guid SalaryTableListID, string EmployeeCode, int Month, int Year) { this.m_SalaryTableListID = SalaryTableListID; this.m_EmployeeCode = EmployeeCode; this.m_Month = Month; this.m_Year = Year; this.l_Employee.Get(this.m_EmployeeCode); TextEdit textEdit = this.txtID; string employeeCode = this.l_Employee.EmployeeCode; string str = employeeCode; this.m_EmployeeCode = employeeCode; textEdit.Text = str; this.txtName.Text = string.Concat(this.l_Employee.FirstName.ToString(), " ", this.l_Employee.LastName.ToString()); this.imgPhoto.Image = this.l_Employee.Photo; HRM_SALARY hRMSALARY = new HRM_SALARY(); hRMSALARY.Get(SalaryTableListID, EmployeeCode); this.calCoefficientSalary.EditValue = hRMSALARY.CoefficientSalary; this.calBasicSalary.EditValue = hRMSALARY.BasicSalary; this.txtWorkHour.Text = hRMSALARY.WorkHour.ToString(); this.calMinusMoney.EditValue = hRMSALARY.MinusLateEarly + hRMSALARY.MinusMoney; this.calAllowance.EditValue = hRMSALARY.Allowance; this.calWorkSalary.EditValue = hRMSALARY.WorkSalary; this.calSocialInsurance.EditValue = hRMSALARY.SocialInsurance; this.calHealthInsurance.EditValue = hRMSALARY.HealthInsurance; this.calUnemploymentInsurance.EditValue = hRMSALARY.UnemploymentInsurance; this.calAdvance.EditValue = hRMSALARY.Advance; this.calIncomeTaxMoney.EditValue = hRMSALARY.IncomeTaxMoney; this.calSalary.EditValue = hRMSALARY.Salary; this.calSalaryPay.EditValue = hRMSALARY.SalaryPay; this.calSalaryDebt.EditValue = hRMSALARY.SalaryDebt; if (this.xucSalaryAllowanceByEmployee != null) { this.xucSalaryAllowanceByEmployee.Init(this.m_SalaryTableListID, this.m_EmployeeCode); } if (this.xucAdvance != null) { this.xucAdvance.Init(this.m_EmployeeCode, this.m_Month, this.m_Year); } if (this.xucSalaryPayByEmployee != null) { this.xucSalaryPayByEmployee.Init(this.m_SalaryTableListID, this.m_EmployeeCode); } if (this.xucSalaryDebitByEmployee != null) { this.xucSalaryDebitByEmployee.Init(this.m_SalaryTableListID, this.m_EmployeeCode); } if (this.xucAssignment != null) { this.xucAssignment.Init(this.m_EmployeeCode, this.m_Month, this.m_Year); } if (this.xucSalaryMinus != null) { this.xucSalaryMinus.Init(this.m_SalaryTableListID, this.m_EmployeeCode); } if (this.xucSalaryPlus != null) { this.xucSalaryPlus.Init(this.m_SalaryTableListID, this.m_EmployeeCode); } }