public ActionResult AuthorizationView_Test() { ((IEnumerable <string>) this.get_Request().Form.GetValues("draw")).FirstOrDefault <string>(); string str1 = ((IEnumerable <string>) this.get_Request().Form.GetValues("start")).FirstOrDefault <string>(); string str2 = ((IEnumerable <string>) this.get_Request().Form.GetValues("length")).FirstOrDefault <string>(); string str3 = ((IEnumerable <string>) this.get_Request().Form.GetValues("columns[" + ((IEnumerable <string>) this.get_Request().Form.GetValues("order[0][column]")).FirstOrDefault <string>() + "][name]")).FirstOrDefault <string>(); string str4 = ((IEnumerable <string>) this.get_Request().Form.GetValues("order[0][dir]")).FirstOrDefault <string>(); string str5 = ((IEnumerable <string>) this.get_Request().Form.GetValues("search[value]")).FirstOrDefault <string>(); int num1 = str2 != null?Convert.ToInt32(str2) : 0; int num2 = str1 != null?Convert.ToInt32(str1) : 0; if (string.IsNullOrEmpty(str5)) { ; } long int64 = Convert.ToInt64(this.get_Session()["MemberCode"]); Convert.ToInt64(this.get_Session()["MemberPolicyCode"]); List <Authorization> source = (List <Authorization>)SqlMapper.AsList <Authorization>(SqlMapper.Query <Authorization>(this._db, " SELECT * FROM (SELECT TO_DATE(HDR.TRANSACTIONDATE,'DD/MM/RRRR HH24:MI:SS') REQUESTDATE, Decode(CLAIM_STATUS, 1, NULL, TO_DATE(HDR.LASTMODIFIEDON, 'DD/MM/RRRR HH24:MI:SS')) APPROVEDDATE, PRIOR_AUTHORIZATION_ID,PROVIDERNAME,Decode(AUTHORIZEDSTATUS, 0, 'Pending', 1, 'Approved', 2, 'Rejected') Status FROM IM_AUTHORIZATION_PROCESS_HDR HDR LEFT JOIN IM_PROVIDERS P ON P.PROVIDERCODE = HDR.PROVIDER_CODE WHERE HDR.MEMBER_CODE = " + (object)int64 + ") ORDER BY " + str3 + " " + str4, (object)null, (IDbTransaction)null, true, new int?(), new CommandType?())); long num3 = (long)source.Count <Authorization>(); return((ActionResult)this.Json((object)new { Result = "S", data = source.ToList <Authorization>(), recordsFiltered = num3, recordsTotal = num3 }, (JsonRequestBehavior)0)); }
public ActionResult ProviderClaimHistoryView() { return((ActionResult)this.Json((object)new { Result = "S", ProviderClaimHistoryResult = ((IEnumerable <ProviderClaimHistory>)SqlMapper.AsList <ProviderClaimHistory>(SqlMapper.Query <ProviderClaimHistory>(this._db, " SELECT InvoiceNumber,ACardID CardNo,AMemberName MemberName,TransactionDate,Request_Amount,Approved_Amount,Decode(Hdr.Claim_Status,1,'Pending',2,'Processed') Status From IM_Claim_Process_Header Hdr,IM_MemberPolicy IM Where Hdr.MemberPolicyCode = IM.MemberPolicyCode And Hdr.Provider_Code = " + (object)Convert.ToInt64(this.get_Session()["ProviderCode"]), (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))).ToList <ProviderClaimHistory>() }, (JsonRequestBehavior)0)); }
public ActionResult ClaimHistoryView() { return((ActionResult)this.Json((object)new { Result = "S", ClaimResult = ((IEnumerable <ClaimHistory>)SqlMapper.AsList <ClaimHistory>(SqlMapper.Query <ClaimHistory>(this._db, "SELECT MEM.* FROM IM_MEMBERPROFILE_CH_VW MEM Where MEM.MEMBER_CODE =" + (object)Convert.ToInt64(this.get_Session()["MemberCode"]), (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))).ToList <ClaimHistory>() }, (JsonRequestBehavior)0)); }
public ActionResult ProviderNetworkView() { Convert.ToInt64(this.get_Session()["MemberCode"]); return((ActionResult)this.Json((object)new { Result = "S", ProviderNetworkResult = ((IEnumerable <ProviderNetwork>)SqlMapper.AsList <ProviderNetwork>(SqlMapper.Query <ProviderNetwork>(this._db, " SELECT NVL(VW.PROVIDERID,'') PROVIDERID,NVL(VW.PROVIDERNAME,'')PROVIDERNAME,NVL(GEN.CONSTANTNAME,'') PROVIDERTYPE, NVL(Nvl(PROVIDERMAINPHONE, PROVIDERMOBILE),'') PROVIDERMAINPHONE,NVL(VW.ADDRESS,'') ADDRESS, NVL(VW.CITYNAME,'') CITYNAME,NVL(VW.PROVIDERAREA,'') PROVIDERAREA FROM IM_PROVIDERNETWORK_VW VW LEFT JOIN GENCONSTANT GEN ON GEN.CONSTANTVALUE = VW.PROVIDERTYPE AND GEN.CATEGORY = 'PROVIDERTYPE' AND Upper(GEN.LANGUAGECODE) = 'EN-US' LEFT JOIN GENCONSTANT GEN1 ON GEN1.CONSTANTVALUE = VW.SPECIALITY AND GEN1.CATEGORY = 'Speciality' AND Upper(GEN1.LANGUAGECODE) = 'EN-US' WHERE NVL(VW.PROVIDERSTATUS,0)=0 AND VW.MEMBERPOLICYCODE = " + (object)Convert.ToInt64(this.get_Session()["MemberPolicyCode"]), (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))).ToList <ProviderNetwork>() }, (JsonRequestBehavior)0)); }
private static bool IsWriteable(PropertyInfo pi) { List <object> list = SqlMapper.AsList <object>((IEnumerable <object>)pi.GetCustomAttributes(typeof(WriteAttribute), false)); if (list.Count != 1) { return(true); } return(((WriteAttribute)list[0]).Write); }
public ActionResult AuthorizationView() { long int64 = Convert.ToInt64(this.get_Session()["MemberCode"]); Convert.ToInt64(this.get_Session()["MemberPolicyCode"]); return((ActionResult)this.Json((object)new { Result = "S", AuthorizationResult = ((IEnumerable <Authorization>)SqlMapper.AsList <Authorization>(SqlMapper.Query <Authorization>(this._db, " SELECT TO_CHAR(HDR.TRANSACTIONDATE,'DD/MM/RRRR HH24:MI') REQUESTDATE, Decode(CLAIM_STATUS, 1, NULL, TO_CHAR(HDR.LASTMODIFIEDON, 'DD/MM/RRRR HH24:MI')) APPROVEDDATE, PRIOR_AUTHORIZATION_ID,PROVIDERNAME,Decode(AUTHORIZEDSTATUS, 0, 'Pending', 1, 'Approved', 2, 'Rejected') Status FROM IM_AUTHORIZATION_PROCESS_HDR HDR LEFT JOIN IM_PROVIDERS P ON P.PROVIDERCODE = HDR.PROVIDER_CODE WHERE HDR.MEMBER_CODE = " + (object)int64 + " ORDER BY HDR.TRANSACTIONDATE DESC", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))).ToList <Authorization>() }, (JsonRequestBehavior)0)); }
public ActionResult GetMemberByFP() { try { new FingerPrint().DoEvent(); if (this.get_Session()["BioUser"] == null) { return((ActionResult)this.Json((object)new { Result = "System Cannot find Member FP. Try again !" }, (JsonRequestBehavior)0)); } if (this.get_Session()["BioUser"].ToString() == "65535") { return((ActionResult)this.Json((object)new { Result = "Member is not regsitered in Biometric Device!Please contact administrator" }, (JsonRequestBehavior)0)); } string str = this.get_Session()["BioUser"].ToString(); if (Convert.ToInt64(SqlMapper.ExecuteScalar(this._db, "Select Count(*) From IM_MEMBER_ATT Where EmployeeNumber = '" + str + "'", (object)null, (IDbTransaction)null, new int?(), new CommandType?())) <= 0L) { return((ActionResult)this.Json((object)new { Result = "Member is not regsitered in Insurance System!Please contact administrator" }, (JsonRequestBehavior)0)); } long int64 = Convert.ToInt64(SqlMapper.ExecuteScalar(this._db, "Select Count(*) From IM_MEMBER_ATT Where EmployeeNumber = '" + str + "'", (object)null, (IDbTransaction)null, new int?(), new CommandType?())); this.get_Session()["ProviderID"].ToString(); List <MemberDetails> source = (List <MemberDetails>)SqlMapper.AsList <MemberDetails>(SqlMapper.Query <MemberDetails>(this._db, " SELECT (MPOL.ACARDID) CARDNO,(MEM.EMIRATES_ID) EMIRATESID,(MPOL.AMEMBERNAME) MEMBERNAME, (To_Char(MPOL.MEMBERSTARTDATE, 'DD/MM/RRRR')) VALIDFROMDATE,(To_Char(Nvl(MPOL.MEMBERENDDATE, MPOL.POLICYENDDDATE), 'DD/MM/RRRR')) VALIDTODATE, GET_MEMBER_STATUS((MPOL.MEMBERPOLICYCODE)) STATUS,GET_MEMBER_ELIG((MPOL.MEMBERPOLICYCODE)," + (object)Convert.ToInt64(this.get_Session()["ProviderCode"]) + ") ELIGIBILITY, GET_MEMBER_ELIG_CT((MPOL.ACARDID)) CARDTEXT,50000 BENEFITLIMIT FROM IM_MEMBERPOLICY MPOL JOIN IM_MEMBERS MEM ON MEM.MEMBER_CODE = MPOL.MEMBERCODE LEFT JOIN GENCONSTANT GEN ON GEN.CATEGORY = 'CUSSTATUS' AND GEN.CONSTANTVALUE = MEM.STATUS AND Upper(GEN.LANGUAGECODE) = 'EN-US' WHERE MPOL.MEMBERPOLICYCODE = " + (object)int64, (object)null, (IDbTransaction)null, true, new int?(), new CommandType?())); if (source.Count > 0) { return((ActionResult)this.Json((object)new { Result = "S", MemberResult = source.ToList <MemberDetails>() }, (JsonRequestBehavior)0)); } } catch (Exception ex) { return((ActionResult)this.Json((object)new { Result = ex.Message }, (JsonRequestBehavior)0)); } return((ActionResult)this.Json((object)new { Result = "S" }, (JsonRequestBehavior)0)); }
public ActionResult Index() { List <Member> memberList = (List <Member>)SqlMapper.AsList <Member>(SqlMapper.Query <Member>(this._db, "SELECT MEM.* FROM IM_MEMBERPROFILE_VW MEM Where MEM.ID =" + (object)Convert.ToInt64(this.get_Session()["MemberCode"]), (object)null, (IDbTransaction)null, true, new int?(), new CommandType?())); if (memberList.Count > 0) { this.get_Session()["MemberDetails"] = (object)memberList[0]; } Member member = (Member)this.get_Session()["MemberDetails"]; member.ResidentLocationList = new SelectList((IEnumerable)this.Loc.GetMobileList(), "ResidentialLocationCode", "ResidentialLocationName"); member.WorkLocationList = new SelectList((IEnumerable)this.Loc.GetMobileList(), "ResidentialLocationCode", "ResidentialLocationName"); return((ActionResult)this.View((object)member)); }
public ActionResult CheckProviderCredential() { string empty1 = string.Empty; string empty2 = string.Empty; if (this.get_Request().Cookies["UserName"] != null && this.get_Request().Cookies["UserName"].Value != null) { empty1 = this.get_Request().Cookies["UserName"].Value.ToString(); } if (this.get_Request().Cookies["Password"] != null && this.get_Request().Cookies["Password"].Value != null) { empty2 = this.get_Request().Cookies["Password"].Value.ToString(); } List <Provider> providerList = (List <Provider>)SqlMapper.AsList <Provider>(SqlMapper.Query <Provider>(this._db, " SELECT PROVIDERCODE ID,PROVIDERID,PROVIDERNAME, PROVIDERMAINPHONE,PRO.PROVIDERMAINEMAIL EMAIL,PRO.ADDRESS,GEN.COUNTRYNAME, GEN1.PROVINCENAME,PRO.PROVIDERAREA FROM IM_PROVIDERS PRO LEFT JOIN GENCOUNTRY GEN ON GEN.COUNTRYCODE = PRO.COUNTRYCODE LEFT JOIN GENPROVINCE GEN1 ON GEN1.PROVINCECODE = PRO.CITYCODE Where PRO.USERNAME = '******' and PRO.PASSWORD ='******' ", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?())); if (providerList.Count <= 0) { return((ActionResult)this.RedirectToAction("Index", "Provider")); } this.get_Session()["ProviderCode"] = (object)providerList[0].ID; this.get_Session()["ProviderDetails"] = (object)providerList[0]; return((ActionResult)this.RedirectToAction("Index", "Provider")); }
public IEnumerable <ClaimsModel> GetVersionDetails() { return((IEnumerable <ClaimsModel>)SqlMapper.AsList <ClaimsModel>(SqlMapper.Query <ClaimsModel>(this._db, "Select DetailCode,Code FROM IM_VERSION_DETALIS WHERE VERSIONCODE IN(SELECT VERSIONCODE FROM IM_ACTIVITY_DETAILS WHERE TYPECODE <> 100000000000000001) AND ROWNUM < 101", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))); }
public IEnumerable <ClaimsModel> GetClaimType() { return((IEnumerable <ClaimsModel>)SqlMapper.AsList <ClaimsModel>(SqlMapper.Query <ClaimsModel>(this._db, "SELECT 1 RequestTypecode,'Claims' RequestTypeName FROM DUAL UNION SELECT 2 RequestTypecode,'Approvals' RequestTypeName FROM DUAL", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))); }
public IEnumerable <ClaimsModel> GetDiagnosisTypeList() { return((IEnumerable <ClaimsModel>)SqlMapper.AsList <ClaimsModel>(SqlMapper.Query <ClaimsModel>(this._db, "Select TypeCode,TypeName from IM_ACTIVITY_TYPES WHERE TYPECODE = 100000000000000001", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))); }
public IEnumerable <ClaimsModel> GetClinicianList(long ProviderCode) { return((IEnumerable <ClaimsModel>)SqlMapper.AsList <ClaimsModel>(SqlMapper.Query <ClaimsModel>(this._db, "Select CDCode,LicenseID CDName From IM_Clinicians WHERE CDCODE IN (SELECT CLINICIANCODE FROM IM_PROVIDER_CLINICIAN_LINK WHERE PROVIDERCODE = " + (object)ProviderCode + ")", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))); }
public IEnumerable <Member> GetMobileList() { return((IEnumerable <Member>)SqlMapper.AsList <Member>(SqlMapper.Query <Member>(this._db, "Select Value ResidentialLocationCode,Name ResidentialLocationName From IM_MEMBERLOCATION_VW", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))); }
public bool VerifyAccount(string UserName, string Password) { return(((List <Provider>)SqlMapper.AsList <Provider>(SqlMapper.Query <Provider>(this._db, " SELECT PROVIDERCODE ID,PROVIDERID,PROVIDERNAME, PROVIDERMAINPHONE,PRO.PROVIDERMAINEMAIL EMAIL,PRO.ADDRESS,GEN.COUNTRYNAME, GEN1.PROVINCENAME,PRO.PROVIDERAREA FROM IM_PROVIDERS PRO LEFT JOIN GENCOUNTRY GEN ON GEN.COUNTRYCODE = PRO.COUNTRYCODE LEFT JOIN GENPROVINCE GEN1 ON GEN1.PROVINCECODE = PRO.CITYCODE Where PRO.USERNAME = '******' and PRO.PASSWORD ='******' ", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))).Count > 0); }
public ActionResult ValidateCredential(LoginModel model) { if (this.get_ModelState().get_IsValid()) { if (string.IsNullOrEmpty(model.Password)) { ((ControllerBase)this).get_TempData().set_Item("PasswordError", (object)"Please enter a valid password"); return((ActionResult)this.RedirectToAction("Index", "Login")); } if (string.IsNullOrEmpty(model.UserName)) { ((ControllerBase)this).get_TempData().set_Item("UserNameError", (object)"Please enter a valid username"); return((ActionResult)this.RedirectToAction("Index", "Login")); } string pattern = "^[A-Za-z0-9\\[\\]/!$%^&*()\\-_+{};:£@#.?]*$"; if (!Regex.IsMatch(model.Password, pattern) || !Regex.IsMatch(model.UserName, pattern)) { if (!Regex.IsMatch(model.Password, pattern)) { ((ControllerBase)this).get_TempData().set_Item("PasswordError", (object)"Please enter a valid password"); } if (!Regex.IsMatch(model.UserName, pattern)) { ((ControllerBase)this).get_TempData().set_Item("UserNameError", (object)"Please enter a valid username"); } return((ActionResult)this.RedirectToAction("Index", "Login")); } if (model.Remember) { HttpCookie cookie1 = new HttpCookie("UserName"); HttpCookie httpCookie1 = cookie1; DateTime now = DateTime.Now; DateTime dateTime1 = now.AddYears(1); httpCookie1.Expires = dateTime1; cookie1.Value = model.UserName; this.get_Response().Cookies.Add(cookie1); HttpCookie cookie2 = new HttpCookie("Password"); HttpCookie httpCookie2 = cookie2; now = DateTime.Now; DateTime dateTime2 = now.AddYears(1); httpCookie2.Expires = dateTime2; cookie2.Value = model.Password; this.get_Response().Cookies.Add(cookie2); } else { HttpCookie cookie1 = new HttpCookie("UserName"); HttpCookie httpCookie1 = cookie1; DateTime now = DateTime.Now; DateTime dateTime1 = now.AddMinutes(20.0); httpCookie1.Expires = dateTime1; cookie1.Value = model.UserName; this.get_Response().Cookies.Add(cookie1); HttpCookie cookie2 = new HttpCookie("Password"); HttpCookie httpCookie2 = cookie2; now = DateTime.Now; DateTime dateTime2 = now.AddMinutes(20.0); httpCookie2.Expires = dateTime2; cookie2.Value = model.Password; this.get_Response().Cookies.Add(cookie2); } List <Provider> providerList = (List <Provider>)SqlMapper.AsList <Provider>(SqlMapper.Query <Provider>(this._db, " SELECT PROVIDERCODE ID,PROVIDERID,PROVIDERNAME, PROVIDERMAINPHONE,PRO.PROVIDERMAINEMAIL EMAIL,PRO.ADDRESS,GEN.COUNTRYNAME, GEN1.PROVINCENAME,PRO.PROVIDERAREA FROM IM_PROVIDERS PRO LEFT JOIN GENCOUNTRY GEN ON GEN.COUNTRYCODE = PRO.COUNTRYCODE LEFT JOIN GENPROVINCE GEN1 ON GEN1.PROVINCECODE = PRO.CITYCODE Where PRO.USERNAME = '******' and PRO.PASSWORD ='******' ", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?())); if (providerList.Count > 0) { this.get_Session()["ProviderID"] = (object)providerList[0].ProviderID; this.get_Session()["ProviderName"] = (object)providerList[0].ProviderName; this.get_Session()["ProviderCode"] = (object)providerList[0].ID; this.get_Session()["ProviderDetails"] = (object)providerList[0]; return((ActionResult)this.RedirectToAction("Index", "Provider")); } } return((ActionResult)this.RedirectToAction("Index", "Login")); }
public IEnumerable <ClaimsModel> GetTreatmentTypeList() { return((IEnumerable <ClaimsModel>)SqlMapper.AsList <ClaimsModel>(SqlMapper.Query <ClaimsModel>(this._db, "SELECT ConstantValue TreatmentTypeCode,ConstantName TreatmentTypeName FROM GENCONSTANT WHERE CATEGORY='APPLICABLE' AND LANGUAGECODE='en-US'", (object)null, (IDbTransaction)null, true, new int?(), new CommandType?()))); }
public ActionResult Index() { return((ActionResult)this.View((object)((List <EnquiryModel>)SqlMapper.AsList <EnquiryModel>(SqlMapper.Query <EnquiryModel>(this._db, "SELECT MEM.GroupName,MobileNumber,EmailID,0 ComplaintType,'' Description,'' Comments From IM_MEMBERPROFILE_VW MEM Where MEM.ID =" + (object)Convert.ToInt64(this.get_Session()["MemberCode"]), (object)null, (IDbTransaction)null, true, new int?(), new CommandType?())))[0])); }
public List <T> AsList <T>(IEnumerable <T> source) { return(SqlMapper.AsList(source)); }
public ActionResult GetMemberDetails(string formData) { try { this.get_Session()["ProviderID"].ToString(); long int64 = Convert.ToInt64(this.get_Session()["ProviderCode"]); MemberDetails memberDetails = (MemberDetails)JsonConvert.DeserializeObject <MemberDetails>(formData); string str1 = "SELECT (MP.ACARDID) CARDNO,(M.EMIRATES_ID) EMIRATESID,(MP.AMEMBERNAME) MEMBERNAME, (To_Char(MP.MEMBERSTARTDATE, 'DD/MM/RRRR')) VALIDFROMDATE,(To_Char(Nvl(MP.MEMBERENDDATE, MP.POLICYENDDDATE), 'DD/MM/RRRR')) VALIDTODATE, GET_MEMBER_STATUS((MP.MEMBERPOLICYCODE)) STATUS,GET_MEMBER_ELIG((MP.MEMBERPOLICYCODE), " + (object)int64 + ") ELIGIBILITY, GET_MEMBER_ELIG_CT((M.CARDNO)) CARDTEXT, CASE WHEN NVL(M.CANCER,'N') = 'Y' THEN 'Yes' WHEN NVL(M.HEPATITIS_C,'N') = 'Y' THEN 'Yes' ELSE 'No' END BasmaInitiative FROM IM_MEMBERS M JOIN IM_MEMBERPOLICY MP ON MP.MEMBERCODE = M.MEMBER_CODE JOIN IM_POLICY POL ON POL.POLICYCODE = MP.POLICYCODE WHERE TO_DATE(SYSDATE,'DD/MM/RRRR') BETWEEN TO_DATE(MP.MEMBERSTARTDATE,'DD/MM/RRRR') AND TO_DATE(NVL(MP.MEMBERENDDATE,MP.POLICYENDDDATE),'DD/MM/RRRR') AND POL.OWNERCODE IN(3,13,21) AND M.POLICYTYPE = 1 AND (MP.ACARDID = '" + memberDetails.CardNo + "' OR REPLACE(M.EMIRATES_ID,'-') = REPLACE('" + memberDetails.Emiratesid + "','-')) UNION SELECT (MP.ACARDID) CARDNO,(M.EMIRATES_ID) EMIRATESID,(MP.AMEMBERNAME) MEMBERNAME, (To_Char(MP.MEMBERSTARTDATE, 'DD/MM/RRRR')) VALIDFROMDATE,(To_Char(Nvl(MP.MEMBERENDDATE, MP.POLICYENDDDATE), 'DD/MM/RRRR')) VALIDTODATE, GET_MEMBER_STATUS((MP.MEMBERPOLICYCODE)) STATUS,GET_MEMBER_ELIG((MP.MEMBERPOLICYCODE), " + (object)int64 + ") ELIGIBILITY, GET_MEMBER_ELIG_CT((M.CARDNO)) CARDTEXT, CASE WHEN NVL(M.CANCER,'N') = 'Y' THEN 'Yes' WHEN NVL(M.HEPATITIS_C,'N') = 'Y' THEN 'Yes' ELSE 'No' END BasmaInitiative FROM IM_MEMBERS M JOIN IM_MEMBERPOLICY MP ON MP.MEMBERCODE = M.MEMBER_CODE JOIN IM_INDIVIDUALPOLICY POL ON POL.INDIVIDUALPOLICYCODE = MP.POLICYCODE WHERE TO_DATE(SYSDATE,'DD/MM/RRRR') BETWEEN TO_DATE(MP.MEMBERSTARTDATE,'DD/MM/RRRR') AND TO_DATE(NVL(MP.MEMBERENDDATE,MP.POLICYENDDDATE),'DD/MM/RRRR') AND POL.OWNERCODE IN(3,13,21) AND M.POLICYTYPE = 2 AND (MP.ACARDID = '" + memberDetails.CardNo + "' OR REPLACE(M.EMIRATES_ID,'-') = REPLACE('" + memberDetails.Emiratesid + "','-')) "; string str2 = "SELECT (M.CARDNO) CARDNO,(M.EMIRATES_ID) EMIRATESID,(MP.AMEMBERNAME) MEMBERNAME, (To_Char(MP.MEMBERSTARTDATE, 'DD/MM/RRRR')) VALIDFROMDATE,(To_Char(Nvl(MP.MEMBERENDDATE, MP.POLICYENDDDATE), 'DD/MM/RRRR')) VALIDTODATE, GET_MEMBER_STATUS((MP.MEMBERPOLICYCODE)) STATUS,GET_MEMBER_ELIG((MP.MEMBERPOLICYCODE), " + (object)int64 + ") ELIGIBILITY, GET_MEMBER_ELIG_CT((M.CARDNO)) CARDTEXT,(MP.MEMBERPOLICYCODE) MEMBERPOLICYCODE FROM IM_MEMBERS M JOIN IM_MEMBERPOLICY MP ON MP.MEMBERCODE = M.MEMBER_CODE JOIN IM_POLICY POL ON POL.POLICYCODE = MP.POLICYCODE WHERE TO_DATE(SYSDATE,'DD/MM/RRRR') BETWEEN TO_DATE(MP.MEMBERSTARTDATE,'DD/MM/RRRR') AND TO_DATE(NVL(MP.MEMBERENDDATE,MP.POLICYENDDDATE),'DD/MM/RRRR') AND POL.OWNERCODE IN(3,13,21) AND M.POLICYTYPE = 1 AND (MP.ACARDID = '" + memberDetails.CardNo + "' OR REPLACE(M.EMIRATES_ID,'-') = REPLACE('" + memberDetails.Emiratesid + "','-')) UNION SELECT (M.CARDNO) CARDNO,(M.EMIRATES_ID) EMIRATESID,(MP.AMEMBERNAME) MEMBERNAME, (To_Char(MP.MEMBERSTARTDATE, 'DD/MM/RRRR')) VALIDFROMDATE,(To_Char(Nvl(MP.MEMBERENDDATE, MP.POLICYENDDDATE), 'DD/MM/RRRR')) VALIDTODATE, GET_MEMBER_STATUS((MP.MEMBERPOLICYCODE)) STATUS,GET_MEMBER_ELIG((MP.MEMBERPOLICYCODE), " + (object)int64 + ") ELIGIBILITY, GET_MEMBER_ELIG_CT((M.CARDNO)) CARDTEXT,(MP.MEMBERPOLICYCODE) MEMBERPOLICYCODE FROM IM_MEMBERS M JOIN IM_MEMBERPOLICY MP ON MP.MEMBERCODE = M.MEMBER_CODE JOIN IM_INDIVIDUALPOLICY POL ON POL.INDIVIDUALPOLICYCODE = MP.POLICYCODE WHERE TO_DATE(SYSDATE,'DD/MM/RRRR') BETWEEN TO_DATE(MP.MEMBERSTARTDATE,'DD/MM/RRRR') AND TO_DATE(NVL(MP.MEMBERENDDATE,MP.POLICYENDDDATE),'DD/MM/RRRR') AND POL.OWNERCODE IN(3,13,21) AND M.POLICYTYPE = 2 AND (MP.ACARDID = '" + memberDetails.CardNo + "' OR REPLACE(M.EMIRATES_ID,'-') = REPLACE('" + memberDetails.Emiratesid + "','-')) "; List <MemberDetails> source = (List <MemberDetails>)SqlMapper.AsList <MemberDetails>(SqlMapper.Query <MemberDetails>(this._db, str1, (object)null, (IDbTransaction)null, true, new int?(), new CommandType?())); List <MemberPolicyDetails> memberPolicyDetailsList = (List <MemberPolicyDetails>)SqlMapper.AsList <MemberPolicyDetails>(SqlMapper.Query <MemberPolicyDetails>(this._db, str2, (object)null, (IDbTransaction)null, true, new int?(), new CommandType?())); if (memberPolicyDetailsList.Count > 0) { long num = 0; if (!string.IsNullOrEmpty(memberPolicyDetailsList[0].MemberPolicyCode)) { num = Convert.ToInt64(memberPolicyDetailsList[0].MemberPolicyCode); } SqlMapper.Execute(this._db, "INSERT INTO IM_PROVIDER_ELIG_CHECK SELECT '" + memberDetails.CardNo + "','" + memberDetails.Emiratesid + "'," + (object)num + "," + (object)int64 + ",SYSDATE FROM DUAL", (object)null, (IDbTransaction)null, new int?(), new CommandType?()); return((ActionResult)this.Json((object)new { Result = "S", MemberResult = source.ToList <MemberDetails>() }, (JsonRequestBehavior)0)); } SqlMapper.Execute(this._db, "INSERT INTO IM_PROVIDER_ELIG_CHECK SELECT '" + memberDetails.CardNo + "','" + memberDetails.Emiratesid + "',null," + (object)int64 + ",SYSDATE FROM DUAL", (object)null, (IDbTransaction)null, new int?(), new CommandType?()); ((ControllerBase)this).get_TempData().set_Item("MemberValidtyResult", (object)"Incorrect Card No or Emirates Id . Please enter valid one !"); return((ActionResult)this.Json((object)new { Result = "Incorrect Card No or Emirates Id . Please enter valid one !", MemberResult = source.ToList <MemberDetails>() }, (JsonRequestBehavior)0)); } catch (Exception ex) { return((ActionResult)this.Json((object)new { Result = ex.Message }, (JsonRequestBehavior)0)); } }