protected void btnDelete_Delete(object sender, EventArgs e) { List <HRM_PersonalInformations> personales = new List <HRM_PersonalInformations>(); try { for (int i = 0; i < grdviewsseletedEmployee.Rows.Count; i++) { HRM_PersonalInformations personalInfo = new HRM_PersonalInformations(); Label lblRegion = (Label)grdviewsseletedEmployee.Rows[i].FindControl("lblResion"); Label lblOffice = (Label)grdviewsseletedEmployee.Rows[i].FindControl("lblOfficeId"); Label lblDepartment = (Label)grdviewsseletedEmployee.Rows[i].FindControl("lblDepartmentId"); personalInfo.RegionsId = Convert.ToInt32(lblRegion.Text); personalInfo.OfficeId = Convert.ToInt32(lblOffice.Text); personalInfo.DepartmentId = Convert.ToInt32(lblDepartment.Text); personalInfo.EID = grdviewsseletedEmployee.Rows[i].Cells[4].Text; personalInfo.FirstName = grdviewsseletedEmployee.Rows[i].Cells[5].Text; personalInfo.LastName = grdviewsseletedEmployee.Rows[i].Cells[6].Text; personalInfo.ContactNumber = grdviewsseletedEmployee.Rows[i].Cells[7].Text; personales.Add(personalInfo); } Button btn = (Button)sender; GridViewRow gvr = (GridViewRow)btn.NamingContainer; int rowIndex = gvr.RowIndex; personales.RemoveAt(rowIndex); grdviewsseletedEmployee.DataSource = personales; grdviewsseletedEmployee.DataBind(); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } }
protected void btnNomineeUpdate_Click(object sender, EventArgs e) { HRM_PersonalInformations personalInfo = new HRM_PersonalInformations(); string employeeId = ""; try { employeeId = Convert.ToString(Session["EID"]); personalInfo.NomineeName = txtbxNomineeName.Text.Trim(); personalInfo.NomineeAge = txtbxAge.Text; personalInfo.NomineeRelation = txtbxRelation.Text.Trim(); //Addresss int result = empSetupDal.UpdateNomineeInfoPersonalInfo(personalInfo, employeeId); if (result == 1) { lblNomineeMessage.Text = "Data Update Successfully."; GetPersonalInfo(employeeId); ModalPopupExtender3.Hide(); } else { } } catch (Exception) { throw; } }
protected void btnAssignTo_Click(object sender, EventArgs e) { try { HRM_PersonalInformations personalInfo = new HRM_PersonalInformations(); string EmployeeId = Convert.ToString(Session["EID"]); personalInfo.ReportingBossId = ddlReportingTo.SelectedValue.ToString(); personalInfo.SecondReportingBossId = drpSecondReportingTo.SelectedValue.ToString(); personalInfo.ThirdReportingBossId = drpdwnThirdReportingBoss.SelectedValue.ToString(); if (EmployeeId != null) { int result = employeeSetUpBll.InsertPersonalInfoAssignTo(EmployeeId, personalInfo); if (result == 1) { lblAssignTo.Text = "Data Save Successfully."; } } } catch (Exception) { throw; } }
protected void txtEIdNo_TextChanged(object sender, EventArgs e) { try { //string eid = ((SessionUser)Session["SessionUser"]).EID; string eid = txtEIdNo.Text; HRM_PersonalInformations personal = employeeSetUpDal.GetEmployeeGender(eid); if (personal.Gender == "Female") { getLeaveCode(); getApplicantInfo(); GetMaternityLeaveInfo(); lblDateApplied.Text = DateTime.Now.ToString("dd/MM/yyyy"); GetMaternityLeaveInfoForList(); } else { System.Text.StringBuilder sb = new System.Text.StringBuilder(); sb.Append("<script type = 'text/javascript'>"); sb.Append("window.onload=function(){"); sb.Append("alert('"); sb.Append("You are not able to Apply !"); sb.Append("')};"); sb.Append("</script>"); ClientScript.RegisterClientScriptBlock(this.GetType(), "alert", sb.ToString()); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } }
private void GetEmployeeAttendence() { EMPOYEE_BLL _employeedetailsbll = new EMPOYEE_BLL(); try { string id = ((SessionUser)Session["SessionUser"]).EID; HRM_PersonalInformations _employeeDetailsr = _employeedetailsbll.GetEmployeeDetails(id); string status = "All"; DateTime Date = DateTime.Now; // string StartDate = startdate.ToString("MM/dd/yyyy"); string StartDate = Date.AddMonths(-1).ToString("MM/dd/yyyy"); string endDate = Date.AddDays(-1).ToString("MM/dd/yyyy"); var _employeeAttends = _employeedetailsbll.GetEmployeeAttend(id, status, StartDate, endDate); if (_employeeAttends != null) { lblTotalPresent.Text = _employeeAttends.TotalPresent.ToString(); lblTotalAbsent.Text = _employeeAttends.TotalAbsent.ToString(); lblTotalLate.Text = _employeeAttends.TotalLate.ToString(); lblTotalLeave.Text = _employeeAttends.TotalLeave.ToString(); lblTOtlaOt.Text = _employeeAttends.TotalOT.ToString(); } } catch (Exception) { throw; } }
private void LoadTransferToAlldrp(string Eid) { try { HRM_PersonalInformations _personalInformation = objEmp_BLL.GetPersonalInfoByEID(Eid); if (_personalInformation != null) { ddlRegion_TR.SelectedValue = _personalInformation.RegionsId.ToString(); PopulateOffice(_personalInformation.RegionsId); ddlOffice_TR.SelectedValue = _personalInformation.OfficeId.ToString(); GetAllDepartment(_personalInformation.OfficeId); ddlDepartment_TR.SelectedValue = _personalInformation.DepartmentId.ToString(); GetAllSection(_personalInformation.DepartmentId); ddlSection_TR.SelectedValue = _personalInformation.SectionId.ToString(); GetAllSubSection(_personalInformation.SectionId); ddlSubSec_TR.SelectedValue = _personalInformation.SubSectionId.ToString(); string DesignationName = GetDesignationNameById(Convert.ToInt32(_personalInformation.DesginationId)); drpdwnDesigantion.SelectedValue = DesignationName; GetGrade(DesignationName); ddlGrade.SelectedValue = _personalInformation.Grade.ToString(); txtbxGarde.Text = _personalInformation.Grade.ToString(); string Grade = _personalInformation.Grade.ToString(); GetSalary(Grade, DesignationName); drpGrossSalary.SelectedValue = _personalInformation.Salary.ToString(); txtbxGrossSalary.Text = _personalInformation.Salary.ToString(); // BindGridEmployeeTransfer(); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } }
private string ServiceDays(HRM_PersonalInformations _employeeDetailsr) { int years = -1, months = -1, days = -1; DateTime birthDate = Convert.ToDateTime(_employeeDetailsr.JoiningDate); return(TimeSpanToDate(DateTime.Now, birthDate, out years, out months, out days)); }
private void GetEmployeeDetails() { EMPOYEE_BLL _employeedetailsbll = new EMPOYEE_BLL(); try { string id = ((SessionUser)Session["SessionUser"]).EID; HRM_PersonalInformations _employeeDetailsr = _employeedetailsbll.GetEmployeeDetails(id); if (_employeeDetailsr != null) { lblServiceAge.Text = ServiceDays(_employeeDetailsr); DateTime join = Convert.ToDateTime(_employeeDetailsr.JoiningDate); lblJoinDate.Text = join.ToString("MM/dd/yyyy"); DateTime DOB = Convert.ToDateTime(_employeeDetailsr.DateOfBrith); lblDOB.Text = DOB.ToString("MM/dd/yyyy"); lblBloodGroup.Text = _employeeDetailsr.BloodGroup.ToString(); lblFather.Text = _employeeDetailsr.FatherName.ToString(); lblMother.Text = _employeeDetailsr.MotherName.ToString(); } } catch (Exception) { throw; } }
//-------Insert------------------------------------ public int SaveEmployee_Transfer(HRM_EMP_TRANSFER objTrns, string employeeID) { try { //---------------Update Employee Master----------------- HRM_PersonalInformations objEmpUpdate = _context.HRM_PersonalInformations.First(x => x.EID == employeeID); objEmpUpdate.RegionsId = objTrns.Regions_ID_TO; objEmpUpdate.OfficeId = objTrns.Office_ID_TO; objEmpUpdate.DepartmentId = objTrns.DPT_ID_TO; objEmpUpdate.SectionId = objTrns.SEC_ID_TO; objEmpUpdate.SubSectionId = objTrns.SUB_SEC_ID_TO; objEmpUpdate.DesginationId = objTrns.DEG_ID_TO; objEmpUpdate.Grade = objTrns.GradeTo; objEmpUpdate.Salary = objTrns.GorssSalaryTo; objEmpUpdate.EMP_TRANSFER_STATUS = true; _context.SaveChanges(); _context.HRM_EMP_TRANSFER.AddObject(objTrns); _context.SaveChanges(); return(1); } catch (Exception ex) { throw ex; } }
protected void btnImmediateRelative_Click(object sender, EventArgs e) { try { string employeeid = Convert.ToString(Session["EID"]); HRM_PersonalInformations personalObj = employeeBll.getPersonalInfosByID(employeeid); txtbxFatherName.Text = personalObj.FatherName; txtbxFatherAge.Text = personalObj.FatherAge; txtbxFatherProfession.Text = personalObj.FatherProfession; txtbxMotherName.Text = personalObj.MotherName; txtbxMotherAge.Text = personalObj.MotherAge; txtbxMotherProfession.Text = personalObj.MotherProfession; txtbxSpourseName.Text = personalObj.SpouseName; txtbxSpourseAge.Text = personalObj.SpouseAge; txtbxSpourseProfession.Text = personalObj.SpouseProfession; txtbxNumberOfChilldren.Text = personalObj.NumberOfChildren; txtbxChildrenNameRemark.Text = personalObj.ChildrenNameRemark; //Button4.Visible = true; btnTraingUpdateAndSumit.Visible = true; ModalPopupExtender2.Show(); } catch (Exception) { throw; } }
protected void ContactInfo_Click(object sender, EventArgs e) { HRM_PersonalInformations personalInfo = new HRM_PersonalInformations(); string employeeId = ""; try { employeeId = Convert.ToString(Session["EID"]); personalInfo.ContactNumber = txtbxContactNo.Text.Trim(); personalInfo.PresentAddress = txtbxPresentAddress.Text.Trim(); personalInfo.PermanenAddress = txtbxPermanentAddress.Text.Trim(); personalInfo.EmergencyContactPerson = txtbxEmergenceContactPerson.Text.Trim(); personalInfo.ContactPersonRelationName = txtbxEmergenceContactRelation.Text.Trim(); personalInfo.EmergencyContactNo = txtbxEmergenceContact.Text; personalInfo.EmergencyAddress = txtbxEmergenceContactAddress.Text; personalInfo.AlternativEmailAddress = txtbxAllternativeEmail.Text; personalInfo.Email = txtbxEmail.Text; int result = empSetupDal.UpdateConactInfoPersonalInfo(personalInfo, employeeId); if (result == 1) { lblContactMessage.Text = "Data Update Successfully."; GetPersonalInfo(employeeId); } else { } } catch (Exception) { throw; } }
private void getImage() { HRM_PersonalInformations personalInfo = new HRM_PersonalInformations(); GlobalClass.employeeID = personalInfo.EID = Convert.ToString(Session["EID"]); string OCODE = personalInfo.OCODE = ((SessionUser)Session["SessionUser"]).OCode; Emp_IMG_TRNS.ImageUrl = "EmployeeIMG.ashx?eId=" + GlobalClass.employeeID + "&oCode=" + OCODE; }
private void GetSignature() { HRM_PersonalInformations personalInfo = new HRM_PersonalInformations(); GlobalClass.employeeID = personalInfo.EID = Convert.ToString(Session["EID"]); string OCODE = personalInfo.OCODE = ((SessionUser)Session["SessionUser"]).OCode; imgSinature.ImageUrl = "EmployeeSignature.ashx?eId=" + GlobalClass.employeeID + "&oCode=" + OCODE; }
private void UpdatePersonalInfo(HRM_SalaryUpdate objEmp) { HRM_PersonalInformations _personalInfo = _context.HRM_PersonalInformations.Where(x => x.EID == objEmp.EID).FirstOrDefault(); _personalInfo.Salary = objEmp.CurrendSalary; _personalInfo.Grade = objEmp.Grade; _personalInfo.DesginationId = objEmp.DegID; _context.SaveChanges(); }
protected void btnUpdate_click(object sender, EventArgs e) { HRM_PersonalInformations personalInfo = new HRM_PersonalInformations(); string OCODE = ((SessionUser)Session["SessionUser"]).OCode; EmployeeSetup_BLL employeeSetUpBll = new EmployeeSetup_BLL(); string Requested_Eid = txtbxMachineID.Text; string employeeId = ""; try { bool status = true; if (hidMachineId.Value != txtbxMachineID.Text.Trim()) { GlobalClass.IsEidValid = employeeSetUpBll.CheckBioIDExitance(OCODE, Requested_Eid); if (GlobalClass.IsEidValid > 0) { status = false; } } if (status) { employeeId = Convert.ToString(Session["EID"]); personalInfo.FirstName = txtbxFirstName.Text.Trim(); personalInfo.LastName = txtbxLastName.Text.Trim(); personalInfo.Gender = ddlGender.Text.Trim(); personalInfo.DateOfBrith = Convert.ToDateTime(txtbxdateOfBrith.Text); personalInfo.BloodGroup = ddlBloodGrp.Text.Trim(); personalInfo.MaritalStatus = ddlMariedSts.Text; personalInfo.Religion = ddlReligion.Text; personalInfo.BIO_MATRIX_ID = txtbxMachineID.Text.Trim(); personalInfo.Nationality = ddlNationality.Text; personalInfo.NationalID = txtbxNId.Text; int result = empSetupDal.UpdatePersonalInfo(personalInfo, employeeId); if (result == 1) { lblModalMessage.Text = "Data Update Successfully."; GetPersonalInfo(employeeId); } else { } } else { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Machine-ID Conflict!')", true); ModalPopupExtender.Show(); } } catch (Exception ex) { throw ex; } }
private void UpdatePersonalInfoForEffectiveDate(SalaryIncrementR aitem) { HRM_PersonalInformations _personalInformations = _context.HRM_PersonalInformations.Where(x => x.EID == aitem.Eid).FirstOrDefault(); _personalInformations.Salary = aitem.Slary; _personalInformations.DesginationId = aitem.DesId; _personalInformations.Grade = aitem.Grade; _personalInformations.EffectiveSalaryStatus = true; _context.SaveChanges(); }
private void GetPersonalInfo(string employeeid) { try { HRM_PersonalInformations personalObj = employeeBll.getPersonalInfosByID(employeeid); lblFirstName.Text = personalObj.FirstName; lblLastName.Text = personalObj.LastName; lblBanglaFullName.Text = personalObj.BanFullName; lblGender.Text = personalObj.Gender; lblReligion.Text = personalObj.Religion; lblDateOfBrith.Text = personalObj.DateOfBrith.ToString(); lblNationality.Text = personalObj.Nationality; lblBloodGroup.Text = personalObj.BloodGroup; lblMaritalStatus.Text = personalObj.MaritalStatus; lblNId.Text = personalObj.NationalID; hidMachineId.Value = lblMachineId.Text = personalObj.BIO_MATRIX_ID; // Contact Information lblContactNo.Text = personalObj.ContactNumber; lblPresentAddress.Text = personalObj.PresentAddress; lblPermanentAddress.Text = personalObj.PermanenAddress; lblEmergenceContactPeson.Text = personalObj.EmergencyContactPerson; lblEmergenceContactNo.Text = personalObj.EmergencyContactNo; lblEmergenceContractRelation.Text = personalObj.ContactPersonRelationName; lblEmergenceContactAddress.Text = personalObj.EmergencyAddress; lblEmail.Text = personalObj.Email; lblAlternativeEmail.Text = personalObj.AlternativEmailAddress; // Immediate Relative Info lblFatherName.Text = personalObj.FatherName; lblFatherAge.Text = personalObj.FatherAge; lblFatherProfession.Text = personalObj.FatherProfession; lblMotherName.Text = personalObj.MotherName; lblMotherAge.Text = personalObj.MotherAge; lblMotherProfession.Text = personalObj.MotherProfession; lblSpourseName.Text = personalObj.SpouseName; lblSpourseAge.Text = personalObj.SpouseAge; lblSpourseProfession.Text = personalObj.SpouseProfession; lblNumberOfChildren.Text = personalObj.NumberOfChildren; lblChildrenNameRemark.Text = personalObj.ChildrenNameRemark; // Nominee Info lblName.Text = personalObj.NomineeName; lblAge.Text = personalObj.NomineeAge; lblRelation.Text = personalObj.NomineeRelation; //lblNomineeAdress.Text=personalObj } catch (Exception) { throw; } }
private bool IsExist(HRM_PersonalInformations personalInfo1, List <HRM_PersonalInformations> personales) { bool status = false; foreach (HRM_PersonalInformations aitem in personales) { if (aitem.EID == personalInfo1.EID) { status = true; } } return(status); }
internal int UpdatePersonalInfoForSalaryUpdate(string eid, int desId, decimal Gosssalary) { HRM_PersonalInformations _personalobj = _context.HRM_PersonalInformations.First(x => x.EID == eid); if (_personalobj != null) { _personalobj.Salary = Gosssalary; _personalobj.DesginationId = desId; _personalobj.SalaryUpdateDate = DateTime.Now; _context.SaveChanges(); } return(1); }
protected void txtbxEID_TextChangeEvent(object sender, EventArgs e) { try { string eid = txtbxEID.Text.Trim(); HRM_PersonalInformations _personalInfo = employeeBll.GetPersonalInfoByEID(eid); txtbxName.Text = _personalInfo.FirstName + " " + _personalInfo.LastName; txtbxDesgination.Text = employeeBll.GetDesginationName(_personalInfo.DesginationId); txtbxDepartment.Text = employeeBll.GetDepartmentName(_personalInfo.DepartmentId); } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } }
private void UpdatePersonalInfo(SalaryIncrementR aitem) { try { HRM_PersonalInformations _personalInformations = _context.HRM_PersonalInformations.Where(x => x.EID == aitem.Eid).FirstOrDefault(); _personalInformations.Salary = aitem.Slary; _personalInformations.DesginationId = aitem.DesId; _personalInformations.Grade = aitem.Grade; _context.SaveChanges(); } catch (Exception) { throw; } }
//Update //internal int UpdateSalary(HRM_DESIGNATIONS objDesignation, string employeeID) //{ // try // { // HRM_DESIGNATIONS obj = _context.HRM_DESIGNATIONS.First(x => x.DEG_ID == employeeID); // obj.DEG_NAME = objDesignation.DEG_NAME; // _context.SaveChanges(); // return 1; // } // catch (Exception ex) // { // throw ex; // } //} internal int UpdateSalary(HRM_PersonalInformations objperonal, string employeeID) { try { //int macat = Convert.ToInt32(employeeID); HRM_PersonalInformations personnal = _context.HRM_PersonalInformations.First(x => x.EID == employeeID); personnal.Salary = objperonal.Salary; personnal.EID = objperonal.EID; //personnal.MaterialCategory_ID = objperonal.MaterialCategory_ID; _context.SaveChanges(); return(1); } catch (Exception ex) { throw ex; } }
internal List <HRM_LEAVE_TYPE> ProbationPeriod(DateTime date, string eid) { try { List <HRM_LEAVE_TYPE> types = new List <HRM_LEAVE_TYPE>(); HRM_PersonalInformations hrmpersonalinfo = _context.HRM_PersonalInformations.FirstOrDefault(x => x.EID == eid && (x.ProbationPeriodFrom >= date && x.ProbationPeriodTo <= date)); if (hrmpersonalinfo != null) { types = _context.HRM_LEAVE_TYPE.Where(n => n.LEV_ID != 1 && n.LEV_ID != 2 && n.LEV_ID != 3 && n.LEV_ID != 4).ToList(); } return(types); } catch (Exception) { throw; } }
private void LoadApprovePersonListByEid(string employeeID) { try { HRM_PersonalInformations personalInformation = objEmp_BLL.getDepartmentByEID(employeeID); int departmentId = Convert.ToInt16(personalInformation.DepartmentId); List <ReportingBoss> personallist = objEmp_BLL.LoadApprovePersonListByDepartmentId(departmentId); List <ReportingBoss> reportingBosses = new List <ReportingBoss>(); foreach (var aitem in personallist) { ReportingBoss _aitem = new ReportingBoss(); _aitem.FulllName = aitem.FirstName + " " + aitem.LastName; reportingBosses.Add(_aitem); } if (personallist.Count > 0) { drpdwnApproveSupervisor.DataSource = personallist; drpdwnApproveSupervisor.DataTextField = "FulllName"; drpdwnApproveSupervisor.DataValueField = "EID"; drpdwnApproveSupervisor.DataBind(); drpdwnApproveSupervisor.Items.Insert(0, new ListItem("--Select--", "0")); drpApprovedAdmin.DataSource = personallist; drpApprovedAdmin.DataTextField = "FulllName"; drpApprovedAdmin.DataValueField = "EID"; drpApprovedAdmin.DataBind(); drpApprovedAdmin.Items.Insert(0, new ListItem("--Select--", "0")); } if (personallist.Count > 0) { drpApprovedHR.DataSource = personallist; drpApprovedHR.DataTextField = "FulllName"; drpApprovedHR.DataValueField = "EID"; drpApprovedHR.DataBind(); drpApprovedHR.Items.Insert(0, new ListItem("--Select--", "0")); } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } }
internal int SaveApplicable(List <HRM_Applicable_PersonalStatus> _applicable) { try { if (_applicable.Count() > 0) { foreach (HRM_Applicable_PersonalStatus aitem in _applicable) { bool status = false; HRM_PersonalInformations _personal = _context.HRM_PersonalInformations.FirstOrDefault(x => x.EID == aitem.EID); if (_personal != null) { _personal.Attendance_Bouns = aitem.Attendance_Bouns; _personal.Late_Applicable = aitem.Late_Applicable; _personal.Absence_Applicable = aitem.Absence_Applicable; _personal.Tax_Applicable = aitem.Tax_Applicable; _personal.PF_Applicable = aitem.PF_Applicable; _personal.OTApplicable = aitem.OT_Applicable; //_personal.On_Amount = aitem.On_Amount; _context.SaveChanges(); status = true; } if (status == true) { _context.HRM_Applicable_PersonalStatus.AddObject(aitem); _context.SaveChanges(); } } _context.SaveChanges(); return(1); } else { return(0); } } catch (Exception) { throw; } }
protected void BtnLeaveSubmit_Click(object sender, EventArgs e) { try { HRM_MaternityLeave maternityLeave = new HRM_MaternityLeave(); HRM_PersonalInformations personalInfo = employeeSetUpDal.GetReportingBossById(lblApplicantId.Text); string hrmReportinBossId = personalInfo.ThirdReportingBossId; TimeSpan difference = Convert.ToDateTime(txtbxLeaveDateTo.Text) - Convert.ToDateTime(txtbxLeaveDateFrom.Text); var days = difference.TotalDays; if (days > Convert.ToInt32(lblTotalMaternityLeave.Text)) { lblMessage.Text = "Please Check Maternity Leave!"; } else { maternityLeave.AppliedDate = DateTime.Now; maternityLeave.EID = lblApplicantId.Text; maternityLeave.LeaveDateFrom = Convert.ToDateTime(txtbxLeaveDateFrom.Text); maternityLeave.LeaveDateTo = Convert.ToDateTime(txtbxLeaveDateTo.Text); maternityLeave.Description = txtbxDexrcription.Text; maternityLeave.ApproveStatus = false; maternityLeave.DisApproveStatus = false; maternityLeave.HrmReportinBossId = hrmReportinBossId; maternityLeave.TotalDay = Convert.ToInt32(days); maternityLeave.EDIT_USER = ((SessionUser)Session["SessionUser"]).UserId; maternityLeave.EDIT_DATE = DateTime.Now; maternityLeave.OCODE = ((SessionUser)Session["SessionUser"]).OCode; int result = maternityLeaveBll.SaveMaternityLeaveInfo(maternityLeave); if (result == 1) { lblMessage.Text = "Data Save Successfully!"; GetMaternityLeaveInfoForList(); } } } catch (Exception ex) { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('" + ex.Message + "')", true); } }
protected void BtnEdits_Click(object sender, EventArgs e) { try { string employeeid = Convert.ToString(Session["EID"]); HRM_PersonalInformations personalObj = employeeBll.getPersonalInfosByID(employeeid); txtbxNomineeName.Text = personalObj.NomineeName; txtbxAge.Text = personalObj.NomineeAge; txtbxRelation.Text = personalObj.NomineeRelation; //txtbxAddress //btnSkilReset.Visible = true; btnSkillUpdate.Visible = true; ModalPopupExtender3.Show(); } catch (Exception) { throw; } }
protected void btnSave_Click(object sender, EventArgs e) { try { HRM_PersonalInformations _personalInfo = new HRM_PersonalInformations(); _personalInfo.RegionsId = Convert.ToInt32(ddlRegion1.SelectedValue); _personalInfo.OfficeId = Convert.ToInt16(ddlOffice1.SelectedValue); _personalInfo.DepartmentId = Convert.ToInt16(ddlDept1.SelectedValue); _personalInfo.SectionId = Convert.ToInt16(ddlSection.SelectedValue); _personalInfo.DesginationId = Convert.ToInt16(ddlDesignations.SelectedValue); _personalInfo.Grade = "A"; _personalInfo.Salary = 10000; _personalInfo.FirstName = txtUserName.Text; _personalInfo.EID = txtEmployeeId.Text; _personalInfo.Email = txtEmail.Text; _personalInfo.ContactNumber = txtPhone.Text; _personalInfo.EMP_TERMIN_STATUS = false; _personalInfo.EMP_TRANSFER_STATUS = false; _personalInfo.EMP_Retired_Status = false; _personalInfo.EMP_Resignation_Status = false; _personalInfo.EMP_Dismissal_Status = false; _personalInfo.EMP_Died_Status = false; _personalInfo.EMP_Other = false; _personalInfo.EMP_Dis_Continution_Status = false; _personalInfo.EDIT_DATE = DateTime.Now; _personalInfo.EDIT_USER = ((SessionUser)Session["SessionUser"]).UserId; _personalInfo.OCODE = ((SessionUser)Session["SessionUser"]).OCode; int result = _NewUserBll.SaveAsset_User(_personalInfo); if (result == 1) { GetAssetUserlist(); Clear(); ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Data Save Successfully.')", true); } } catch (Exception) { throw; } }
protected void BtnEdit_Click(object sender, EventArgs e) { BindNationality(); string employeeid = Convert.ToString(Session["EID"]); HRM_PersonalInformations personalObj = employeeBll.getPersonalInfosByID(employeeid); txtbxFirstName.Text = personalObj.FirstName; txtbxLastName.Text = personalObj.LastName; txtbxBangalFullName.Text = personalObj.BanFullName; ddlGender.SelectedValue = personalObj.Gender.ToString(); ddlReligion.SelectedValue = personalObj.Religion; txtbxdateOfBrith.Text = ConvertDate(personalObj.DateOfBrith.ToString()); ddlNationality.SelectedValue = personalObj.Nationality; ddlBloodGrp.SelectedValue = personalObj.BloodGroup; ddlMariedSts.SelectedValue = personalObj.MaritalStatus; txtbxNId.Text = personalObj.NationalID; txtbxMachineID.Text = personalObj.BIO_MATRIX_ID; btnedit.Visible = true; btnUpdate.Visible = true; ModalPopupExtender.Show(); }
public int SaveEmployee_Transfer(HRM_EMP_TRANSFER objTrns, string employeeID, decimal PreviousGrossSalary) { try { //---------------Update Employee Master----------------- HRM_PersonalInformations objEmpUpdate = _context.HRM_PersonalInformations.First(x => x.EID == employeeID); objEmpUpdate.RegionsId = objTrns.Regions_ID_TO; objEmpUpdate.OfficeId = objTrns.Office_ID_TO; objEmpUpdate.DepartmentId = objTrns.DPT_ID_TO; objEmpUpdate.SectionId = objTrns.SEC_ID_TO; objEmpUpdate.SubSectionId = objTrns.SUB_SEC_ID_TO; objEmpUpdate.DesginationId = objTrns.DEG_ID_TO; objEmpUpdate.Grade = objTrns.GradeTo; objEmpUpdate.Salary = objTrns.GorssSalaryTo; if (objTrns.Status == "TWSI" || objTrns.Status == "TWOSI") { objEmpUpdate.EMP_TRANSFER_STATUS = true; } else { objEmpUpdate.EMP_TRANSFER_STATUS = objEmpUpdate.EMP_TRANSFER_STATUS; } if (objTrns.Status == "TWSI" || objTrns.Status == "PWSI") { InsertSalaryIncrementLog(objTrns, employeeID, PreviousGrossSalary); } _context.SaveChanges(); _context.HRM_EMP_TRANSFER.AddObject(objTrns); _context.SaveChanges(); return(1); } catch (Exception ex) { throw ex; } }