Example #1
0
        public ActionResult Index(Models.FranchiseeViewModel model)
        {
            if (ModelState.IsValid)
            {
                JL.Core.Models.Franchisee franchisee = new Core.Models.Franchisee();
                franchisee.Name      = model.Name;
                franchisee.Phone     = model.Phone;
                franchisee.Remark    = model.Remark;
                franchisee.Email     = model.Email;
                franchisee.Address   = model.Address;
                franchisee.ApplyTime = DateTime.Now;
                jlService.AddFranchisee(franchisee);
            }

            return(View());
        }
Example #2
0
        public ActionResult New(FranchiseeModel model)
        {
            if (ModelState.IsValid)
            {
                var fran = new Core.Models.Franchisee();
                fran.Name        = model.Name;
                fran.Email       = model.Email;
                fran.Weixin      = model.Weixin;
                fran.Phone       = model.Phone;
                fran.ApplyTime   = model.ApplyTime ?? DateTime.Now;
                fran.ProcessTime = DateTime.Now;
                fran.Address     = model.Address;
                fran.Status      = 1;

                jlService.AddFranchisee(fran);
                ViewData.Add("ResultObject", ResultObject.Succeed());
            }
            return(View());
        }