public ActionResult ReferCase(int UniqueId, string UserId, string Remarks)
        {
            AcceesModel obj = new AcceesModel();

            obj.GetResult("ReferCase " + UniqueId + ",'" + UserId + "','" + Remarks + "'");
            return(Content(""));
        }
        public ActionResult postRemarks(List <string> val)
        {
            AcceesModel obj = new AcceesModel();

            obj.GetResult("setCibilRemarks  '" + val[2] + "','A','" + val[1] + "','" + val[0] + "'");
            return(Content(""));
        }
        public ActionResult FinalizeDeal(int DealId, string UserId, int UniqueId, string Remarks)
        {
            AcceesModel obj = new AcceesModel();

            obj.GetResult("FinalizeDeal " + DealId + "," + UniqueId + ",'" + Remarks + "','" + UserId + "'");
            return(Content(""));
        }
        public ActionResult postCreditDecision(int UniqueId, string Decision, string Reason, string UserId)
        {
            AcceesModel obj = new AcceesModel();

            obj.GetResult("SetCreditDecision  '" + UniqueId + "','" + Decision + "','" + Reason + "','" + UserId + "'");
            return(Content(""));
        }
        public ActionResult postVerification(Verification[] val)
        {
            AcceesModel obj = new AcceesModel();

            //GetResult(string Qry,string paramName,string paramValue,string typeName)
            obj.GetResult("usp_SendVerificationData", "@dataVerificationAddress", val, "dbo.VerificationAddress");
            return(Content(""));
        }
        public string postAssessment(PropSelfAssessment val)
        {
            PropSelfAssessment propCibil = new PropSelfAssessment();

            propCibil.UniqueId                   = val.UniqueId;
            propCibil.Declaration                = val.Declaration;
            propCibil.selectedStockSeen          = val.selectedStockSeen;
            propCibil.StockSeenComment           = val.StockSeenComment;
            propCibil.StockWorth                 = val.StockWorth;
            propCibil.Metperson                  = val.Metperson;
            propCibil.selectedRelationship       = val.selectedRelationship;
            propCibil.RelationshipComment        = val.RelationshipComment;
            propCibil.Stabilityofthepremises     = val.Stabilityofthepremises;
            propCibil.Noofemployees              = val.Noofemployees;
            propCibil.TotalTopermonth            = val.TotalTopermonth;
            propCibil.Averageticketsizeofthesale = val.Averageticketsizeofthesale;
            propCibil.selectedWeeklyOff          = val.selectedWeeklyOff;
            propCibil.yesday            = val.yesday;
            propCibil.Numberofbranches  = val.Numberofbranches;
            propCibil.OtherBusiness     = val.OtherBusiness;
            propCibil.HighSeason        = val.HighSeason;
            propCibil.LowSeason         = val.LowSeason;
            propCibil.Currentaccounts   = val.Currentaccounts;
            propCibil.BankName          = val.BankName;
            propCibil.Numberofterminals = val.Numberofterminals;
            propCibil.AcquirerBank      = val.AcquirerBank;
            propCibil.AddedBy           = val.AddedBy;
            AcceesModel obj = new AcceesModel();

            obj.GetResult("SetSelfAssessment '"
                          + val.UniqueId + "','"
                          + val.Declaration + "','"
                          + val.selectedStockSeen + "','"
                          + val.StockSeenComment + "','"
                          + val.StockWorth + "','"
                          + val.Metperson + "','"
                          + val.selectedRelationship + "','"
                          + val.RelationshipComment + "','"
                          + val.Stabilityofthepremises + "','"
                          + val.Noofemployees + "','"
                          + val.TotalTopermonth + "','"
                          + val.Averageticketsizeofthesale + "','"
                          + val.selectedWeeklyOff + "','"
                          + val.yesday + "','"
                          + val.Numberofbranches + "','"
                          + val.OtherBusiness + "','"
                          + val.HighSeason + "','"
                          + val.LowSeason + "','"
                          + val.Currentaccounts + "','"
                          + val.BankName + "','"
                          + val.Numberofterminals + "','"
                          + val.AcquirerBank + "','"
                          + val.AddedBy + "'"
                          );
            return("");
        }
        public string postcardsales(PropCardSales[] val)
        {
            AcceesModel obj = new AcceesModel();

            System.Data.DataTable dt = new System.Data.DataTable();
            dt = obj.ToDataTable <PropCardSales>(val);
            obj.GetResult("Tab_postCardSales " + val[0].UniqueId);
            obj.BulkUpload(dt, "Tab_CardSales");
            return("");
        }
        public string Get(String userid)
        {
            bool val = (System.Web.HttpContext.Current.User != null) && System.Web.HttpContext.Current.User.Identity.IsAuthenticated;

            if (val)
            {
                AcceesModel obj = new AcceesModel();
                return(obj.GetResult("SearchCibil_ConvertToLead '','" + userid + "'"));
            }
            else
            {
                return("");
            }
        }
        public string GetApplicationList(string userid)
        {
            AcceesModel obj        = new AcceesModel();
            long        chkNumber  = 0;
            bool        canConvert = long.TryParse(userid, out chkNumber);

            if (canConvert)
            {
                return(obj.GetResult("GetApplcaitionOrMerchant  '" + userid + "','" + "NUMBER" + "'"));
            }
            else
            {
                return(obj.GetResult("GetApplcaitionOrMerchant  '" + userid + "','" + "VAR" + "'"));
            }
        }
