public static dynamic addMember(householdMappingModel obj) { dynamic objdata = new ExpandoObject(); try { gswsModel objGsws = new gswsModel(); objGsws.type = "7"; objGsws.uid = obj.uidNum; DataTable dt = routerModule.householdMappingProc(objGsws); if (dt != null && dt.Rows.Count > 0) { objdata.status = true; objdata.result = dt; } else { objdata.status = false; objdata.result = "No data available for this aadhaar number..."; } } catch (Exception ex) { objdata.status = 500; objdata.result = ex.Message.ToString(); return(objdata); } return(objdata); }
public static dynamic sendOTP(householdMappingModel obj) { dynamic objdata = new ExpandoObject(); try { SMSService.SMSService objSMS = new SMSService.SMSService(); Random objRan = new Random(); string otp = objRan.Next(111111, 999999).ToString(); string message = "GSWS OTP : " + otp + "\n OTP will Expire in 15 minutes"; string response = objSMS.SendTeluguSMS(obj.mobileNum, message); if (response.Contains("402")) { objdata.status = true; objdata.result = otp; } else { objdata.status = false; objdata.result = "Failed to send OTP please try again !!!"; } } catch (Exception ex) { objdata.status = 500; objdata.result = ex.Message.ToString(); return(objdata); } return(objdata); }
public static dynamic clusterList(householdMappingModel obj) { dynamic objdata = new ExpandoObject(); try { gswsModel objGsws = new gswsModel(); objGsws.type = "9"; objGsws.uid = obj.gsws_code; DataTable dt = routerModule.householdMappingProc(objGsws); if (dt != null && dt.Rows.Count > 0) { objdata.status = true; objdata.result = dt; } else { objdata.status = false; objdata.result = "No clusters available for this secretariat..."; } } catch (Exception ex) { objdata.status = 500; objdata.result = ex.Message.ToString(); return(objdata); } return(objdata); }
public IHttpActionResult addMember(dynamic data) { dynamic objdata = new ExpandoObject(); try { string value = token_gen.Authorize_aesdecrpty(data); householdMappingModel rootobj = JsonConvert.DeserializeObject <householdMappingModel>(value); return(Ok(householdMappingHelper.addMember(rootobj))); } catch (Exception ex) { objdata.status = 500; objdata.result = "Session Expired !!! Please login again to continue..."; return(Ok(objdata)); } }