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); } Int16 Grade = Converter.GetSmallInteger(CtrlGrade.Text); A2ZGRADEDTO get2DTO = (A2ZGRADEDTO.GetGradeInformation(Grade)); if (get2DTO.ID > 0) { lblGrade.Text = Converter.GetString(get2DTO.GradeDesc); } gvAllowanceInfo.Visible = true; gvDeductionInfo.Visible = true; DivAllowance.Visible = true; divDeduction.Visible = true; gvAllowanceDetails(); gvDeductionDetails(); MoveAllowChkMark(); MoveDedChkMark(); } }
protected void txtNewGrade_TextChanged(object sender, EventArgs e) { try { int grade = Converter.GetSmallInteger(txtNewGrade.Text); A2ZGRADEDTO get2DTO = (A2ZGRADEDTO.GetGradeInformation(grade)); if (get2DTO.ID > 0) { lblNewGradeDesc.Text = Converter.GetString(get2DTO.GradeDesc); lblBaseGrade.Text = ddlNewBaseGrade.SelectedValue;; lblGrade.Text = txtNewGrade.Text; PayScaleDesc(); txtNewPayScale.Text = lblPayScale.Text; if (txtNewPayLabel.Text != string.Empty) { lblPayLabel.Text = txtNewPayLabel.Text; PayLabelBasic(); txtNewBasic.Text = lblBasic.Text; } } } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.txtNewGrade_TextChanged Problem');</script>"); //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); 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 ddlGrade_SelectedIndexChanged(object sender, EventArgs e) { if (ddlGrade.SelectedValue == "-Select-") { txtcode.Focus(); txtcode.Text = string.Empty; txtDescription.Text = string.Empty; BtnSubmit.Visible = true; BtnUpdate.Visible = false; } try { if (ddlGrade.SelectedValue != "-Select-") { Int16 MainCode = Converter.GetSmallInteger(ddlGrade.SelectedValue); A2ZGRADEDTO getDTO = (A2ZGRADEDTO.GetGradeInformation(MainCode)); if (getDTO.ID > 0) { txtcode.Text = Converter.GetString(getDTO.Grade); txtDescription.Text = Converter.GetString(getDTO.GradeDesc); 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 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) { 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; } }