protected void btnSumbit_Click(object sender, EventArgs e) { int EmpID = Converter.GetInteger(txtEmpNo.Text); A2ZEMPLOYEEDTO getDTO = (A2ZEMPLOYEEDTO.GetInformation(EmpID)); if (getDTO.EmployeeID > 0) { lblName.Text = Converter.GetString(getDTO.EmployeeName); CtrlDesignation.Text = Converter.GetString(getDTO.EmpDesignation); CtrlGrade.Text = Converter.GetString(getDTO.EmpGrade); Int16 Desig = Converter.GetSmallInteger(CtrlDesignation.Text); A2ZDESIGNATIONDTO get1DTO = (A2ZDESIGNATIONDTO.GetInformation(Desig)); if (get1DTO.DesignationCode > 0) { lblDesign.Text = Converter.GetString(get1DTO.DesignationDescription); } //InsertTSalaryRec(); DivAllowance.Visible = true; divDeduction.Visible = true; gvAllowanceDetails(); MoveAllowAmount(); gvDeductionDetails(); MoveDeductAmount(); } }
protected void btnSumbit_Click(object sender, EventArgs e) { int EmpID = Converter.GetInteger(txtEmpNo.Text); A2ZEMPLOYEEDTO getDTO = (A2ZEMPLOYEEDTO.GetInformation(EmpID)); if (getDTO.EmployeeID > 0) { lblName.Text = Converter.GetString(getDTO.EmployeeName); CtrlDesignation.Text = Converter.GetString(getDTO.EmpDesignation); CtrlGrade.Text = Converter.GetString(getDTO.EmpGrade); lblArea.Text = Converter.GetString(getDTO.EmpAreaDesc); lblLocation.Text = Converter.GetString(getDTO.EmpLocationDesc); BtnView.Visible = true; Int16 Desig = Converter.GetSmallInteger(CtrlDesignation.Text); A2ZDESIGNATIONDTO get1DTO = (A2ZDESIGNATIONDTO.GetInformation(Desig)); if (get1DTO.DesignationCode > 0) { lblDesign.Text = Converter.GetString(get1DTO.DesignationDescription); } Int16 Grade = Converter.GetSmallInteger(CtrlGrade.Text); A2ZGRADEDTO get2DTO = (A2ZGRADEDTO.GetGradeInformation(Grade)); if (get2DTO.ID > 0) { lblGrade.Text = Converter.GetString(get2DTO.GradeDesc); } ddllType.Enabled = true; txtStartDate.Enabled = true; txtEndDate.Enabled = true; txtTotDay.Text = string.Empty; txtBalDay.Text = string.Empty; txtStartDate.Text = string.Empty; txtEndDate.Text = string.Empty; ddllType.SelectedIndex = 0; A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue(); DateTime dt = Converter.GetDateTime(dto.ProcessDate); string date = dt.ToString("dd/MM/yyyy"); txtStartDate.Text = date; txtEndDate.Text = date; lblProcDate.Text = date; } else { txtEmpNo.Text = string.Empty; txtEmpNo.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Invalid Employee No');", true); return; } }
protected void BtnUpdate_Click(object sender, EventArgs e) { A2ZDESIGNATIONDTO UpDTO = new A2ZDESIGNATIONDTO(); UpDTO.DesignationCode = Converter.GetSmallInteger(txtcode.Text); UpDTO.DesignationDescription = Converter.GetString(txtDescription.Text); int roweffect = A2ZDESIGNATIONDTO.UpdateInformation(UpDTO); if (roweffect > 0) { dropdown(); clearinfo(); // ddlDesignation.SelectedValue = "-Select-"; BtnSubmit.Visible = true; BtnUpdate.Visible = false; txtcode.Focus(); gvDetail(); } }
protected void ddlDesignation_SelectedIndexChanged(object sender, EventArgs e) { if (ddlDesignation.SelectedValue == "-Select-") { txtcode.Focus(); txtcode.Text = string.Empty; txtDescription.Text = string.Empty; BtnSubmit.Visible = true; BtnUpdate.Visible = false; } try { if (ddlDesignation.SelectedValue != "-Select-") { Int16 MainCode = Converter.GetSmallInteger(ddlDesignation.SelectedValue); A2ZDESIGNATIONDTO getDTO = (A2ZDESIGNATIONDTO.GetInformation(MainCode)); if (getDTO.DesignationCode > 0) { txtcode.Text = Converter.GetString(getDTO.DesignationCode); txtDescription.Text = Converter.GetString(getDTO.DesignationDescription); BtnSubmit.Visible = false; BtnUpdate.Visible = true; txtDescription.Focus(); } else { txtcode.Focus(); txtcode.Text = string.Empty; txtDescription.Text = string.Empty; BtnSubmit.Visible = true; BtnUpdate.Visible = false; } } } catch (Exception ex) { throw ex; } }
protected void BtnSubmit_Click(object sender, EventArgs e) { try { A2ZDESIGNATIONDTO objDTO = new A2ZDESIGNATIONDTO(); objDTO.DesignationCode = Converter.GetSmallInteger(txtcode.Text); objDTO.DesignationDescription = Converter.GetString(txtDescription.Text); int roweffect = A2ZDESIGNATIONDTO.InsertInformation(objDTO); if (roweffect > 0) { txtcode.Focus(); clearinfo(); dropdown(); gvDetail(); } } catch (Exception ex) { throw ex; } }
protected void btnSumbit_Click(object sender, EventArgs e) { int EmpID = Converter.GetInteger(txtEmpNo.Text); A2ZEMPLOYEEDTO getDTO = (A2ZEMPLOYEEDTO.GetInformation(EmpID)); if (getDTO.EmployeeID > 0) { lblName.Text = Converter.GetString(getDTO.EmployeeName); CtrlDesignation.Text = Converter.GetString(getDTO.EmpDesignation); CtrlGrade.Text = Converter.GetString(getDTO.EmpGrade); ddlExsitStatus.SelectedValue = Converter.GetString(getDTO.Status); if (getDTO.StatusDate == DateTime.MinValue) { txtExistDate.Text = string.Empty; } else { DateTime dt = Converter.GetDateTime(getDTO.StatusDate); string date = dt.ToString("dd/MM/yyyy"); txtExistDate.Text = date; } Int16 Desig = Converter.GetSmallInteger(CtrlDesignation.Text); A2ZDESIGNATIONDTO get1DTO = (A2ZDESIGNATIONDTO.GetInformation(Desig)); if (get1DTO.DesignationCode > 0) { lblDesign.Text = Converter.GetString(get1DTO.DesignationDescription); } Int16 Grade = Converter.GetSmallInteger(CtrlGrade.Text); A2ZGRADEDTO get2DTO = (A2ZGRADEDTO.GetGradeInformation(Grade)); if (get2DTO.ID > 0) { lblGrade.Text = Converter.GetString(get2DTO.GradeDesc); } } }
protected void btnSumbit_Click(object sender, EventArgs e) { try { int EmpID = Converter.GetInteger(txtEmpNo.Text); A2ZEMPLOYEEDTO getDTO = (A2ZEMPLOYEEDTO.GetInformation(EmpID)); if (getDTO.EmployeeID > 0) { txtEmpNo.ReadOnly = true; txtNewPromotionDate.Focus(); lblName.Text = Converter.GetString(getDTO.EmployeeName); int Area = Converter.GetInteger(getDTO.EmpArea); A2ZDISTRICTDTO get1DTO = (A2ZDISTRICTDTO.GetInfo(Area)); if (get1DTO.DistrictCode > 0) { lblLastAreaCode.Text = Converter.GetString(get1DTO.DistrictOrgCode); lblLastArea.Text = Converter.GetString(get1DTO.DistrictDescription); ddlNewArea.SelectedValue = Converter.GetString(get1DTO.DistrictOrgCode); } int Location = Converter.GetInteger(getDTO.EmpLocation); A2ZAREADTO get7DTO = (A2ZAREADTO.GetInformation(Location)); if (get7DTO.AreaCode > 0) { lblLastLocationCode.Text = Converter.GetString(get7DTO.AreaCode); lblLastLocation.Text = Converter.GetString(get7DTO.AreaDescription); ddlNewLocation.SelectedValue = Converter.GetString(get7DTO.AreaCode); } Int16 Section = Converter.GetSmallInteger(getDTO.EmpSection); A2ZSECTIONDTO get2DTO = (A2ZSECTIONDTO.GetInformation(Section)); if (get2DTO.SectionCode > 0) { lblLastSectionCode.Text = Converter.GetString(get2DTO.SectionCode); lblLastSection.Text = Converter.GetString(get2DTO.SectionName); ddlNewSection.SelectedValue = Converter.GetString(get2DTO.SectionCode); } Int16 Department = Converter.GetSmallInteger(getDTO.EmpDepartment); A2ZDEPARTMENTDTO get3DTO = (A2ZDEPARTMENTDTO.GetInformation(Department)); if (get3DTO.DepartmentCode > 0) { lblLastDepartmentCode.Text = Converter.GetString(get3DTO.DepartmentCode); lblLastDepartment.Text = Converter.GetString(get3DTO.DepartmentName); ddlNewDepartment.SelectedValue = Converter.GetString(get3DTO.DepartmentCode); } Int16 Desig = Converter.GetSmallInteger(getDTO.EmpDesignation); A2ZDESIGNATIONDTO get4DTO = (A2ZDESIGNATIONDTO.GetInformation(Desig)); if (get4DTO.DesignationCode > 0) { lblLastDesignationCode.Text = Converter.GetString(get4DTO.DesignationCode); lblLastDesignation.Text = Converter.GetString(get4DTO.DesignationDescription); ddlNewDesignation.SelectedValue = Converter.GetString(get4DTO.DesignationCode); } lblLastServiceTypeCode.Text = Converter.GetString(getDTO.ServiceType); lblLastServiceType.Text = Converter.GetString(getDTO.EmpSTypeDesc); if (lblLastServiceTypeCode.Text == string.Empty || lblLastServiceTypeCode.Text == "0") { ddlNewServiceType.SelectedIndex = 0; } else { ddlNewServiceType.SelectedValue = Converter.GetString(getDTO.ServiceType); } lblLastProjectCode.Text = Converter.GetString(getDTO.EmpProject); if (lblLastProjectCode.Text == string.Empty || lblLastProjectCode.Text == "0") { ddlNewProject.SelectedIndex = 0; } else { ddlNewProject.SelectedValue = Converter.GetString(getDTO.EmpProject); } lblLastProject.Text = Converter.GetString(ddlNewProject.SelectedItem.Text); int cashcode = Converter.GetInteger(getDTO.EmpCashCode); A2ZCGLMSTDTO get5DTO = (A2ZCGLMSTDTO.GetInformation(cashcode)); if (get5DTO.GLAccNo > 0) { lblLastCashCode.Text = Converter.GetString(get5DTO.GLAccNo); lblLastCashCodeDesc.Text = Converter.GetString(get5DTO.GLAccDesc); ddlNewCashCode.SelectedValue = Converter.GetString(get5DTO.GLAccNo); } lblLastBaseGradeCode.Text = Converter.GetString(getDTO.EmpBaseGrade); if (lblLastBaseGradeCode.Text == string.Empty || lblLastBaseGradeCode.Text == "0") { ddlNewBaseGrade.SelectedIndex = 0; } else { ddlNewBaseGrade.SelectedValue = Converter.GetString(getDTO.EmpBaseGrade); } lblLastBaseGrade.Text = Converter.GetString(ddlNewBaseGrade.SelectedItem.Text); lblLastGrade.Text = Converter.GetString(getDTO.EmpGrade); lblLastGradeDesc.Text = Converter.GetString(getDTO.EmpGradeDesc); txtNewGrade.Text = Converter.GetString(getDTO.EmpGrade); lblNewGradeDesc.Text = Converter.GetString(getDTO.EmpGradeDesc); lblBaseGrade.Text = lblLastBaseGradeCode.Text; lblGrade.Text = lblLastGrade.Text; PayScaleDesc(); lblLastPayScale.Text = lblPayScale.Text; lblBaseGrade.Text = ddlNewBaseGrade.SelectedValue; lblGrade.Text = txtNewGrade.Text; PayScaleDesc(); txtNewPayScale.Text = lblPayScale.Text; lblLastPayLabel.Text = Converter.GetString(getDTO.EmpPayLabel); txtNewPayLabel.Text = Converter.GetString(getDTO.EmpPayLabel); if (txtNewPayLabel.Text == string.Empty || txtNewPayLabel.Text == "0") { txtNewPayLabel.Text = "1"; } lblPayLabel.Text = lblLastPayLabel.Text; PayLabelBasic(); lblLastBasic.Text = lblBasic.Text; lblPayLabel.Text = txtNewPayLabel.Text; PayLabelBasic(); txtNewBasic.Text = lblBasic.Text; if (getDTO.EmpLastPromotionDate == DateTime.MinValue) { txtLastPromotionDate.Text = string.Empty; } else { DateTime dt = Converter.GetDateTime(getDTO.EmpLastPromotionDate); string date = dt.ToString("dd/MM/yyyy"); txtLastPromotionDate.Text = date; } } else { txtEmpNo.Text = string.Empty; txtEmpNo.Focus(); InvalidEmpCodeMSG(); } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.btnSumbit_Click Problem');</script>"); //throw ex; } }
protected void btnSumbit_Click(object sender, EventArgs e) { lblRevFlag.Text = "0"; BtnAutoReverse.Visible = false; BtnAutoPost.Visible = true; int EmpID = Converter.GetInteger(txtEmpNo.Text); A2ZEMPLOYEEDTO getDTO = (A2ZEMPLOYEEDTO.GetInformation(EmpID)); if (getDTO.EmployeeID > 0) { if (getDTO.Status == 1) { txtEmpNo.Text = string.Empty; txtEmpNo.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Employee Already Active');", true); return; } if (getDTO.Status == 9) { VerifyReverseTransaction(); if (lblErrMsg.Text == "1") { txtEmpNo.Text = string.Empty; txtEmpNo.Focus(); ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Final Settlement Already Done');", true); return; } lblRevFlag.Text = "1"; BtnAutoReverse.Visible = true; BtnAutoPost.Visible = false; } lblName.Text = Converter.GetString(getDTO.EmployeeName); CtrlDesignation.Text = Converter.GetString(getDTO.EmpDesignation); CtrlGrade.Text = Converter.GetString(getDTO.EmpGrade); Int16 Desig = Converter.GetSmallInteger(CtrlDesignation.Text); A2ZDESIGNATIONDTO get1DTO = (A2ZDESIGNATIONDTO.GetInformation(Desig)); if (get1DTO.DesignationCode > 0) { lblDesign.Text = Converter.GetString(get1DTO.DesignationDescription); } Int16 Grade = Converter.GetSmallInteger(CtrlGrade.Text); A2ZGRADEDTO get2DTO = (A2ZGRADEDTO.GetGradeInformation(Grade)); if (get2DTO.ID > 0) { lblGrade.Text = Converter.GetString(get2DTO.GradeDesc); } var prm = new object[2]; prm[0] = EmpID; prm[1] = 0; int result = Converter.GetInteger(DataAccessLayer.BLL.CommonManager.Instance.GetScalarValueBySp("Sp_HRGenerateEmployeeSettlement", prm, "A2ZHRMCUS")); gvBenefitInfo.DataBind(); gvDeductionInfo.DataBind(); lblTotalBenefit.Visible = true; txtTotalBenefit.Visible = true; lblTotalDeduction.Visible = true; txtTotalDeduction.Visible = true; lblNetPay.Visible = true; txtNetPay.Visible = true; gvBenefitInfo.Visible = true; gvDeductionInfo.Visible = true; btnUpdate_Click(null, null); } else { ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Employee Not in File');", true); return; } }