public async Task <ActionResult> ChangeReferalid(string memberid, string reqtype, string userid, string passwd) { getnameByreferalid obj = new getnameByreferalid(); ResponseGetNameReferialid res = new ResponseGetNameReferialid(); General clsgen = new General(); this._APIManager = new APIRepository(); obj.memberid = memberid; obj.reqtype = "getmemname"; obj.userid = ""; obj.passwd = ""; string jsonResponse = string.Empty; string output1 = JsonConvert.SerializeObject(obj); HttpWebRequest reponse; reponse = clsgen.JSON(output1, "https://cpanel.gohappynetwork.com/DTProcess.aspx"); jsonResponse = clsgen.GetResponse(reponse); res = JsonConvert.DeserializeObject <ResponseGetNameReferialid>(jsonResponse); ApiPinCoderesponse Code = new ApiPinCoderesponse(); { Code.request = output1; Code.response = jsonResponse; Code.url = "https://cpanel.gohappynetwork.com/DTProcess.aspx"; } return(Json(jsonResponse)); }
public async Task <ActionResult> GetRegilionResponse(string RadioValue) { ReligionReqType req = new ReligionReqType(); General clsgen = new General(); this._APIManager = new APIRepository(); RegligionResponse Regilion = new RegligionResponse(); string jsonResponse = string.Empty; if (RadioValue == "R") { req.reqtype = "religion"; } else if (RadioValue == "N") { req.reqtype = "nonreligion"; } else if (RadioValue == "") { this.model.religion = new List <Religion>(); this.model.religion.Add(new Religion { id = "0", religion = "-Not Available-" }); } string output1 = JsonConvert.SerializeObject(req); HttpWebRequest reponse; reponse = clsgen.JSON(output1, "https://cpanel.gohappynetwork.com/DTProcess.aspx"); jsonResponse = clsgen.GetResponse(reponse); Regilion = JsonConvert.DeserializeObject <RegligionResponse>(jsonResponse); if (RadioValue == "N") { Regilion.nonreligions.RemoveAt(0); } else if (RadioValue == "R") { Regilion.religions.RemoveAt(0); } ApiPinCoderesponse Code = new ApiPinCoderesponse(); { Code.request = output1; Code.response = jsonResponse; Code.url = "https://cpanel.gohappynetwork.com/DTProcess.aspx"; } var statusID = await this._APIManager.SaveAPIRequest(Code); return(Json(Regilion)); }
public async Task <Response> SaveAPIRequest(ApiPinCoderesponse code) { var filterData = JsonConvert.SerializeObject(code); var result = await CallPostFunction(filterData, "SaveAPIRequest"); //var result = await CallPostFunction(string.Empty, "AreaList"); if (result == null || !result.Status) { return(null); } else { var Area = result.ResponseValue; //var Area = JsonConvert.DeserializeObject<Response>(result.ResponseValue); return(result); } }
public async Task <ActionResult> getPinCodeStateDetail(string pinCode) { this.model = new Dashboard(); this._APIManager = new APIRepository(); AreaCoderesponse Area = new AreaCoderesponse(); // var arealist= AssignOtherAreaCode(pinCode); Response responseDetail = new Response(); General clsgen = new General(); string jsonResponse = string.Empty; try { APIOtherPinCode otherPincode = new APIOtherPinCode(); otherPincode.reqtype = "getpincodedetail"; otherPincode.pincode = pinCode; string output1 = JsonConvert.SerializeObject(otherPincode); HttpWebRequest reponse; reponse = clsgen.JSON(output1, "https://cpanel.gohappynetwork.com/DTProcess.aspx"); jsonResponse = clsgen.GetResponse(reponse); Area = JsonConvert.DeserializeObject <AreaCoderesponse>(jsonResponse); ApiPinCoderesponse Code = new ApiPinCoderesponse(); { Code.request = output1; Code.response = jsonResponse; Code.url = "https://cpanel.gohappynetwork.com/DTProcess.aspx"; } var statusID = await this._APIManager.SaveAPIRequest(Code); //statusID = await Task.Run(() => entity.sp_SaveAPIRequest(output1, jsonResponse, "https://cpanel.gohappynetwork.com/DTProcess.aspx")); //responseDetail.ResponseValue = jsonResponse; } catch (Exception ex) { } return(Json(Area)); }
public async Task <ActionResult> SaveOtherRegister(string mobileNo, string referralid, string name, string address, string statecode, string district, string city, string email, string areacode, string citycode, string districtcode, string panno, string pinCode, string radiovalue, string religionid, string religionname, string State) { General clsgen = new General(); AreaCoderesponse Area = new AreaCoderesponse(); this._APIManager = new APIRepository(); string jsonResponse = string.Empty; ApiOtherRegister register = new ApiOtherRegister(); try { register.reqtype = "register"; register.username = string.Empty; register.name = name; register.mobile = "0"; register.pincode = pinCode; register.referralid = referralid == null ? "0" : referralid; register.side = "1"; register.fname = string.Empty; register.dob = "08-04-1992"; register.ismarried = "Y"; register.marriagedate = "08-05-2018"; register.address = address; register.statecode = statecode; register.district = district; register.city = city; register.mobl = mobileNo; register.phoneno = "1482220754"; register.email = email; register.nominee = "testjfds"; register.relation = "dsdd"; register.mpasswd = "123456"; register.areacode = areacode; register.citycode = citycode; register.districtcode = districtcode; register.frelation = "D/O"; register.actype = "CHOOSE Account Type"; register.bankcode = "30"; register.panno = panno; register.accountno = "123456868"; register.ifsc = "PUNB112478"; register.branch = "sanganerigate"; register.aadharno = "12323434"; register.jointype = "N"; register.religiontype = radiovalue; register.religionid = "0"; register.religionname = ""; register.nonreligionid = "0"; register.nonreligionname = ""; // if(radiovalue=="R") //{ // register.religionid = "0";//religionid; // register.religionname = ""; // register.nonreligionid = "0"; // register.nonreligionname = ""; //} //else //{ // register.religionid = "0"; // register.religionname = ""; // register.nonreligionid = religionid; // register.nonreligionname = religionname; //} string output1 = JsonConvert.SerializeObject(register); HttpWebRequest reponse; reponse = clsgen.JSON(output1, "https://cpanel.gohappynetwork.com/DTProcess.aspx"); jsonResponse = clsgen.GetResponse(reponse); ApiPinCoderesponse Code = new ApiPinCoderesponse(); { Code.request = output1; Code.response = jsonResponse; Code.url = "https://cpanel.gohappynetwork.com/DTProcess.aspx"; } var statusID = await this._APIManager.SaveAPIRequest(Code); } catch (Exception ex) { } return(Json(jsonResponse)); }