protected void loadLCOSectionLco() { // Hashtable htLCOParams = getLCOParamsData(); btnSearch.Enabled = false; if (Session["username"] != null || Session["operator_id"] != null) { string username = Convert.ToString(Session["username"]); string catid = Convert.ToString(Session["category"]); string operator_id = Convert.ToString(Session["operator_id"]); Cls_Business_MstLCOPreUDefine obj = new Cls_Business_MstLCOPreUDefine(); Hashtable htResponse = obj.GetTransationsLCo(username, catid, operator_id); DataTable dt = null; //check for exception if (htResponse["htResponse"] != null) { dt = (DataTable)htResponse["htResponse"]; } if (dt == null) { Response.Redirect("~/ErrorPage.aspx"); return; } if (dt.Rows.Count == 0) { lblLCOCode.Text = ""; lblLCOName.Text = ""; lblResponseMsg.Text = "No data found..."; pnlDetails.Visible = false; return; } else { lblLCOCode.Text = dt.Rows[0]["lcocode"].ToString(); lblLCOName.Text = dt.Rows[0]["lconame"].ToString(); txtBrmId.Text = dt.Rows[0]["var_usermst_brmpoid"].ToString(); txtDirectNo.Text = dt.Rows[0]["directno"].ToString(); txtJvNo.Text = dt.Rows[0]["jvno"].ToString(); txtEmail.Text = dt.Rows[0]["var_usermst_email"].ToString(); txtAddress.Text = dt.Rows[0]["var_usermst_address"].ToString(); txtAccNO.Text = dt.Rows[0]["var_usermst_accno"].ToString(); txtMobile.Text = dt.Rows[0]["num_usermst_mobileno"].ToString(); txtPincode.Text = dt.Rows[0]["var_usermst_code"].ToString(); ViewState["state"] = dt.Rows[0]["num_usermst_stateid"].ToString(); ViewState["city"] = dt.Rows[0]["num_usermst_cityid"].ToString(); ViewState["lcoid2"] = dt.Rows[0]["lcoid"].ToString(); ViewState["searched_trans"] = dt; lblResponseMsg.Text = ""; pnlDetails.Visible = true; } } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); } }
protected void loadLCOSection() { Hashtable htLCOParams = getLCOParamsData(); if (Session["username"] != null || Session["operator_id"] != null) { string username = Convert.ToString(Session["username"]); string catid = Convert.ToString(Session["category"]); string operator_id = Convert.ToString(Session["operator_id"]); Cls_Business_MstLCOPreUDefine obj = new Cls_Business_MstLCOPreUDefine(); Hashtable htResponse = obj.GetTransations(htLCOParams, username, catid, operator_id); DataTable dt = null; //check for exception if (htResponse["htResponse"] != null) { dt = (DataTable)htResponse["htResponse"]; } if (dt == null) { Response.Redirect("~/ErrorPage.aspx"); return; } if (dt.Rows.Count == 0) { lblLCOCode.Text = ""; lblLCOName.Text = ""; lblResponseMsg.Text = "No data found..."; pnlDetails.Visible = false; return; } else { lblLCOCode.Text = dt.Rows[0]["lcocode"].ToString(); lblLCOName.Text = dt.Rows[0]["lconame"].ToString(); ViewState["lcoid2"] = dt.Rows[0]["lcoid"].ToString(); ViewState["searched_trans"] = dt; lblResponseMsg.Text = ""; pnlDetails.Visible = true; } } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { if (Session["username"] != null || Session["operator_id"] != null) { string username = Convert.ToString(Session["username"]); string catid = Convert.ToString(Session["category"]); string operator_id = Convert.ToString(Session["operator_id"]); Hashtable ht = new Hashtable(); /*string code = lblLCOCode.Text; * ht["code"] = code;*/ string lcoid2 = ViewState["lcoid2"].ToString(); ht["lcoid2"] = lcoid2; string userlevel = ""; if (catid == "3") { userlevel = "E"; } else { userlevel = "M"; } ht["userlevel"] = userlevel; if (txtUserId.Text.Length > 0) { string valid = SecurityValidation.chkData("T", txtUserId.Text); if (valid == "") { ht["userid12"] = txtUserId.Text; } else { lblResponseMsg.Text = valid + " at Login ID"; return; } } if (txtFirstName.Text.Length > 0) { string valid = SecurityValidation.chkData("T", txtFirstName.Text); if (valid == "") { ht["fname"] = txtFirstName.Text; } else { lblResponseMsg.Text = valid + " at First Name"; return; } } if (txtMidName.Text.Length > 0) { string valid = SecurityValidation.chkData("T", txtMidName.Text); if (valid == "") { ht["mname"] = txtMidName.Text; } else { lblResponseMsg.Text = valid + " at Middle Name"; return; } } if (txtLastName.Text.Length > 0) { string valid = SecurityValidation.chkData("T", txtLastName.Text); if (valid == "") { ht["lname"] = txtLastName.Text; } else { lblResponseMsg.Text = valid + " at Last Name"; return; } } if (txtMobile.Text.Length > 0) { string valid = SecurityValidation.chkData("N", txtMobile.Text); if (valid == "") { ht["mobileno"] = txtMobile.Text; } else { lblResponseMsg.Text = valid + " at Mobile"; return; } } if (txtEmail.Text.Length > 0) { string valid = SecurityValidation.chkData("T", txtEmail.Text); if (valid == "") { ht["email"] = txtEmail.Text; } else { lblResponseMsg.Text = valid + " at Email"; return; } } //string userid1 = txtUserId.Text; //ht["userid12"] = userid1; string userowner = ""; ht["userowner"] = userowner; //string fname = txtFirstName.Text; //ht["fname"] = fname; //string mname = txtMidName.Text; //ht["mname"] = mname; //string lname = txtLastName.Text; //ht["lname"] = lname; string jv = "0"; string direct = "0"; jv = txtJvNo.Text; direct = txtDirectNo.Text; ht["jv"] = jv; ht["direct"] = direct; string brmpoid = txtBrmId.Text; ht["brmpoid"] = brmpoid; string accno = txtAccNO.Text; ht["accno"] = accno; string addr = txtAddress.Text; ht["addr"] = addr; string state = ddlState.SelectedValue.ToString(); if (catid != "3") { if (state == "0") { lblResponseMsg.Text = "Select State"; return; } } ht["state"] = state; string city = ddlCity.SelectedValue.ToString(); if (catid != "3") { if (city == "0") { lblResponseMsg.Text = "Select City"; return; } } ht["city"] = city; string pincode = txtPincode.Text; ht["pincode"] = pincode; //string mobileno = txtMobile.Text; //ht["mobileno"] = mobileno; //string email = txtEmail.Text; //ht["email"] = email; if (ViewState["userid1"] != null) { ht["userid1"] = Convert.ToString(ViewState["userid1"]); } else { ht["userid1"] = "0"; } /*if (ViewState["lcoid"] != null) * { * ht["lcoid"] = Convert.ToString(ViewState["lcoid"]); * } * else * { * ht["lcoid"] = "0"; * }*/ if (ViewState["flag"] != null) { ht["flag"] = Convert.ToString(ViewState["flag"]); } else { ht["flag"] = "0"; } Cls_Business_MstLCOPreUDefine obj = new Cls_Business_MstLCOPreUDefine(); string compcode = ""; if (Session["username"] != null) { username = Convert.ToString(Session["username"]); compcode = Convert.ToString(Session["opr_code"]); } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); } ht["compcode"] = "HWP";//compcode; string response = obj.setUserData(username, ht); reset(); if (response == "ex_occured") { //exception occured Response.Redirect("~/ErrorPage.aspx"); return; } else { lblResponseMsg.Text = response; } } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); } }