Пример #1
0
        public static List <GetLeads_Result> SavedLeadSearch <T>(string pstatus, string puser) where T : class
        {
            var sb = new Cust_SilcoEntities();
            List <GetLeads_Result> svld = sb.GetLeads(puser, pstatus).ToList();

            return(svld);
        }
Пример #2
0
        public static List <UpdateLeadUsingDept_Result> UpdateLeadUsingDept(string leadhdrid, string prospectno, int status, int assgn, string puser, string source)
        {
            var sb = new Cust_SilcoEntities();
            List <UpdateLeadUsingDept_Result> upddept = sb.UpdateLeadUsingDept(leadhdrid, prospectno, status, assgn, puser, source).ToList();

            return(upddept);
        }
Пример #3
0
        public JsonResult GetPayHistory(int leadhdrid, int prospectno)
        {
            try
            {
                string puser = System.Web.HttpContext.Current.Session["sessionLoginName"].ToString();



                using (Cust_SilcoEntities db = new Cust_SilcoEntities())
                {
                    //string isearchtext = "BEAR";
                    // int  psearchcode = 1;
                    //   List<GetProspects_Result> srch = Leads.Models.Helper.ProspectList<GetProspects_Result>(pstatus, puser);
                    List <GetPayHistory_Result> payhst = Leads.Models.Helper.GetPayHistory <GetPayHistory_Result>(leadhdrid, prospectno);
                    return(Json(
                               new
                    {
                        sEcho = 1,
                        iTotalRecords = payhst.Count(),
                        iTotalDisplayRecords = payhst.Count(),
                        aaData = payhst
                    },
                               JsonRequestBehavior.AllowGet));
                }
            } catch (Exception ex)
            {
                Response.StatusCode = (int)HttpStatusCode.BadRequest;
                List <string> errors = new List <string>();

                errors.Add("Session Time Out-No connecttion to controller. Close the browser and Log In Again");

                return(Json(errors));
            }
        }
Пример #4
0
        public JsonResult UpdateLeadUsingDept(LeadUsingDept leadDept)
        {
            try
            {
                leadDept.actioncreatedby = System.Web.HttpContext.Current.Session["sessionLoginName"].ToString();


                using (Cust_SilcoEntities db = new Cust_SilcoEntities())

                {
                    // if (pr.ldcustsystem > 0)
                    //  {
                    // int holdsystem = pr.ldcustsystem;
                    var uleadupd = Leads.Models.Helper.UpdateLeadUsingDept(leadDept.leadhdrid, leadDept.prospectno, leadDept.status, leadDept.assgn, leadDept.actioncreatedby, leadDept.source);
                    var ul       = (from p in uleadupd
                                    select p).First();
                    //   SendProspectEmail(ul.prospectno.ToString(), ul.NewAssignTo, ul.OldAssignTo, ul.LeadCreator, ul.emailassigntochange, Convert.ToInt16(ul.leadhdrid), ul.oldassgnemail, ul.leadno.ToString(), ul.ProspectDesc);
                    SendEmailUpdateLeadUsingDept(ul.leadhdrid, ul.prospectno, ul.oldassignto, ul.newassignto, ul.LeadCreator, ul.depthead);
                }
                return(Json(new { success = true, responseText = "Successfully submitted a Lead" }, JsonRequestBehavior.AllowGet));
            }
            catch (Exception ex)
            {
                Response.StatusCode = (int)HttpStatusCode.BadRequest;
                List <string> errors = new List <string>();

                errors.Add("Session Time Out-No connecttion to controller. Close the browser and Log In Again");


                return(Json(new { success = false, responseText = "Session Time Out-No connecttion to controller. Close the browser and Log In Again" }, JsonRequestBehavior.AllowGet));
            }
        }
