コード例 #1
0
ファイル: T_CusQYController.cs プロジェクト: gzl118/YLQX
        public void Save(T_CusQYModels model)
        {
            int result = 0;

            CurUser = Session["UserModel"] as SysUser;
            model.DataModel.WhsQYID = CurUser.UserCompanyID ?? 0;
            try
            {
                if (model.Tag == "Add")
                {
                    model.DataModel.CusStatus = 0;
                    result = T_CusQYDomain.GetInstance().AddModel(model.DataModel);
                }
                else if (model.Tag == "Edit")
                {
                    model.DataModel.CusStatus = 0;
                    result = T_CusQYDomain.GetInstance().UpdateModel(model.DataModel, model.DataModel.CusID);
                }
                //企业资质操作
                T_CusQYDomain.GetInstance().OperQyzz(model.DataModel.CusID, model.QYZZFiles);
            }
            catch { }
            Response.ContentType = "text/json";
            if (result > 0)
            {
                Response.Write("{\"statusCode\":\"200\", \"message\":\"操作成功\",\"callbackType\":\"closeCurrentReloadTab\",\"forwardUrl\":\"/T_CusQY/Index\"}");
            }
            else
            {
                Response.Write("{\"statusCode\":\"300\", \"message\":\"操作失败\"}");
            }
        }
コード例 #2
0
        public ActionResult XSHTSPIndex(System.Int32 id, string tag)
        {
            //加载购买商商企业列表
            T_CusQYModels cusQymode = new T_CusQYModels();

            cusQymode.DataModel = cusQymode.DataModel ?? new T_CusQY();

            cusQymode.DataList = T_CusQYDomain.GetInstance().GetAllT_CusQY(cusQymode.DataModel).Where(p => p.CusStatus == Convert.ToInt32("1")).ToList();

            ViewData["CusQY"] = new SelectList(cusQymode.DataList, "CusID", "CusMC");

            T_XSHTModels model = new T_XSHTModels();

            model.DataModel = new T_XSHT();
            if (id != 0)
            {
                model.DataModel = T_XSHTDomain.GetInstance().GetModelById(id);

                if (model.DataModel.HTFJ != "" && model.DataModel.ZLXY != "")
                {
                    ViewData["HTFJ"] = model.DataModel.HTFJ;
                    ViewData["ZLXY"] = model.DataModel.ZLXY;
                }
            }
            model.Tag = tag;
            return(View("~/Views/T_XSHT/XSHTSPIndex.cshtml", model));
        }
コード例 #3
0
ファイル: T_XSDController.cs プロジェクト: gzl118/YLQX
        public ActionResult Save(System.Int32 id, string tag)
        {
            //加载购买商商企业列表
            T_CusQYModels cusQymode = new T_CusQYModels();

            cusQymode.DataModel = cusQymode.DataModel ?? new T_CusQY();

            cusQymode.DataList = T_CusQYDomain.GetInstance().GetAllT_CusQY(cusQymode.DataModel).Where(p => p.CusStatus == Convert.ToInt32("1")).ToList();

            ViewData["CusQY"] = new SelectList(cusQymode.DataList, "CusID", "CusMC");

            //加载销售人员列表
            T_PersonModels perQymode = new T_PersonModels();

            perQymode.DataModel = perQymode.DataModel ?? new T_Person();

            perQymode.DataList = T_PersonDomain.GetInstance().GetAllT_Person(perQymode.DataModel);

            ViewData["Person"] = new SelectList(perQymode.DataList, "PsMZ", "PsMZ");

            //加载销售合同列表
            //T_XSHTModels xshtQymode = new T_XSHTModels();

            //xshtQymode.DataModel = xshtQymode.DataModel ?? new T_XSHT();

            //xshtQymode.DataList = T_XSHTDomain.GetInstance().GetAllT_XSHT(xshtQymode.DataModel);

            //ViewData["XSHT"] = new SelectList(xshtQymode.DataList, "HTID", "HTMC");

            //加载产品列表
            T_YLCPModels ylcpmode = new T_YLCPModels();

            ylcpmode.DataModel = ylcpmode.DataModel ?? new T_YLCP();

            ylcpmode.DataList = T_YLCPDomain.GetInstance().GetAllT_YLCP(ylcpmode.DataModel).Where(p => p.CPStatus == 1).ToList();

            ViewData["YLCP"] = new SelectList(ylcpmode.DataList, "CPID", "CPMC");

            T_XSDModels model = new T_XSDModels();

            model.DataModel = new T_XSD();
            CurUser         = Session["UserModel"] as SysUser;
            if (id != 0)
            {
                model.DataModel = T_XSDDomain.GetInstance().GetModelById(id);
                model.XSMXList  = T_XSMXDomain.GetInstance().GetT_XSMXByXsid(id);
            }
            else
            {
                model.DataModel.XSDH   = T_XSDDomain.GetInstance().GetXsOrderNum(CurUser);
                model.DataModel.XSCJR  = CurUser.UserAccount;
                model.DataModel.XSCJRQ = DateTime.Now;
            }
            model.RoleCode = GetRoleCode();
            model.Tag      = tag;
            return(View("~/Views/T_XSD/Save.cshtml", model));
        }
