Esempio n. 1
0
        public JsonResult ListOfCompany()
        {
            ML.OFW.Services.OFW service = new OFW.Services.OFW();
            var respVal = service.partnerslist();

            var model = new IEnumerableResult();

            model.ListOfCompanies = respVal.partnersInfo;

            if (respVal.respCode != "0")
            {
                if (respVal.partnersInfo != null)
                {
                    return(Json(new
                    {
                        status = true,
                        errorcode = "1",
                        msg = respVal.respMsg,
                        ListofCompany = RenderPartialViewToString("_resultViewCompanies", model)
                    }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new
                    {
                        status = false,
                        respCode = "0",
                        msg = respVal.respMsg
                    }, JsonRequestBehavior.AllowGet));
                }
            }

            return(Json(new { status = false, errorcode = "0", errormsg = respVal.respMsg }));
        }
Esempio n. 2
0
        public JsonResult refBalance()
        {
            if (!User.Identity.IsAuthenticated)
            {
                RedirectToRoute("login");
            }

            string[] values = User.Identity.Name.Split('|');

            ML.OFW.Services.OFW srv = new OFW.Services.OFW();
            var resp = srv.refreshRunningBalance(values[1].Trim());

            if (resp.respCode != "0")
            {
                string balance = string.Format("{0:#,##0.00}", resp.runningBalance);

                return(Json(new
                {
                    status = true,
                    respCode = "1",
                    msg = resp.respMsg,
                    RunBal = balance
                }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new
            {
                status = false,
                respCode = "0",
                msg = resp.respMsg,
                RunBal = resp.runningBalance
            }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 3
0
        public JsonResult GenerateUserInfo()
        {
            if (!User.Identity.IsAuthenticated)
            {
                RedirectToRoute("login");
            }

            string[] values = User.Identity.Name.Split('|');

            ML.OFW.Contracts.Models.RefreshAccount refrsh = new OFW.Contracts.Models.RefreshAccount();
            refrsh.accountno = values[1].Trim();;
            refrsh.IsRefresh = 1;
            refrsh.UserName  = values[0].Trim();

            ML.OFW.Services.OFW srv = new OFW.Services.OFW();
            var resp = srv.RefreshAccount(refrsh);

            bool hasPhoto = string.IsNullOrEmpty(resp.Photo) ? false : true;

            if (resp.respCode != "0")
            {
                return(Json(new { status = true, hasImage = hasPhoto, response = resp }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new{ status = false, msg = resp.respMsg }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 4
0
        public JsonResult CalculateCharge(string acctID, string Curr)
        {
            ML.OFW.Contracts.Models.billsPayModel.partnerschargebills smodel = new OFW.Contracts.Models.billsPayModel.partnerschargebills();
            smodel.Accountid = acctID;
            smodel.currency  = Curr;

            ML.OFW.Services.OFW service = new OFW.Services.OFW();

            var respval = service.partnerschargebills(smodel);

            if (respval.respcode != 0)
            {
                return(Json(new
                {
                    status = true,
                    errorcode = "1",
                    msg = respval.message,
                    charge = respval.calc.chargeamt
                }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new
            {
                status = false,
                respCode = "0",
                msg = respval.message
            }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult MonthlyReport(string year, string month)
        {
            string[] value = User.Identity.Name.Split('|');

            ML.OFW.Contracts.Models.billsPayModel.MonthlyBillsPayReport smodel = new OFW.Contracts.Models.billsPayModel.MonthlyBillsPayReport();
            smodel.accountNo = value[1].Trim();
            smodel.UserName  = value[0].Trim();
            smodel.month     = Convert.ToInt32(month);
            smodel.year      = Convert.ToInt32(year);

            ML.OFW.Services.OFW service = new OFW.Services.OFW();

            var respVal = service.MonthlySendoutBillsPayReport(smodel);

            var model = new IenumerableReportResult();

            if (respVal.respCode != "0")
            {
                model.monthlyReport = respVal.listTransactions;
                int hasData = model.monthlyReport.Count();

                var model1 = new ReportsViewModel();
                model1.PrintBy         = respVal.printBy;
                model1.Date            = respVal.date;
                model1.runDate         = respVal.runDate;
                model1.TotalCount      = respVal.totalCount.ToString();
                model1.TotalCommission = String.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.totalCommission));
                model1.TotalAmount     = String.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.totalPrincipal));

                if (hasData > 0)
                {
                    return(Json(new
                    {
                        status = true,
                        respCode = "1",
                        msg = respVal.respMsg,
                        transDate = respVal.runDate,
                        printBy = respVal.printBy,
                        Date = respVal.date,
                        hasRecord = hasData,
                        otherData = model1,
                        monthlyReport = RenderPartialViewToString("_reportMonthly", model),
                    }, JsonRequestBehavior.AllowGet));
                }
                return(Json(new
                {
                    status = true,
                    respCode = "0",
                    msg = respVal.respMsg,
                    hasRecord = hasData
                }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new
            {
                status = false,
                respCode = "0",
                msg = respVal.respMsg,
            }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult RfcBillsPaymentForm(CancelBillsPayViewModel model)
        {
            string[] value = User.Identity.Name.Split('|');

            ML.OFW.Services.OFW service1 = new OFW.Services.OFW();
            var model2 = service1.getChargeName();

            ML.OFW.Contracts.Models.billsPayModel.changeDetailsBillspayment smodel = new OFW.Contracts.Models.billsPayModel.changeDetailsBillspayment();
            smodel.accountFirstName  = model.compFname;
            smodel.accountLastName   = model.compLname;
            smodel.accountMiddleName = model.compMname;
            smodel.accountNo         = model.Accountno;
            smodel.cancelDetails     = model.reason;
            smodel.custID            = "";
            smodel.kptn          = "";
            smodel.walletVersion = "";
            smodel.walletuser    = value[0].Trim();
            smodel.walletno      = value[1].Trim();
            smodel.longitude     = value[3].Trim();
            smodel.latitute      = value[4].Trim();
            smodel.location      = value[5].Trim();
            smodel.deviceID      = value[6].Trim();

            ML.OFW.Services.OFW service = new OFW.Services.OFW();
            var respVal = service.changeDetailsBillspayment(smodel);

            if (respVal.respCode != "0")
            {
                return(Json(new { status = true, respCode = "1", msg = respVal.respMsg, }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { status = false, respCode = "0", msg = respVal.respMsg, }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult CancelBillsPayForm(string kptnOrRef, string details)
        {
            string[] value = User.Identity.Name.Split('|');

            ML.OFW.Services.OFW service1 = new OFW.Services.OFW();
            var model2 = service1.getChargeName();

            ML.OFW.Contracts.Models.billsPayModel.cancelbillspayment smodel = new OFW.Contracts.Models.billsPayModel.cancelbillspayment();
            smodel.cancelDetails = details;
            smodel.kptn          = kptnOrRef.Trim();
            smodel.walletuser    = value[0].Trim();
            smodel.walletno      = value[1].Trim();
            smodel.longitude     = value[3].Trim();
            smodel.latitute      = value[4].Trim();
            smodel.location      = value[5].Trim();
            smodel.deviceID      = value[6].Trim();

            ML.OFW.Services.OFW service = new OFW.Services.OFW();
            var respVal = service.cancelBillspayment(smodel);

            if (respVal.respCode != "0")
            {
                return(Json(new { status = true, respCode = "1", msg = respVal.respMsg, }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { status = false, respCode = "0", msg = respVal.respMsg, }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 8
0
        public JsonResult UpdateKyc(KycViewModel model)
        {
            string[] value = User.Identity.Name.Split('|');

            if (ModelState.IsValid)
            {
                if (model.custID == "" | model.custID == null)
                {
                    return(Json(new { status = false, respCode = "0", msg = "Please verify your data." }));
                }

                ML.OFW.Contracts.Models.billsPayModel.payorUpdateKYC smodel = new OFW.Contracts.Models.billsPayModel.payorUpdateKYC();
                smodel.birthDate    = model.bdate.ToString();
                smodel.country      = model.selectcountry;
                smodel.currAdd      = model.currentAdd;
                smodel.emailAdd     = model.email;
                smodel.expiryDate   = model.ExpiryDate.ToString();
                smodel.fName        = model.Fname;
                smodel.gender       = model.gender;
                smodel.custId       = model.custID;
                smodel.modifiedBy   = value[0];
                smodel.IDNo         = model.Idno;
                smodel.IDType       = model.SelectedIDtype;
                smodel.lName        = model.Lname;
                smodel.mName        = model.Mname;
                smodel.mobileNo     = model.mobileNo;
                smodel.nationality  = model.nationality;
                smodel.permanentAdd = model.permanentAdd;
                smodel.phoneNo      = model.phoneNo;
                smodel.placeOfBirth = model.bplace;
                smodel.province     = model.provState;

                ML.OFW.Services.OFW service = new OFW.Services.OFW();
                var respVal = service.payorUpdateKYC(smodel);

                if (respVal.respCode != 0)
                {
                    return(Json(new
                    {
                        status = true,
                        respCode = "1",
                        msg = respVal.respMsg,
                        PayorData = new
                        {
                            payorID = respVal.custId,
                            payorLname = model.Lname,
                            payorFname = model.Fname,
                            payorMname = model.Mname,
                            payorContact = string.IsNullOrEmpty(model.mobileNo) ? model.phoneNo : model.mobileNo,
                            payorAddress = model.permanentAdd
                        }
                    }));
                }
                return(Json(new { status = false, respCode = "0", msg = respVal.errorDetail }));
            }
            return(Json(new { status = false, respCode = "0", msg = "Please verify your data." }));
        }
        public JsonResult DailyReport(string dtfrom)
        {
            string[] value = User.Identity.Name.Split('|');

            ML.OFW.Contracts.Models.billsPayModel.DailyBillsPayReport smodel = new OFW.Contracts.Models.billsPayModel.DailyBillsPayReport();
            smodel.accountNo = value[1].Trim();
            smodel.UserName  = value[0].Trim();
            smodel.date      = Convert.ToDateTime(dtfrom);

            ML.OFW.Services.OFW service = new OFW.Services.OFW();

            var respVal = service.DailyBillspayReport(smodel);

            if (respVal.respCode != "0")
            {
                var model = new IenumerableReportResult();
                model.dailyReport = respVal.txnList;
                int hasData = model.dailyReport.Count();

                var model1 = new ReportsViewModel();

                model1.PrintBy         = respVal.printBy;
                model1.Date            = respVal.date;
                model1.runDate         = respVal.runDate;
                model1.TotalCommission = String.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.totalCommission));
                model1.TotalAmount     = String.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.totalAmountPHP));
                model1.dtFrom          = Convert.ToDateTime(dtfrom);

                if (hasData > 0)
                {
                    return(Json(new
                    {
                        status = true,
                        respCode = "1",
                        msg = respVal.respMsg,
                        otherData = model1,
                        hasRecord = hasData,
                        dailyReport = RenderPartialViewToString("_reportDaily", model),
                    }, JsonRequestBehavior.AllowGet));
                }
                return(Json(new
                {
                    status = true,
                    respCode = "0",
                    msg = respVal.respMsg,
                    hasRecord = hasData
                }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new
            {
                status = false,
                respCode = "0",
                msg = respVal.respMsg,
            }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 10
0
        public String GetAccountBal(string AccountNo, string Ursname)
        {
            ML.OFW.Contracts.Models.RefreshAccount refrsh = new OFW.Contracts.Models.RefreshAccount();
            refrsh.accountno = AccountNo;
            refrsh.IsRefresh = 1;

            ML.OFW.Services.OFW srv = new OFW.Services.OFW();
            var resp = srv.RefreshAccount(refrsh);

            return(resp.balance);
        }
        public JsonResult MonthlyCancellationReport(string year, string month)
        {
            string[] value = User.Identity.Name.Split('|');

            ML.OFW.Contracts.Models.billsPayModel.MonthlyBillsPayReport smodel = new OFW.Contracts.Models.billsPayModel.MonthlyBillsPayReport();
            smodel.accountNo = value[1].Trim();
            smodel.UserName  = value[0].Trim();
            smodel.month     = Convert.ToInt32(month);
            smodel.year      = Convert.ToInt32(year);

            ML.OFW.Services.OFW service = new OFW.Services.OFW();

            var respVal = service.MonthlyCancelBillsPayReport(smodel);

            var model = new IenumerableReportResult();

            if (respVal.respCode != "0")
            {
                model.monthlyReport = respVal.listTransactions;
                int hasData = model.monthlyReport.Count();

                if (hasData > 0)
                {
                    return(Json(new
                    {
                        status = true,
                        respCode = "1",
                        msg = respVal.respMsg,
                        transDate = respVal.runDate,
                        printBy = respVal.printBy,
                        Date = respVal.date,
                        hasRecord = hasData,
                        monthlyReport = RenderPartialViewToString("_reportMonthly", model),
                    }, JsonRequestBehavior.AllowGet));
                }
                return(Json(new
                {
                    status = true,
                    respCode = "0",
                    msg = respVal.respMsg,
                    hasRecord = hasData
                }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new
            {
                status = false,
                respCode = "0",
                msg = respVal.respMsg,
            }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 12
0
        public ActionResult AddKyc(KycViewModel model, string q)
        {
            if (string.IsNullOrEmpty(q))
            {
                model.bdate      = DateTime.Now;
                model.ExpiryDate = DateTime.Now;
                model.isUpdate   = 0;
            }
            else
            {
                ML.OFW.Contracts.Models.billsPayModel.searchpayorbyId smodel = new OFW.Contracts.Models.billsPayModel.searchpayorbyId();
                smodel.custId  = q.Trim();
                smodel.page    = 1;
                smodel.perPage = 5;

                ML.OFW.Services.OFW service = new OFW.Services.OFW();
                var respVal = service.searchpayorbyId(smodel);

                if (respVal.respCode != 0)
                {
                    model.bdate         = Convert.ToDateTime(respVal.birthDate);
                    model.bplace        = respVal.placeOfBirth;
                    model.currentAdd    = respVal.currentAdd;
                    model.custID        = respVal.custId;
                    model.email         = respVal.emailAdd;
                    model.ExpiryDate    = Convert.ToDateTime(respVal.expiryDate);
                    model.Fname         = respVal.firstName;
                    model.gender        = respVal.gender;
                    model.Idno          = respVal.IDNo;
                    model.selectcountry = respVal.IDType;
                    model.isUpdate      = 1;
                    model.Lname         = respVal.lastName;
                    model.Mname         = respVal.middleName;
                    model.mobileNo      = respVal.mobileNo;
                    model.nationality   = respVal.nationality;
                    model.permanentAdd  = respVal.permanentAdd;
                    model.phoneNo       = respVal.phoneNo;
                    model.provState     = respVal.provinceState;
                    model.selectcountry = respVal.country;
                }
                else
                {
                    return(Json(new { status = false, respCode = "0", msg = respVal.errorDetail }));
                }
            }

            return(View(model));
        }
Esempio n. 13
0
        public JsonResult searchpayer(string Fname, string Lname, string Mname)
        {
            ML.OFW.Contracts.Models.billsPayModel.payorSearch smodel = new OFW.Contracts.Models.billsPayModel.payorSearch();

            smodel.firstName  = Fname.Trim();
            smodel.lastName   = Lname.Trim();
            smodel.middleName = Mname;
            smodel.page       = 1;
            smodel.perPage    = 100;

            ML.OFW.Services.OFW service = new OFW.Services.OFW();
            var respVal = service.payorSearch(smodel);

            var model = new IEnumerableResult();

            model.ListOfPayer = respVal.data;

            if (respVal.respCode != 0)
            {
                if (model.ListOfPayer != null)
                {
                    return(Json(new
                    {
                        status = true,
                        respCode = "1",
                        msg = respVal.message,
                        ListOfPayer = RenderPartialViewToString("_resultSearchPayer", model)
                    }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new
                    {
                        status = false,
                        respCode = "0",
                        msg = respVal.message
                    }, JsonRequestBehavior.AllowGet));
                }
            }

            return(Json(new { status = false, respCode = "0", msg = respVal.message }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 14
0
        public JsonResult ListOfrecentTrans(string custID)
        {
            ML.OFW.Contracts.Models.billsPayModel.recentTransaction smodel = new OFW.Contracts.Models.billsPayModel.recentTransaction();
            smodel.customersID = custID.Trim();

            ML.OFW.Services.OFW service = new OFW.Services.OFW();
            var respVal = service.recentTransaction(smodel);

            var model = new IEnumerableResult();

            model.ListOfRecentTrans = respVal.recentListTransaction;

            if (respVal.respcode != "0")
            {
                if (model.ListOfRecentTrans != null)
                {
                    return(Json(new
                    {
                        status = true,
                        respCode = "1",
                        msg = respVal.respmsg,
                        ListOfRecentTrans = RenderPartialViewToString("_resultRecentTrans", model)
                    }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new
                    {
                        status = false,
                        respCode = "0",
                        msg = respVal.respmsg
                    }, JsonRequestBehavior.AllowGet));
                }
            }

            return(Json(new
            {
                status = false,
                respCode = "0",
                msg = respVal.respmsg
            }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult HistoryReport(string dtfrom, string dtto)
        {
            string[] values = User.Identity.Name.Split('|');

            ML.OFW.Contracts.Models.MnthlyBalInqRptModel hReport = new OFW.Contracts.Models.MnthlyBalInqRptModel();
            hReport.AccountNo = values[1].Trim();
            hReport.dateFrom  = Convert.ToDateTime(dtfrom);
            hReport.dateTo    = Convert.ToDateTime(dtto);

            ML.OFW.Services.OFW ServiceH = new OFW.Services.OFW();
            var respVal = ServiceH.MnthlyBalInqRpt(hReport);

            if (respVal.RespCode != "0")
            {
                var model = new IenumerableReportResult();
                model.HistoryReport = respVal.BalInqDetails;
                int hasData = model.HistoryReport.Count();

                var model1 = new ReportsViewModel();
                model1.EndingBalance    = String.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.EndingBalance));
                model1.TotalCredit      = String.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.TotalCredit));
                model1.TotalDebit       = String.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.TotalDebit));
                model1.PrintBy          = respVal.PrintBy;
                model1.Date             = respVal.DateNow;
                model1.runDate          = respVal.RunDate;
                model1.TotalCreditCount = Convert.ToInt32(respVal.TotalNoCredit);
                model1.TotalDebitCount  = Convert.ToInt32(respVal.TotalNoDebit);

                return(Json(new
                {
                    status = true,
                    respCode = "1",
                    msg = respVal.RespMsg,
                    hasRecord = hasData,
                    otherData = model1,
                    historyData = RenderPartialViewToString("_reportHistory", model)
                }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new { status = false, respCode = "0", msg = respVal.RespMsg }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 16
0
        public JsonResult GetReceiptData(string kptn)
        {
            if (string.IsNullOrEmpty(kptn))
            {
                return(Json(new { status = false, errorcode = "0", msg = "Something went wrong with your parameter" }, JsonRequestBehavior.AllowGet));
            }

            string[] values = User.Identity.Name.Split('|');

            ML.OFW.Contracts.Models.billsPayModel.reprintingpartners smodel = new OFW.Contracts.Models.billsPayModel.reprintingpartners();
            smodel.kptnno     = kptn.Trim();
            smodel.walletuser = values[0].Trim();
            smodel.walletno   = values[1].Trim();

            ML.OFW.Services.OFW service = new OFW.Services.OFW();
            var respVal = service.reprintBillspay(smodel);

            if (respVal.respCode != "0")
            {
                var model = new ReceiptData();

                model.acctName   = respVal.accountName;
                model.address    = respVal.address;
                model.BPrefNo    = respVal.refNo;
                model.branch     = respVal.branchName;
                model.contactNo  = respVal.contactNo;
                model.date       = respVal.transDate;
                model.Name       = respVal.name;
                model.PaidAmt    = string.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.principalAmount));
                model.PaidCharge = string.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.charge));
                model.paymentTo  = respVal.paymentTo;
                model.totalPaid  = string.Format("{0:#,##0.00}", Convert.ToDecimal(respVal.totalAmountPaid));


                return(Json(new { status = true, errorcode = "1", msg = respVal.respMsg, receiptData = model }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { status = false, errorcode = "0", msg = respVal.respMsg }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 17
0
        public ActionResult ChangePassword(string oldPass, string newPass, string confirm)
        {
            string[] values = User.Identity.Name.Split('|');

            ML.OFW.Contracts.Models.ChangePassword changePass = new OFW.Contracts.Models.ChangePassword();

            changePass.username           = values[0].Trim();
            changePass.oldPassword        = oldPass;
            changePass.newPassword        = newPass;
            changePass.confirmNewPassword = confirm;
            changePass.is_subAgent        = values[7].Trim().Equals("1") ? true : false;

            ML.OFW.Services.OFW respService = new OFW.Services.OFW();
            var valresp = respService.ChangePassword(changePass);

            if (valresp.respCode != "0")
            {
                return(Json(new { status = true, respCode = "1", msg = valresp.respMsg }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { status = false, respCode = "0", msg = valresp.respMsg }, JsonRequestBehavior.AllowGet));
        }
Esempio n. 18
0
        public JsonResult SubmitBillsPay(BillsPayViewModel model)
        {
            if (ModelState.IsValid)
            {
                string[] values = User.Identity.Name.Split('|');

                ML.OFW.Contracts.Models.billsPayModel.saveTransactionBillsPay smodel = new OFW.Contracts.Models.billsPayModel.saveTransactionBillsPay();

                smodel.accountFName   = model.CompFname;
                smodel.accountLName   = model.CompLname;
                smodel.accountMName   = model.CompMname;
                smodel.accountNo      = model.CompAccountNo;
                smodel.amountpaid     = Convert.ToDecimal(model.amountPaid);
                smodel.companyID      = model.CompID;
                smodel.currency       = model.currency;
                smodel.customerCharge = Convert.ToDecimal(model.charge);
                smodel.otherDetails   = model.otherDetails;
                smodel.payorCustID    = model.payerID;
                smodel.walletno       = values[1];
                smodel.walletOperator = values[0];

                ML.OFW.Services.OFW service = new OFW.Services.OFW();
                var respVal = service.saveTransactionBillsPay(smodel);

                if (respVal.respcode != 0)
                {
                    return(Json(new { status = true, errorcode = "1", msg = respVal.message, kptn = respVal.kptn }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new { status = false, errorcode = "0", msg = respVal.message }, JsonRequestBehavior.AllowGet));
                }
            }
            else
            {
                return(Json(new { status = false, errorcode = "0", msg = "Form is invalid." }, JsonRequestBehavior.AllowGet));
            }
        }
Esempio n. 19
0
        public JsonResult checkVersion(string q, string q1)
        {
            if (string.IsNullOrEmpty(q1))
            {
                q1 = "0";
            }
            if (!string.IsNullOrEmpty(q.Trim()))
            {
                ML.OFW.Contracts.Models.myVersion vrs = new OFW.Contracts.Models.myVersion();

                vrs.deviceID = q.Trim();
                vrs.toUpdate = false;
                vrs.version  = q1.Trim();

                ML.OFW.Services.OFW service = new OFW.Services.OFW();

                var respVal = service.myVersion(vrs);

                if (respVal.isUpdated == true)
                {
                    respVal.respMsg = "Up-to-date version!";
                }
                else
                {
                    respVal.respMsg = "Out-of-date version!";
                }

                if (respVal.respCode == 0)
                {
                    return(Json(new { respVal = respVal, errCode = "0", msg = respVal.respMsg }, JsonRequestBehavior.AllowGet));
                }

                return(Json(new { respVal = respVal, errCode = "0", msg = respVal.respMsg }, JsonRequestBehavior.AllowGet));
            }

            return(Json(new { errCode = "2000", msg = "Call Developer!!!" }, JsonRequestBehavior.AllowGet));
        }
        public JsonResult kptnDetails(string kptnOrRef, string CompID)
        {
            string[] value = User.Identity.Name.Split('|');
            var      model = new CancelBillsPayViewModel();

            ML.OFW.Contracts.Models.billsPayModel.searchBPX_KPTN smodel = new OFW.Contracts.Models.billsPayModel.searchBPX_KPTN();
            smodel.kptn       = kptnOrRef.Trim();
            smodel.walletuser = value[0].Trim();
            smodel.companyID  = CompID.Trim();

            ML.OFW.Services.OFW service = new OFW.Services.OFW();
            var respVal = service.searchBPX_KPTN(smodel);

            if (respVal.respCode != "0")
            {
                model.Accountno          = respVal.accountNo;
                model.Address            = respVal.payorAddress;
                model.AmountPaid         = string.Format("{0:#,##0.00}", respVal.totalAmountPaid);
                model.CancellationCharge = string.Format("{0:#,##0.00}", respVal.customerCharge);
                model.compFname          = respVal.accountFirstName;
                model.compLname          = respVal.accountLastName;
                model.compMname          = respVal.accountMiddleName;
                model.compName           = respVal.partnersAccountName;
                model.contactNo          = respVal.payorContact;
                model.ControlNo          = respVal.controlNo;
                model.date         = respVal.sendoutDate.ToString();
                model.Firstname    = respVal.payorFirstName;
                model.Lastname     = respVal.payorLastName;
                model.Middlename   = respVal.payorMiddleName;
                model.Operator     = value[0].Trim();
                model.OtherDetails = "";

                return(Json(new { status = true, respCode = "1", msg = respVal.resMsg, modelDetails = RenderPartialViewToString("_cancellationDetails", model) }, JsonRequestBehavior.AllowGet));
            }
            return(Json(new { status = false, respCode = "0", msg = respVal.resMsg }, JsonRequestBehavior.AllowGet));
        }