Пример #5
0
        public JsonResult GetProspectSM(string pstatus)
        {
            try
            {
                string puser = System.Web.HttpContext.Current.Session["sessionLoginName"].ToString();


                using (Cust_SilcoEntities db = new Cust_SilcoEntities())
                {
                    List <GetProspectsSM_Result> srch = Leads.Models.Helper.ProspectSMList <GetProspectsSM_Result>(pstatus, puser);

                    return(Json(
                               new
                    {
                        sEcho = 1,
                        iTotalRecords = srch.Count(),
                        iTotalDisplayRecords = srch.Count(),
                        aaData = srch
                    },
                               JsonRequestBehavior.AllowGet));
                }
            }catch (Exception ex)
            {
                Response.StatusCode = (int)HttpStatusCode.BadRequest;
                List <string> errors = new List <string>();

                errors.Add("Session Time Out-No connecttion to controller. Close the browser and Log In Again");


                return(Json(new { success = false, responseText = "Session Time Out-No connecttion to controller. Close the browser and Log In Again" }, JsonRequestBehavior.AllowGet));
            }
        }
Пример #6
0
        public static List <GetSilcoSystemsServices_Result> GetSilcoSystemServices <T>() where T : class

        {
            var sb = new Cust_SilcoEntities();
            List <GetSilcoSystemsServices_Result> systems = sb.GetSilcoSystemsServices("1").ToList();

            return(systems);
        }
Пример #7
0
        public static List <GetTaxGroups_Result> GetTaxGroups <T>(string branchid) where T : class

        {
            var sb = new Cust_SilcoEntities();
            List <GetTaxGroups_Result> taxgroup = sb.GetTaxGroups("N", branchid).ToList();

            return(taxgroup);
        }
Пример #8
0
        public static List <GetProspectsSM_Result> ProspectSMList <T>(string pstatus, string puser) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <GetProspectsSM_Result> proplist = sb.GetProspectsSM(puser, pstatus).ToList();

            return(proplist);
        }
Пример #9
0
        public static List <GetProspectsDtlSM_Result> ProspectDtlSMList <T>(string puser, int leadhdrid, int prospectno) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <GetProspectsDtlSM_Result> proplist = sb.GetProspectsDtlSM(puser, leadhdrid, prospectno).ToList();

            return(proplist);
        }
Пример #10
0
        public static List <GetProspectNotes_Result> GetProspectNotes <T>(int leadhdrid, int prospectno) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <GetProspectNotes_Result> proplist = sb.GetProspectNotes(leadhdrid, prospectno).ToList();

            return(proplist);
        }
Пример #11
0
        public static List <InsertLeadPay_Result> InsertLeadPay <T>(int leadhdrid, string custsystemcode, decimal qualsalesamt, string ldpaynotes, decimal leadfeeamt, int prospectno, int leadno, string newjob, string jobno, string doubleleadfee, string user) where T : class
        {
            var sb = new Cust_SilcoEntities();
            List <InsertLeadPay_Result> pay = sb.InsertLeadPay(leadhdrid, custsystemcode, qualsalesamt, ldpaynotes, leadfeeamt, prospectno, leadno, newjob, jobno, doubleleadfee, user).ToList();

            //    List<GetProspectsDtl_Result> proplist = sb.GetProspectsDtl(puser, leadhdrid).ToList();
            return(pay);
        }
Пример #12
0
        public static List <GetLeadFee_Result> GetLeadFee <T>(decimal amount) where T : class
        {
            var sb = new Cust_SilcoEntities();
            List <GetLeadFee_Result> leadfee = sb.GetLeadFee(amount).ToList();

            //    List<GetProspectsDtl_Result> proplist = sb.GetProspectsDtl(puser, leadhdrid).ToList();
            return(leadfee);
        }
Пример #13
0
        public static List <SelectSystemsforAddedProspects_Result> SelectSystemsforAddedProspects <T>(int prpprospectno) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <SelectSystemsforAddedProspects_Result> addprop = sb.SelectSystemsforAddedProspects(prpprospectno.ToString()).ToList();

            return(addprop);
        }
Пример #14
0
        public static List <SelectSiteDtlsforMasterLookupContact_Result> SelectSiteDtlsforMasterLookupContact <T>(int siteid, int customerid) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <SelectSiteDtlsforMasterLookupContact_Result> contacts = sb.SelectSiteDtlsforMasterLookupContact(siteid, customerid).ToList();

            return(contacts);
        }