コード例 #4
0
ファイル: T_CusQYController.cs プロジェクト: gzl118/YLQX
        public ActionResult CusAuditIndex(System.Int32 id, string tag)
        {
            T_CusQYModels model = new T_CusQYModels();

            model.DataModel = new T_CusQY();
            T_CusQYZZ zzmodel = new T_CusQYZZ();

            if (id != 0)
            {
                model.DataModel   = T_CusQYDomain.GetInstance().GetModelById(id);
                model.CusQYZZList = T_CusQYZZDomain.GetInstance().GetAllT_BJD(zzmodel);
                if (model.CusQYZZList.Count > 0)
                {
                    model.CusQYZZList = model.CusQYZZList.Where(p => p.QYID == id).ToList();
                }
            }
            model.Tag = tag;
            return(View("~/Views/T_CusQY/CusAuditIndex.cshtml", model));
        }
コード例 #5
0
ファイル: T_CusQYController.cs プロジェクト: gzl118/YLQX
        public ActionResult Save(System.Int32 id, string tag)
        {
            T_CusQYModels model = new T_CusQYModels();

            model.DataModel = new T_CusQY();
            if (id != 0)
            {
                model.DataModel   = T_CusQYDomain.GetInstance().GetModelById(id);
                model.CusQYZZList = T_CusQYZZDomain.GetInstance().GetQYZZByQyid(id);
            }
            //经营范围(下)
            T_JYFWModels jyfwmodels = new T_JYFWModels();

            jyfwmodels.DataModel = jyfwmodels.DataModel ?? new T_JYFW();
            model.JYFWList       = T_JYFWDomain.GetInstance().GetAllT_JYFW(jyfwmodels.DataModel).ToList();
            model.Tag            = tag;
            model.RoleCode       = GetRoleCode();
            return(View("~/Views/T_CusQY/Save.cshtml", model));
        }
コード例 #6
0
ファイル: T_CusQYController.cs プロジェクト: gzl118/YLQX
        public void through(T_CusQYModels model, int id)
        {
            int result = 0;

            try
            {
                Int32 cusqyid = model.DataModel.CusID;
                result = T_CusQYDomain.GetInstance().Sh(cusqyid, id);
            }
            catch { }
            Response.ContentType = "text/json";
            if (result > 0)
            {
                Response.Write("{\"statusCode\":\"200\", \"message\":\"操作成功\",\"callbackType\":\"closeCurrentReloadTab\",\"forwardUrl\":\"/T_CusQY/Index\"}");
            }
            else
            {
                Response.Write("{\"statusCode\":\"300\", \"message\":\"操作失败\"}");
            }
        }
コード例 #7
0
        public ActionResult Save(System.Int32 id, string tag)
        {
            //加载企业列表
            T_CusQYModels cusQymode = new T_CusQYModels();

            cusQymode.DataModel = cusQymode.DataModel ?? new T_CusQY();

            cusQymode.DataList = T_CusQYDomain.GetInstance().GetAllT_CusQY(cusQymode.DataModel).Where(p => p.CusStatus == Convert.ToInt32("1")).ToList();

            ViewData["CusQY"] = new SelectList(cusQymode.DataList, "CusID", "CusMC");

            T_SHFWModels model = new T_SHFWModels();

            model.DataModel = new T_SHFW();
            if (id != 0)
            {
                model.DataModel = T_SHFWDomain.GetInstance().GetModelById(id);
            }
            model.Tag = tag;
            return(View("~/Views/T_SHFW/Save.cshtml", model));
        }
