private void LoadData() { EmpPermitDAL _dalEmpPermitDAL = null; Hashtable _htParameters = null; try { //System.Diagnostics.Debugger.Break(); _dalEmpPermitDAL = new EmpPermitDAL(); _htParameters = new Hashtable(); //Utility.CurrentUID //ddlEmployee_Code.SelectedValue = "anas"; string abcd = SessionKey.CURRENT_USER_HRMS_EMP_CODE.ToString(); //ddlEmployee_Code.SelectedValue = SessionKey.CURRENT_USER_HRMS_EMP_CODE.ToString(); txtSubmissionDate.Text = Utility.CurrentDate; if (Request.Params["action"] == "edt") { _htParameters["p_ID"] = Request.Params["id"]; DataTable _dt = _dalEmpPermitDAL.GetRow(_htParameters); MPF23.Shared.Mapper.DBToUI.Map(pnlBody.Controls, _dt.Rows[0]); if (ddlStatus.SelectedValue == "0") { btnSave.Visible = true; //btnSend.Visible = true; } else { btnSave.Visible = false; //btnSend.Visible = false; } } else { txtEmployee_code.Text = Session[SessionKey.CURRENT_USER_HRMS_EMP_CODE].ToString().Trim(); txtEmployee_Name.Text = Session[SessionKey.CURRENT_USER_HRMS_EMP_NAME].ToString().Trim(); } string abc = Session[SessionKey.CURRENT_USER_HRMS_ROLE].ToString(); if (abc == "1") { ddlStatus.Enabled = false; //ddlEmployee_Code.Enabled = false; } //for (int i = 0; i < Session.Count; i++) //{ // var crntSession = Session.Keys[i]; // Response.Write(string.Concat(crntSession, "=", Session[crntSession]) + "<br />"); //} } catch (Exception ex) { Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null); } }
private void LoadData() { EmpPermitDAL _dalEmployee = null; Hashtable _htParameters = null; try { _dalEmployee = new EmpPermitDAL(); _htParameters = new Hashtable(); if (Request.Params["action"] == "edt") { _htParameters["p_ID"] = Request.Params["id"]; DataTable _dt = _dalEmployee.GetRow(_htParameters); MPF23.Shared.Mapper.DBToUI.Map(pnlBody.Controls, _dt.Rows[0]); } } catch (Exception ex) { Utility.ShowMessageBox(this, Utility.LOAD_DATA_FAIL_MESSAGE, ex, null); } }