Пример #15
0
        public static List <GetYTDLeadsByDept_Result> GetYTDLeadsByDept <T>() where T : class

        {
            var sb = new Cust_SilcoEntities();
            List <GetYTDLeadsByDept_Result> deptleadsYTD = sb.GetYTDLeadsByDept().ToList();

            return(deptleadsYTD);
        }
Пример #16
0
        public static List <GetBranch_Result> GetBranch <T>() where T : class

        {
            var sb = new Cust_SilcoEntities();
            List <GetBranch_Result> branch = sb.GetBranch("N").ToList();

            return(branch);
        }
Пример #17
0
        // pr.leadhdrid, pr.prospectno, pr.status, pr.lastupdatedby, pr.prospectnote, pr.prospaction, pr.source, pr.actiondate
        public static List <UpdateLeadActionUsingHome_Result> UpdateLeadActionUsingHome(int leadhdrid, int prospectno, string lastupdatedby, int prstatus, string note, int action, string actiondate)
        {
            var sb = new Cust_SilcoEntities();

            List <UpdateLeadActionUsingHome_Result> updleadnote = sb.UpdateLeadActionUsingHome(leadhdrid, prospectno, lastupdatedby, prstatus, note, action, actiondate).ToList();

            return(updleadnote);
        }
Пример #18
0
        public static List <GetTypesCustomer_Result> GetCustomerType1 <T>() where T : class

        {
            var sb = new Cust_SilcoEntities();
            List <GetTypesCustomer_Result> custtype = sb.GetTypesCustomer("N").ToList();

            return(custtype);
        }
Пример #19
0
        public static List <GetYTDProspectsByEmp_Result> GetYTDProspectsByEmp <T>() where T : class

        {
            var sb = new Cust_SilcoEntities();
            List <GetYTDProspectsByEmp_Result> empleadsYTD = sb.GetYTDProspectsByEmp().ToList();

            return(empleadsYTD);
        }
Пример #20
0
        public static List <FindSecurity_Result> FindSecurity <T>(int appid, string title, string dept, string account) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <FindSecurity_Result> seclist = sb.FindSecurity(appid, title, dept, account).ToList();

            return(seclist);
        }
Пример #21
0
        public static List <SelectSiteDtlsforMasterLookupInv_Result> SelectSiteDtlsforMasterLookupInv <T>(int siteid, int customerid) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <SelectSiteDtlsforMasterLookupInv_Result> invlist = sb.SelectSiteDtlsforMasterLookupInv(siteid, customerid).ToList();

            return(invlist);
        }
Пример #22
0
        public static List <SelectSiteforPRLookupGeneralManager_Result> SelectSiteforPRLookupGeneralManager <T>(string puser) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <SelectSiteforPRLookupGeneralManager_Result> PRlookuplist = sb.SelectSiteforPRLookupGeneralManager(puser).ToList();

            return(PRlookuplist);
        }
Пример #23
0
        public static List <UpdatePRListLog_Result> UpdatePRListLog <T>(string account, int siteid, int customerid) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <UpdatePRListLog_Result> updlog = sb.UpdatePRListLog(account, siteid, customerid).ToList();

            return(updlog);
        }
Пример #24
0
        public static List <SelectSiteforMasterLookupServManager_Result> SelectSiteforMasterLookupServManager <T>(string puser) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <SelectSiteforMasterLookupServManager_Result> sitelookuplist = sb.SelectSiteforMasterLookupServManager(puser).ToList();

            return(sitelookuplist);
        }
Пример #25
0
        public static List <GetCCLeadsEmail_Result> GetCCLeadsEmail <T>(int leadhdrid) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <GetCCLeadsEmail_Result> cc = sb.GetCCLeadsEmail(leadhdrid).ToList();

            return(cc);
        }