コード例 #8
0
ファイル: T_XSDController.cs プロジェクト: gzl118/YLQX
        public ActionResult XSDSPIndex(System.Int32 id, string tag)
        {
            //加载购买商商企业列表
            T_CusQYModels cusQymode = new T_CusQYModels();

            cusQymode.DataModel = cusQymode.DataModel ?? new T_CusQY();

            cusQymode.DataList = T_CusQYDomain.GetInstance().GetAllT_CusQY(cusQymode.DataModel).Where(p => p.CusStatus == Convert.ToInt32("1")).ToList();

            ViewData["CusQY"] = new SelectList(cusQymode.DataList, "CusID", "CusMC");

            //加载销售人员列表
            T_PersonModels perQymode = new T_PersonModels();

            perQymode.DataModel = perQymode.DataModel ?? new T_Person();

            perQymode.DataList = T_PersonDomain.GetInstance().GetAllT_Person(perQymode.DataModel);

            ViewData["Person"] = new SelectList(perQymode.DataList, "PsID", "PsMZ");

            T_XSDModels model = new T_XSDModels();

            model.DataModel = new T_XSD();
            T_XSMX xsmodel = new T_XSMX();

            if (id != 0)
            {
                model.DataModel = T_XSDDomain.GetInstance().GetModelById(id);
                model.XSMXList  = T_XSMXDomain.GetInstance().GetAllT_XSMX(xsmodel);
                if (model.XSMXList.Count > 0)
                {
                    model.XSMXList = model.XSMXList.Where(p => p.XSID == id).ToList();
                }
            }
            model.Tag = tag;
            return(View("~/Views/T_XSD/XSDSPIndex.cshtml", model));
        }
コード例 #9
0
ファイル: T_CusQYController.cs プロジェクト: gzl118/YLQX
        public ActionResult Index(T_CusQYModels evalModel)
        {
            try
            {
                SysUser UserModel = Session["UserModel"] as SysUser;
                ViewData["shUserId"]  = UserModel.UserId;
                evalModel.currentPage = int.Parse(Request["pageNum"].ToString());
            }
            catch { }
            string order = "";

            try
            {
                order = Request["orderField"].ToString();
            }
            catch { }

            if (order.Trim() == "${param.orderField}")
            {
                order = "";
            }
            int pagesize    = Convert.ToInt32(evalModel.pageSize);
            int pagecount   = Convert.ToInt32(evalModel.pagecount);
            int currentPage = Convert.ToInt32(evalModel.currentPage);

            evalModel.DataModel = evalModel.DataModel ?? new T_CusQY();

            if (Request["strCusMc"] != null)
            {
                string str = Request["strCusMc"].ToString();
                if (!String.IsNullOrEmpty(str))
                {
                    evalModel.DataModel.CusMC = str;
                }
                ViewData["strCusMc"] = str;
            }
            string strQYLX = "--请选择--";

            if (Request["strQYLX"] != null)
            {
                strQYLX = Request["strQYLX"].ToString();
                if (!String.IsNullOrEmpty(strQYLX))
                {
                    if (strQYLX != "--请选择--")
                    {
                        evalModel.DataModel.CusDWXZ = strQYLX;
                    }
                }
            }
            string strSHZT = "--请选择--";

            if (Request["strSHZT"] != null)
            {
                strSHZT = Request["strSHZT"].ToString();
                if (!String.IsNullOrEmpty(strSHZT))
                {
                    if (strSHZT == "已审批")
                    {
                        evalModel.DataModel.CusStatus = 1;
                    }
                    else if (strSHZT == "审批未通过")
                    {
                        evalModel.DataModel.CusStatus = 2;
                    }
                    else if (strSHZT == "未审批")
                    {
                        evalModel.DataModel.CusStatus = 0;
                    }
                }
            }
            evalModel.DataList    = T_CusQYDomain.GetInstance().PageT_CusQY(evalModel.DataModel, evalModel.StartTime, evalModel.EndTime, currentPage, pagesize, out pagecount, out resultCount);
            evalModel.resultCount = resultCount;

            //企业类型
            string[] QYL = { "--请选择--", "国有企业", "集体企业", "股份合作企业", "有限责任公司", "联营企业", "中外合资经营企业", "中外合作经营企业", "其他有限责任公司分公司", "其他有限责任公司", "其他" };
            List <SelectListItem> QYlist = new List <SelectListItem>();

            foreach (string s in QYL)
            {
                QYlist.Add(new SelectListItem {
                    Text = s, Value = s
                });
            }
            ViewBag.QYLX        = new SelectList(QYlist, "Value", "Text");
            ViewData["strQYLX"] = strQYLX;

            //审核类型
            string[] SHLX = { "--请选择--", "未审批", "已审批", "审批未通过" };
            List <SelectListItem> SHlist = new List <SelectListItem>();

            foreach (string s in SHLX)
            {
                SHlist.Add(new SelectListItem {
                    Text = s, Value = s
                });
            }
            ViewBag.SHZT = new SelectList(SHlist, "Value", "Text");

            ViewData["strSHZT"] = strSHZT;
            return(View("~/Views/T_CusQY/Index.cshtml", evalModel));
        }