protected void btnswapConf_Click(object sender, EventArgs e) { if (ddlSawpReason.SelectedValue == "0") { lblPopupResponse1.Text = "Select Reason."; mpeSwapPop.Show(); return; } ViewState["SWAPSTBID"] = txtSwapSTBID.Text; ViewState["SWAPNewSTBID"] = txtswapNewSTBID.Text; ViewState["SWAPReason"] = ddlSawpReason.Text; Cls_Business_Faulty_Swap objTran = new Cls_Business_Faulty_Swap(); string OutStatus = ""; objTran.Get_Faulty_Swap(txtswapNewSTBID.Text, username, out OutStatus); if (OutStatus != "" && OutStatus != null) { lblSTBID.Text = ViewState["SWAPSTBID"].ToString(); lblNewSTBID.Text = ViewState["SWAPNewSTBID"].ToString(); lblCofReason.Text = ViewState["SWAPReason"].ToString(); mpSwapConfirm.Show(); } else { mpeSwapPop.Hide(); lblPopupResponse.Text = "Invalid STB."; popMsg.Show(); } }
protected void btnModifyConfirm_click(object sender, EventArgs e) { string user_brmpoid = ""; if (Session["operator_id"] != null && Session["username"] != null && Session["user_brmpoid"] != null) { user_brmpoid = Convert.ToString(Session["user_brmpoid"]); } else { Session.Abandon(); Response.Redirect("~/Login.aspx"); } /* // string response_params = username + "$" + searhParam + "$SW"; * string response_params = user_brmpoid + "$" + lblCofChildVC.Text + "$SW"; * * //if VC ID * response_params += "$V"; * * // string apiResponse = callAPI(response_params, "6"); * string SERVICE_OBJ = ""; * string DEVICE_ID = ""; * string apiResponse = callAPI(response_params, "12");// * try * { * if (apiResponse != "") * { * * List<string> lstResponse = new List<string>(); * * lstResponse = apiResponse.Split('$').ToList(); * ViewState["accountPoid"] = lstResponse[6]; * string cust_services = lstResponse[15]; * string[] service_arr = cust_services.Split('^'); * ViewState["Service_Str"] = null; * ViewState["Service_Str"] = cust_services.ToString(); * * ViewState["parentsmsg"] = "0"; * foreach (string service in service_arr) * { * string parent_child_flag = service.Split('!')[6]; * string vc_id = service.Split('!')[2]; * if (parent_child_flag == "0") * { * Session["SERVICE_STRING"] = service; * SERVICE_OBJ = service.Split('!')[0]; * * } * if (vc_id == lblCofChildVC.Text) * { * DEVICE_ID = service.Split('!')[1]; * } * } * } * } * catch (Exception ex) * { * * } * string response_params2 = Session["username"] + "$" + ViewState["accountPoid"] + "$" + DEVICE_ID + "$" + SERVICE_OBJ;//GetHwayOBRMPARENTCHILDSTB_SWAP_Action * * string apiResponse2 = callAPI(response_params2, "36"); * string[] GetAPIresponse = apiResponse2.Split('$'); * if (GetAPIresponse[0] == "0") * {*/ Hashtable ht = new Hashtable(); ht.Add("username", Session["username"].ToString()); ht.Add("AccountNo", lblCustNo.Text); ht.Add("FromVC", ""); ht.Add("FromSTB", lblNewSTBID.Text); ht.Add("TOVC", ""); ht.Add("TOSTB", lblStbNo.Text); ht.Add("Reason", lblCofReason.Text); ht.Add("Type", "FSS"); ht.Add("Status", ""); ht.Add("CustomerName", lblCustName.Text); ht.Add("MobileNo", lbltxtmobno.Text); ht.Add("EmailID", lblemail.Text); ht.Add("CustomerAdd", lblCustAddr.Text); Cls_Business_Faulty_Swap obj = new Cls_Business_Faulty_Swap(); string response = obj.getSTB_Swap(ht); string[] Getresponse = response.Split('#'); if (Getresponse[0] == "9999") { mpSwapConfirm.Hide(); lblPopupResponse.Text = Getresponse[1].ToString(); popMsg.Show(); } else { mpSwapConfirm.Hide(); lblPopupResponse.Text = Getresponse[1].ToString(); popMsg.Show(); } /* } * else * { * lblPopupResponse.Text = "Failed from OBRM :" + GetAPIresponse[1].ToString(); * popMsg.Show(); * }*/ }