Пример #26
0
        public static List <SelectSiteDtlsforMasterLookupRMR_Result> SelectSiteDtlsforMasterLookupRMR <T>(int siteid, int customerid) where T : class
        {
            var sb = new Cust_SilcoEntities();

            List <SelectSiteDtlsforMasterLookupRMR_Result> rmrs = sb.SelectSiteDtlsforMasterLookupRMR(siteid, customerid).ToList();

            return(rmrs);
        }
Пример #27
0
        public static List <GetOrigin_Result> GetOrigin <T>(string ptype) where T : class

        {
            var sb = new Cust_SilcoEntities();
            List <GetOrigin_Result> origin = sb.GetOrigin(ptype).ToList();

            return(origin);
        }
Пример #28
0
        public JsonResult SelectSiteforPRLookup()
        {
            //JsonResult.maxJsonLength = int.MaxValue;
            try
            {
                string puser = System.Web.HttpContext.Current.Session["sessionLoginName"].ToString();


                using (Cust_SilcoEntities db = new Cust_SilcoEntities())
                {
                    if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("Fire Salesperson") ||
                        //  System.Web.HttpContext.Current.Session["title"].ToString().Contains("Kitchen Salesperson") ||
                        System.Web.HttpContext.Current.Session["title"].ToString().Contains("Security Salesperson") ||
                        System.Web.HttpContext.Current.Session["title"].ToString().Contains("Service Manager"))
                    {
                        List <SelectSiteforPRLookupServManager_Result> sitelkup = Leads.Models.Helper.SelectSiteforPRLookupServManager <SelectSiteforPRLookupServManager_Result>(puser);
                        var jsonResult = Json(new
                        {
                            sEcho                = 1,
                            iTotalRecords        = sitelkup.Count(),
                            iTotalDisplayRecords = sitelkup.Count(),

                            aaData = sitelkup
                        }, JsonRequestBehavior.AllowGet);
                        jsonResult.MaxJsonLength = int.MaxValue;
                        return(jsonResult);
                    }
                    else
                    //if (System.Web.HttpContext.Current.Session["title"].ToString().Contains("General Manager")
                    //   ||
                    //   System.Web.HttpContext.Current.Session["title"].ToString().Contains("President")
                    //   )
                    {
                        List <SelectSiteforPRLookupGeneralManager_Result> sitelkup = Leads.Models.Helper.SelectSiteforPRLookupGeneralManager <SelectSiteforPRLookupGeneralManager_Result>(puser);
                        var jsonResult = Json(new
                        {
                            sEcho                = 1,
                            iTotalRecords        = sitelkup.Count(),
                            iTotalDisplayRecords = sitelkup.Count(),

                            aaData = sitelkup
                        }, JsonRequestBehavior.AllowGet);
                        jsonResult.MaxJsonLength = int.MaxValue;
                        return(jsonResult);
                    }
                }
            }
            catch (Exception ex)
            {
                Response.StatusCode = (int)HttpStatusCode.BadRequest;
                List <string> errors = new List <string>();

                errors.Add("Session Time Out-No connecttion to controller. Close the browser and Log In Again");


                return(Json(new { success = false, responseText = "Session Time Out-No connecttion to controller. Close the browser and Log In Again" }, JsonRequestBehavior.AllowGet));
            }
        }
Пример #29
0
        public static List <GetAuthorizationForLeads_Result> GetAuthorizationforLeads <T>(string username, int appid)

            where T : class
        {
            var db = new Cust_SilcoEntities();
            List <GetAuthorizationForLeads_Result> authorizations = db.GetAuthorizationForLeads(username, appid).ToList();

            return(authorizations);
        }
Пример #30
0
        public static List <GetSilcoSystemsSubmitted_Result> GetSilcoSystemsSubmitted <T>(int leadhdrid, string customernumber, string sitenumber, string strsystems, int strstatus)
            where T : class

        {
            var sb = new Cust_SilcoEntities();
            List <GetSilcoSystemsSubmitted_Result> existsystems = sb.GetSilcoSystemsSubmitted(leadhdrid, customernumber, sitenumber, strsystems, strstatus).ToList();

            return(existsystems);
        }