protected void Page_PreRender() { if (!IsPostBack) { if (CurID < 0) { toolBar.DeleteButton_Visible = false; } if ("true" == DecryptedRequest["Flow"]) { Flow.Value = "true"; int PrevEmpID = -1; if (!int.TryParse(DecryptedRequest["PrevEmpID"], out PrevEmpID)) { PrevEmpID = -1; } if (PrevEmpID > 0) { Emp_PositionInfo_Edit1.LoadLastEmpPositionInfo(PrevEmpID); Emp_PositionInfo_Edit1.EmpID = CurEmpID; } } else { Flow.Value = "false"; } } }
protected void Delete_Click(object sender, EventArgs e) { if (Emp_PositionInfo_Edit1.Delete()) { HROne.Common.WebUtility.RedirectURLwithEncryptedQueryString(Response, Session, "~/EmpTab_Position_View.aspx?EmpID=" + CurEmpID); } }
protected void btnLastPositionTerms_Click(object sender, EventArgs e) { if (CurID <= 0 && CurEmpID > 0) { Emp_PositionInfo_Edit1.LoadLastEmpPositionInfo(CurEmpID); } }
protected void Save_Click(object sender, EventArgs e) { if (Emp_PositionInfo_Edit1.Save()) { if (Flow.Value.Equals("true")) { HROne.Common.WebUtility.RedirectURLwithEncryptedQueryString(Response, Session, "~/EmpTab_Pension_View.aspx?EmpID=" + CurEmpID); } else { HROne.Common.WebUtility.RedirectURLwithEncryptedQueryString(Response, Session, "~/Emp_PositionInfo_View.aspx?EmpPosID=" + Emp_PositionInfo_Edit1.EmpPosID + "&EmpID=" + CurEmpID); } } }