protected void btnUpdate_Click(object sender, EventArgs e) { try { var empInfo = new ArrayList(); EmployeeGeneralInfo empGeneralInfo = ctrlEmployeeGeneralInfo as EmployeeGeneralInfo; empGeneralInfo.UpdateEmpGeneralInfo(empInfo); CustomList <HRM_Emp> empList = (CustomList <HRM_Emp>)empInfo[0]; SetOfficialInfo(empList[0]); EmployeeAddressInformation empAddrInfo = ctrlEmployeeAddressInfo as EmployeeAddressInformation; empAddrInfo.UpdateEmpAddr(empInfo); CustomList <JobResponsibility> ResponsibilityList = JobResponsibilityList; empInfo.Add(ResponsibilityList); EmployeeEducationInformation empEdu = ctrlEmployeeEducationInfo as EmployeeEducationInformation; empEdu.SaveEmpEducationInfo(empInfo); EmpHistory empHist = ctrlEmpHistory as EmpHistory; empHist.Update(empInfo); EmpAttachmentInfo empFile = ctrlEmpAttachmentInfo as EmpAttachmentInfo; empFile.Update(empInfo); EmployeeHKInfoSave(empInfo); ucSalaryInfo empSalary = ctrlSalaryInfo as ucSalaryInfo; empSalary.Save(empInfo); ucLanguage empLanguage = ctrlLanguage as ucLanguage; empLanguage.Save(empInfo); CustomList <HRM_EmpFamDet> FamilyDetList = EmpFamDetList; empInfo.Add(FamilyDetList); CustomList <MedicalReinSetup> lstMedicalAllowance = MedicalAllowanceSetList; if (lstMedicalAllowance.Count == 0) { MedicalReinSetup newSetup = new MedicalReinSetup(); lstMedicalAllowance.Add(newSetup); } SetDataMedicalAllowance(ref lstMedicalAllowance); if (lstMedicalAllowance[0].FYKey == 0) { lstMedicalAllowance = new CustomList <MedicalReinSetup>(); } empInfo.Add(lstMedicalAllowance); _empManager.SaveEmployeeInfo(empInfo, "update"); this.SuccessMessage = (StaticInfo.UpdatedSuccessfullyMsg); } catch (Exception ex) { this.ErrorMessage = ex.Message; } }
public void SetDateFromObjToControl(string EmployeeCode) { //_RunnignEmpInfo= CustomList <LeaveTransApproved> _RunnignEmpInfo = manager.GetLeaveEligibleEmp(EmployeeCode); if (_RunnignEmpInfo.Count != 0) { txtEmployeeName.Text = _RunnignEmpInfo[0].EmpName; txtDesignation.Text = _RunnignEmpInfo[0].Designation; txtDOJ.Text = _RunnignEmpInfo[0].DOJ.ToShortDateString(); txtStaffCategory.Text = _RunnignEmpInfo[0].StaffCategory; txtLeaveRule.Text = _RunnignEmpInfo[0].LeaveRuleKey.ToString(); imgGarment.ImageUrl = ResolveUrl(_RunnignEmpInfo[0].EmpPicture); hfEmpKey.Value = _RunnignEmpInfo[0].EmpKey.ToString(); EmpFamDetList = manager.GetAllHRM_EmpFamDetByFamKey(_RunnignEmpInfo[0].EmpKey); MedicalReinSetup mASetup = manager.GetAllMedicalBalance(ddlFiscalYear.SelectedValue, _RunnignEmpInfo[0].EmpKey.ToString()); txtSelfLimit.Text = mASetup.SelfLimit.ToString() == "" || mASetup.SelfLimit == 0 ? "Unlimited" : mASetup.SelfLimit.ToString(); txtFamilyLimit.Text = mASetup.FamilyLimit.ToString(); txtSelfPaidAmount.Text = mASetup.SelfPaid.ToString(); txtFamilyPaidAmount.Text = mASetup.FamilyPaid.ToString(); txtFamilyBalance.Text = (mASetup.FamilyLimit - mASetup.FamilyPaid).ToString(); txtMaternityLimit.Text = mASetup.MaternityLimit.ToString(); txtMaternityConsume.Text = mASetup.MaternityPaid.ToString(); txtMaternityBalance.Text = (mASetup.MaternityLimit - mASetup.MaternityPaid).ToString(); _MedicalAllowanceTransList = manager.GetAllMedicalReinTrans(_RunnignEmpInfo[0].EmpKey.ToString(), ddlFiscalYear.SelectedValue); } }
private void SetDataMedicalAllowance(ref CustomList <MedicalReinSetup> lstMedicalAllowance) { try { if (ddlYear_nc.SelectedValue != "") { MedicalReinSetup objMedicalAllowance = lstMedicalAllowance[0]; objMedicalAllowance.FYKey = ddlYear_nc.SelectedValue.ToInt(); if (txtSelfLimit.Text != "" & txtSelfLimit.Text != "Unlimited") { objMedicalAllowance.SelfLimit = txtSelfLimit.Text.ToDecimal(); } if (txtFamilyLimit.Text != "") { objMedicalAllowance.FamilyLimit = txtFamilyLimit.Text.ToDecimal(); } objMedicalAllowance.Remarks = txtMedicalRemarks.Text; if (txtMaternityLimit.Text != "") { objMedicalAllowance.MaternityLimit = txtMaternityLimit.Text.ToDecimal(); } } } catch (Exception ex) { throw (ex); } }
private void PopulateMedicalInfo(MedicalReinSetup mAS) { try { txtSelfLimit.Text = mAS.SelfLimit.ToString() == "" || mAS.SelfLimit.ToString() == "0.00" ? "Unlimited" : mAS.SelfLimit.ToString(); txtFamilyLimit.Text = mAS.FamilyLimit.ToString(); txtMedicalRemarks.Text = mAS.Remarks; txtMaternityLimit.Text = mAS.MaternityLimit.ToString(); } catch (Exception ex) { throw (ex); } }
protected void btnSave_Click(object sender, EventArgs e) { try { TextBox empCodeTextBox = (TextBox)ctrlEmpSearch2.FindControl("txtSearch"); TextBox firstNameTextBox = (TextBox)ctrlEmployeeGeneralInfo.FindControl("txtFirstName"); string empCode = HRM_Emp.GetExistingEmp(firstNameTextBox.Text); if (empCode.IsNotNullOrEmpty()) { this.ErrorMessage = "Employee Name Already Exist!"; return; } var empInfo = new ArrayList(); EmployeeGeneralInfo empGeneralInfo = ctrlEmployeeGeneralInfo as EmployeeGeneralInfo; empGeneralInfo.SaveEmpGeneralInfo(empInfo); CustomList <HRM_Emp> empList = (CustomList <HRM_Emp>)empInfo[0]; SetOfficialInfo(empList[0]); EmployeeAddressInformation empAddrInfo = ctrlEmployeeAddressInfo as EmployeeAddressInformation; empAddrInfo.SaveEmpAddr(empInfo); CustomList <JobResponsibility> ResponsibilityList = JobResponsibilityList; empInfo.Add(ResponsibilityList); EmployeeEducationInformation empEdu = ctrlEmployeeEducationInfo as EmployeeEducationInformation; empEdu.SaveEmpEducationInfo(empInfo); EmpHistory empHist = ctrlEmpHistory as EmpHistory; empHist.Save(empInfo); EmpAttachmentInfo empFile = ctrlEmpAttachmentInfo as EmpAttachmentInfo; empFile.Save(empInfo); EmployeeHKInfoSave(empInfo); ucSalaryInfo empSalary = ctrlSalaryInfo as ucSalaryInfo; empSalary.Save(empInfo); ucLanguage empLanguage = ctrlLanguage as ucLanguage; empLanguage.Save(empInfo); CustomList <HRM_EmpFamDet> FamilyDetList = EmpFamDetList; empInfo.Add(FamilyDetList); //Medical CustomList <MedicalReinSetup> lstMedicalAllowanceSetup = new CustomList <MedicalReinSetup>(); MedicalReinSetup newMedicalAllowance = new MedicalReinSetup(); lstMedicalAllowanceSetup.Add(newMedicalAllowance); SetDataMedicalAllowance(ref lstMedicalAllowanceSetup); if (lstMedicalAllowanceSetup[0].FYKey == 0) { lstMedicalAllowanceSetup = new CustomList <MedicalReinSetup>(); } empInfo.Add(lstMedicalAllowanceSetup); //End _empManager.SaveEmployeeInfo(empInfo); this.SuccessMessage = (StaticInfo.SavedSuccessfullyMsg); this.btnSave.Visible = false; this.btnUpdate.Visible = true; } catch (Exception ex) { this.ErrorMessage = ex.Message; } }
public MedicalReinSetup GetAllMedicalBalance(string fyKey, string empKey) { return(MedicalReinSetup.GetAllMedicalBalance(fyKey, empKey)); }
public CustomList <MedicalReinSetup> GetAllMedicalReinSetup(string fyKey, string empKey) { return(MedicalReinSetup.GetAllMedicalReinSetup(fyKey, empKey)); }