示例#10
0
        public ActionResult Login(LoginModel model, string returnUrl)
        {
            if (ModelState.IsValid)
            {
                if (Membership.ValidateUser(model.UserName, model.Password))
                {
                    //Verify credentials against database in real project
                    FormsAuthentication.SetAuthCookie(model.UserName.ToUpper(), false);
                    AcceesModel obj = new AcceesModel();
                    DataTable   dt  = obj.GetDataTable("GetUserDetails  " + model.UserName);
                    if (dt.Rows.Count > 0)
                    {
                        Session["UserId"]     = Convert.ToString(dt.Rows[0][0]);
                        Session["UserFlag"]   = Convert.ToString(dt.Rows[0][1]);
                        Session["SalesUser"]  = Convert.ToString(dt.Rows[0][2]);
                        Session["BranchName"] = Convert.ToString(dt.Rows[0][3]);
                        FormsAuthenticationTicket ticket = new FormsAuthenticationTicket
                                                           (
                            1,
                            model.UserName,
                            DateTime.Now,
                            DateTime.Now.AddMinutes(30),
                            false,
                            Session["UserId"].ToString(),
                            FormsAuthentication.FormsCookiePath
                                                           );

                        if (!string.IsNullOrEmpty(returnUrl))
                        {
                            return(Redirect(returnUrl));
                        }
                        else
                        {
                            return(RedirectToAction("Welcome", "Cibil"));
                        }
                    }
                    else
                    {
                        ModelState.AddModelError("authenticationError", "Not authorized to access.");
                    }
                }
                else
                {
                    ModelState.AddModelError("authenticationError", "User name or Password is wrong. Try it again");
                }
            }
            return(View(model));
        }
        public HttpResponseMessage Post(TeleSales value)
        {
            string sYear      = DateTime.Now.Year.ToString();
            string sMonth     = DateTime.Now.Month.ToString();
            string sDay       = DateTime.Now.Day.ToString();
            string sErrorTime = sYear + sMonth + sDay;
            //string strUserAgent = HttpContext.Current.Request.UserAgent.ToString().ToLower();
            //bool result = HttpContext.Current.Request.Browser.IsMobileDevice;
            string    filePath = HttpContext.Current.Server.MapPath("~/App_Data/TeleSalesEvent_" + sErrorTime + ".log");
            LogEvents log      = new LogEvents();

            //log.Logevent(headers, filePath);
            try
            {
                TeleSales objTele = new TeleSales();
                string    result  = objTele.ValidateData(value);
                if (result == "")
                {
                    if (Membership.ValidateUser(value.UserName, value.Password))
                    {
                        AcceesModel obj = new AcceesModel();
                        ;
                        obj.GetResult("SetTeleSalesStagingData " +
                                      value.TeleSalesId + ",'" + value.MerchantName + "','" + value.FNAME + "','" + value.MNAME + "','" + value.LNAME + "','" + value.PhoneNo + "','" + value.CampaignCode + "','" + value.LeadPhoneNo + "','" + value.MissedCall + "','" +
                                      value.DateandTime.ToString("MM-dd-yyyy hh:mm:ss") + "','" + value.Circle + "','" + value.Operator + "','" + value.YourName + "','" + value.Email + "','" + value.City + "'," + value.NoofYearinBusiness + ",'" + value.LoanAmount + "','" + value.Avgsalespermonth +
                                      "','" + value.Source + "','" + value.DOB + "','" + value.ADDRESSOfResidence + "','" + value.ADDRESSOfShop + "','" + value.AddressPinCode + "','" + value.ShopPinCode + "','" + value.Industry + "'"
                                      );
                        log.Logevent(value, filePath);
                        return(Request.CreateResponse(HttpStatusCode.OK, "Data Saved Successfully"));
                    }
                    else
                    {
                        log.Logevent("Authentication Failed", filePath);
                        return(Request.CreateResponse(HttpStatusCode.BadRequest, "Authentication Failed"));
                    }
                }
                else
                {
                    return(Request.CreateResponse(HttpStatusCode.ExpectationFailed, result));
                }
            }
            catch (Exception ex)
            {
                log.Logevent(ex.Message, filePath);
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message.ToString()));
            }
        }
        public string SendMail(String unique, String userid)
        {
            AcceesModel obj = new AcceesModel();

            System.Data.DataTable dt = obj.GetDataTable("GetCibilMailBody " + unique + ",'" + userid + "'");

            String        MailFrom      = System.Configuration.ConfigurationManager.AppSettings["MailFrom"];
            String        mailServer    = System.Configuration.ConfigurationManager.AppSettings["mailserver"];
            String        usernm        = System.Configuration.ConfigurationManager.AppSettings["UserName"];
            String        Password      = System.Configuration.ConfigurationManager.AppSettings["Password"];
            Int32         Port          = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["Port"]);
            String        strRecipients = dt.Rows[0]["Recipients"].ToString();
            String        Body          = dt.Rows[0]["Body"].ToString();
            String        Subject       = dt.Rows[0]["Subject"].ToString();
            SendMailModel objMail       = new SendMailModel();

            objMail.SendCibilMail(MailFrom, "", "", strRecipients, Subject, Body, mailServer, Port, usernm, Password, true);
            return("");
        }
        public string post(List <String> val)
        {
            AcceesModel obj = new AcceesModel();

            obj.GetResult("Tab_SAVESALESCIBILPROSPECTS " +
                          "'" + val[0] + "'," + "'" + val[1] + "'," + "'" + val[2] + "'," + "'" + val[3] + "'," +
                          "'" + val[4] + "'," + "'" + val[5] + "'," + "'" + val[6] + "'," + "'" + val[7] + "'," +
                          "'" + val[8] + "'," + "'" + val[9] + "'," + "'" + val[10] + "'," + "'" + val[11] + "'," +
                          "'" + val[12] + "'," + "'" + val[13] + "'," + "'" + val[14] + "'," + "'" + val[15] + "'," +
                          "'" + val[16] + "'," + "'" + val[17] + "'," + "'" + val[18] + "'," + "'" + val[19] + "'," +
                          "'" + val[20] + "'," + "'" + val[21] + "'," + "'" + val[22] + "'," + "'" + val[23] + "'," +
                          "'" + val[24] + "'," + "'" + val[25] + "'," + "'" + val[26] + "'," + "'" + val[27] + "'," +
                          "'" + val[28] + "'," + "'" + val[29] + "'," + "'" + val[30] + "'," + "'" + val[31] + "'," +
                          "'" + val[32] + "'," + "'" + val[33] + "'," + "'" + val[34] + "'," + "'" + val[35] + "'," +
                          "'" + val[36] + "'," + val[46] + "," + val[47] + "," + val[48] + "," + val[49]
                          );

            return("");
        }
        public ActionResult TeleSalesUpload(HttpPostedFileBase file, string data, String docType, string UserId)
        {
            try
            {
                string fileName     = Path.GetFileName(file.FileName);
                string folderpath   = Server.MapPath("~/Images") + "/" + data + "/" + docType;
                string path         = Path.Combine(folderpath, fileName);
                bool   folderExists = Directory.Exists(folderpath);
                if (!folderExists)
                {
                    Directory.CreateDirectory(folderpath);
                }

                if (Directory.GetFiles(folderpath).Length > 0)
                {
                    DirectoryInfo directory = new DirectoryInfo(folderpath);
                    foreach (System.IO.DirectoryInfo subDirectory in directory.GetDirectories())
                    {
                        subDirectory.Delete(true);
                    }
                }


                if (System.IO.File.Exists(path))
                {
                    System.IO.File.Delete(path);
                }
                file.SaveAs(path);

                ModelState.Clear();
                AcceesModel obj    = new AcceesModel();
                string      result = obj.GetResult("setTeleSalesUpload '" + data + "','" + docType + "','" + path + "','" + UserId + "'");

                return(Content(result));
            }
            catch (Exception ex)
            {
                return(Content("Error : " + ex.Message));
            }
        }
 public string DailyTrackerUpdatePost(DailyTrackerUpload objDailyTrackerUpload)
 {
     try
     {
         DailyTrackerUpload[] arrDailyTrackerUpload = { objDailyTrackerUpload };
         AcceesModel          obj          = new AcceesModel();
         DataTable            tbCategories = validateTable(obj.ToDataTable <DailyTrackerUpload>(arrDailyTrackerUpload));
         DataSet ds = obj.getDataSet("CollectionManualUpdate", tbCategories, objDailyTrackerUpload.DailyTrackerId.ToString(), Convert.ToString(Session["userID"]), false);
         if (ds.Tables[0].Rows[0][0].ToString() == "0")
         {
             return("Error!");
         }
         else
         {
             return(objDailyTrackerUpload.DailyTrackerId.ToString());
         }
     }
     catch (Exception ex)
     {
         return("Error");
     }
 }
        public string GetProducts(string userid)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GETPRODUCTS '" + userid + "'"));
        }
        public string GetLeadsource(string userid)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GETLEADSOURCE '" + userid + "'"));
        }
        public string GetTitles(string userid)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GetTitles '" + userid + "'"));
        }
        public string GetIndustries(string userid)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GETINDUSTRIES '" + userid + "'"));
        }
        public string postData(List <string> val)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GetApplicationScore " + val[0] + "," + val[1] + "," + val[2] + ",'" + val[3] + "','" + val[4] + "'"));
        }
        public string GetPurposeofLoan(string userid)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("getLoanPurpose '" + userid + "'"));
        }
        public string GetDailyMasters()
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GetDailyMasters"));
        }
        public string GetMasters(string userid)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GetMasters"));
        }
        public string GetRefenceNumber()
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GETSEQUENCE"));
        }
        public string GetFastTrackStages()
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GetFastTrackStages"));
        }
        public string GetBranches(string userid)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GETBRANCHES '" + userid + "'"));
        }
        public string GetPincodeData(string userid)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GetPincodeData " + userid));
        }
        public string Getindustrymultiplier()
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("Getindustrymultiplier"));
        }
        public string GetSelfAssessment(int userid)
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GetSelfAssessment " + userid));
        }
        public string GetBusinessYearMulitiplier()
        {
            AcceesModel obj = new AcceesModel();

            return(obj.GetResult("GetBusinessYearMulitiplier"));
        }