public ActionResult Edit([Bind(Include = "productid_fx,missiontype,projmotid_fx,id,code,projectid_fx,fromwhoid_fx,towhoid_fx,fromdate,todate,dad_mission,dad_level,isbottom,request_text,request_file,iscomplete,desc_text,remark,whocreateid_fx,createdate")] FLOW_MISSION fLOW_MISSION)
        {
            if (ModelState.IsValid)
            {
                db.Entry(fLOW_MISSION).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            List <FLOW_PRODUCT> categories_prod = FLOW_PRODUCT.GETALL();

            ViewData["categories_prod"] = new SelectList(categories_prod, "id", "name");

            List <FLOW_PROJECT> categories_proj = FLOW_PROJECT.GETALL();

            ViewData["categories_proj"] = new SelectList(categories_proj, "id", "desc_text");

            List <SYS_USER> category_user = SYS_USER.GETALL();

            ViewData["category_user"] = new SelectList(category_user, "id", "cname");

            List <FLOW_PROJMO> categories_projmo = FLOW_PROJMO.GETALL();

            ViewData["categories_projmo"] = new SelectList(categories_projmo, "id", "name");

            List <DD_MISSIONTYPE> missiontype = DD_MISSIONTYPE.GETALL();

            ViewData["missiontype"] = new SelectList(missiontype, "code", "cvalue");

            return(View(fLOW_MISSION));
        }
        // GET: FLOW_MISSION/Edit/5
        public ActionResult Edit(int?id)
        {
            List <FLOW_PRODUCT> categories_prod = FLOW_PRODUCT.GETALL();

            ViewData["categories_prod"] = new SelectList(categories_prod, "id", "name");

            List <FLOW_PROJECT> categories_proj = FLOW_PROJECT.GETALL();

            ViewData["categories_proj"] = new SelectList(categories_proj, "id", "desc_text");

            List <SYS_USER> category_user = SYS_USER.GETALL();

            ViewData["category_user"] = new SelectList(category_user, "id", "cname");

            List <FLOW_PROJMO> categories_projmo = FLOW_PROJMO.GETALL();

            ViewData["categories_projmo"] = new SelectList(categories_projmo, "id", "name");

            List <DD_MISSIONTYPE> missiontype = DD_MISSIONTYPE.GETALL();

            ViewData["missiontype"] = new SelectList(missiontype, "code", "cvalue");

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FLOW_MISSION fLOW_MISSION = db.FLOW_MISSION.Find(id);

            if (fLOW_MISSION == null)
            {
                return(HttpNotFound());
            }
            return(View(fLOW_MISSION));
        }
        // GET: SYS_DEPART/Create
        public ActionResult Create()
        {
            List <SYS_USER> categories = SYS_USER.GETALL();

            ViewData["Categories"] = new SelectList(categories, "id", "cname");

            return(View());
        }
        // GET: FLOW_PROJECT/Create
        public ActionResult Create()
        {
            List <SYS_USER> categories_user = SYS_USER.GETALL();

            ViewData["Categories_user"] = new SelectList(categories_user, "id", "cname");

            List <FLOW_PRODUCT> categories = FLOW_PRODUCT.GETALL();

            ViewData["Categories_prod"] = new SelectList(categories, "id", "name");
            return(View());
        }
Beispiel #5
0
        // GET: FLOW_PRODUCT/Create
        public ActionResult Create()
        {
            List <SYS_USER> categories = SYS_USER.GETALL();

            ViewData["Categories"] = new SelectList(categories, "id", "cname");

            List <FLOW_CLIENT> categoriesclient = FLOW_CLIENT.GETALL();

            ViewData["Categoriesclient"] = new SelectList(categoriesclient, "id", "company_name");
            return(View());
        }
Beispiel #6
0
        // GET: FLOW_PROJMO/Create
        public ActionResult Create()
        {
            List <SYS_USER> categories_user = SYS_USER.GETALL();

            ViewData["Categories_user"] = new SelectList(categories_user, "id", "cname");

            List <FLOW_PROJECT> categories_proj = FLOW_PROJECT.GETALL();

            ViewData["categories_proj"] = new SelectList(categories_proj, "id", "desc_text");

            return(View());
        }
        public ActionResult Edit([Bind(Include = "id,code,name,managerid_fx,desc_text,remark,whocreateid_fx,createdate")] SYS_DEPART sYS_DEPART)
        {
            if (ModelState.IsValid)
            {
                db.Entry(sYS_DEPART).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            List <SYS_USER> categories = SYS_USER.GETALL();

            ViewData["Categories"] = new SelectList(categories, "id", "cname");
            return(View(sYS_DEPART));
        }
        public ActionResult Create([Bind(Include = "productid_fx,missiontype,projmotid_fx,id,code,projectid_fx,fromwhoid_fx,towhoid_fx,fromdate,todate,dad_mission,dad_level,isbottom,request_text,request_file,iscomplete,desc_text,remark,whocreateid_fx,createdate")] FLOW_MISSION fLOW_MISSION)
        {
            Model1 ef = new Model1();
            String username = Request.Cookies["username"].Value.ToString();
            String cuuserid = ef.SYS_USER.Where(item => item.account_id == username).First <SYS_USER>().id.ToString();
            var    obj = ef.FLOW_MISSION.Where(item => item.id >= 0);
            int    nowcode = 0, maxid = 0;

            if (obj.Count <FLOW_MISSION>() > 0)
            {
                maxid   = obj.Max(item => item.id);
                nowcode = maxid + 1;
            }
            else
            {
                nowcode = 1;
            }

            fLOW_MISSION.code           = "MIS" + nowcode.ToString().PadLeft(5, '0');
            fLOW_MISSION.createdate     = DateTime.Now;
            fLOW_MISSION.whocreateid_fx = int.Parse(cuuserid);
            fLOW_MISSION.fromwhoid_fx   = int.Parse(cuuserid);
            fLOW_MISSION.iscomplete     = int.Parse("0");
            if (ModelState.IsValid)
            {
                db.FLOW_MISSION.Add(fLOW_MISSION);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            List <FLOW_PRODUCT> categories_prod = FLOW_PRODUCT.GETALL();

            ViewData["categories_prod"] = new SelectList(categories_prod, "id", "name");

            List <FLOW_PROJECT> categories_proj = FLOW_PROJECT.GETALL();

            ViewData["categories_proj"] = new SelectList(categories_proj, "id", "desc_text");

            List <SYS_USER> category_user = SYS_USER.GETALL();

            ViewData["category_user"] = new SelectList(category_user, "id", "cname");

            List <FLOW_PROJMO> categories_projmo = FLOW_PROJMO.GETALL();

            ViewData["categories_projmo"] = new SelectList(categories_projmo, "id", "name");

            List <DD_MISSIONTYPE> missiontype = DD_MISSIONTYPE.GETALL();

            ViewData["missiontype"] = new SelectList(missiontype, "code", "cvalue");

            return(View(fLOW_MISSION));
        }
        public ActionResult Edit([Bind(Include = "id,code,productid_fx,responserid_fx,startdate,deadline,request_text,request_file,dad_projectid_fx,dad_level,is_bottom,desc_text,remark,whocreateid_fx,createdate")] FLOW_PROJECT fLOW_PROJECT)
        {
            if (ModelState.IsValid)
            {
                db.Entry(fLOW_PROJECT).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            List <SYS_USER> categories_user = SYS_USER.GETALL();

            ViewData["Categories_user"] = new SelectList(categories_user, "id", "cname");

            List <FLOW_PRODUCT> categories = FLOW_PRODUCT.GETALL();

            ViewData["Categories_prod"] = new SelectList(categories, "id", "name");
            return(View(fLOW_PROJECT));
        }
Beispiel #10
0
        public ActionResult Edit([Bind(Include = "id,code,name,projectid_fx,responserid_fx,startdate,enddate,request_text,remark,whocreateid,createdate")] FLOW_PROJMO fLOW_PROJMO)
        {
            if (ModelState.IsValid)
            {
                db.Entry(fLOW_PROJMO).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            List <SYS_USER> categories_user = SYS_USER.GETALL();

            ViewData["Categories_user"] = new SelectList(categories_user, "id", "cname");

            List <FLOW_PROJECT> categories_proj = FLOW_PROJECT.GETALL();

            ViewData["categories_proj"] = new SelectList(categories_proj, "id", "desc_text");
            return(View(fLOW_PROJMO));
        }
Beispiel #11
0
        public ActionResult Edit([Bind(Include = "id,code,Responserid_fx,name,clientid_fx,stratdate,deadlinedate,request_text,statuss,request_file,statuss,desc_text,remark,whocreateid_fx,createdate")] FLOW_PRODUCT fLOW_PRODUCT)
        {
            if (ModelState.IsValid)
            {
                db.Entry(fLOW_PRODUCT).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            List <SYS_USER> categories = SYS_USER.GETALL();

            ViewData["Categories"] = new SelectList(categories, "id", "cname");

            List <FLOW_CLIENT> categoriesclient = FLOW_CLIENT.GETALL();

            ViewData["Categoriesclient"] = new SelectList(categoriesclient, "id", "company_name");
            return(View(fLOW_PRODUCT));
        }
        // GET: SYS_DEPART/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SYS_DEPART sYS_DEPART = db.SYS_DEPART.Find(id);

            if (sYS_DEPART == null)
            {
                return(HttpNotFound());
            }

            List <SYS_USER> categories = SYS_USER.GETALL();

            ViewData["Categories"] = new SelectList(categories, "id", "cname");

            return(View(sYS_DEPART));
        }
        // GET: FLOW_PROJECT/Edit/5
        public ActionResult Edit(int?id)
        {
            List <SYS_USER> categories_user = SYS_USER.GETALL();

            ViewData["Categories_user"] = new SelectList(categories_user, "id", "cname");

            List <FLOW_PRODUCT> categories = FLOW_PRODUCT.GETALL();

            ViewData["Categories_prod"] = new SelectList(categories, "id", "name");
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FLOW_PROJECT fLOW_PROJECT = db.FLOW_PROJECT.Find(id);

            if (fLOW_PROJECT == null)
            {
                return(HttpNotFound());
            }
            return(View(fLOW_PROJECT));
        }
Beispiel #14
0
        // GET: FLOW_PRODUCT/Edit/5
        public ActionResult Edit(int?id)
        {
            List <SYS_USER> categories = SYS_USER.GETALL();

            ViewData["Categories"] = new SelectList(categories, "id", "cname");

            List <FLOW_CLIENT> categoriesclient = FLOW_CLIENT.GETALL();

            ViewData["Categoriesclient"] = new SelectList(categoriesclient, "id", "company_name");

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FLOW_PRODUCT fLOW_PRODUCT = db.FLOW_PRODUCT.Find(id);

            if (fLOW_PRODUCT == null)
            {
                return(HttpNotFound());
            }
            return(View(fLOW_PRODUCT));
        }
Beispiel #15
0
        public ActionResult Create([Bind(Include = "id,code,Responserid_fx,name,clientid_fx,stratdate,deadlinedate,request_text,request_file,statuss,desc_text,remark,whocreateid_fx,createdate")] FLOW_PRODUCT fLOW_PRODUCT)
        {
            Model1 ef = new Model1();
            String username = Request.Cookies["username"].Value.ToString();
            String cuuserid = ef.SYS_USER.Where(item => item.account_id == username).First <SYS_USER>().id.ToString();
            var    obj = ef.FLOW_PRODUCT.Where(item => item.id >= 0);
            int    nowcode = 0, maxid = 0;

            if (obj.Count <FLOW_PRODUCT>() > 0)
            {
                maxid   = obj.Max(item => item.id);
                nowcode = maxid + 1;
            }
            else
            {
                nowcode = 1;
            }

            fLOW_PRODUCT.code           = "PRD" + nowcode.ToString().PadLeft(5, '0');
            fLOW_PRODUCT.createdate     = DateTime.Now;
            fLOW_PRODUCT.whocreateid_fx = int.Parse(cuuserid);
            fLOW_PRODUCT.statuss        = "进行中";
            if (ModelState.IsValid)
            {
                db.FLOW_PRODUCT.Add(fLOW_PRODUCT);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            List <SYS_USER> categories = SYS_USER.GETALL();

            ViewData["Categories"] = new SelectList(categories, "id", "cname");

            List <FLOW_CLIENT> categoriesclient = FLOW_CLIENT.GETALL();

            ViewData["Categoriesclient"] = new SelectList(categoriesclient, "id", "company_name");
            return(View(fLOW_PRODUCT));
        }
Beispiel #16
0
        public ActionResult Create([Bind(Include = "id,code,name,projectid_fx,responserid_fx,startdate,enddate,request_text,remark,whocreateid,createdate")] FLOW_PROJMO fLOW_PROJMO)
        {
            Model1 ef = new Model1();
            String username = Request.Cookies["username"].Value.ToString();
            String cuuserid = ef.SYS_USER.Where(item => item.account_id == username).First <SYS_USER>().id.ToString();
            var    obj = ef.FLOW_PROJMO.Where(item => item.id >= 0);
            int    nowcode = 0, maxid = 0;

            if (obj.Count <FLOW_PROJMO>() > 0)
            {
                maxid   = obj.Max(item => item.id);
                nowcode = maxid + 1;
            }
            else
            {
                nowcode = 1;
            }

            fLOW_PROJMO.code        = "PRMO" + nowcode.ToString().PadLeft(5, '0');
            fLOW_PROJMO.createdate  = DateTime.Now;
            fLOW_PROJMO.whocreateid = int.Parse(cuuserid);

            if (ModelState.IsValid)
            {
                db.FLOW_PROJMO.Add(fLOW_PROJMO);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            List <SYS_USER> categories_user = SYS_USER.GETALL();

            ViewData["Categories_user"] = new SelectList(categories_user, "id", "cname");

            List <FLOW_PROJECT> categories_proj = FLOW_PROJECT.GETALL();

            ViewData["categories_proj"] = new SelectList(categories_proj, "id", "desc_text");
            return(View(fLOW_PROJMO));
        }
        // GET: FLOW_MISSION/Create
        public ActionResult Create()
        {
            List <FLOW_PRODUCT> categories_prod = FLOW_PRODUCT.GETALL();

            ViewData["categories_prod"] = new SelectList(categories_prod, "id", "name");

            List <FLOW_PROJECT> categories_proj = FLOW_PROJECT.GETALL();

            ViewData["categories_proj"] = new SelectList(categories_proj, "id", "desc_text");

            List <SYS_USER> category_user = SYS_USER.GETALL();

            ViewData["category_user"] = new SelectList(category_user, "id", "cname");

            List <FLOW_PROJMO> categories_projmo = FLOW_PROJMO.GETALL();

            ViewData["categories_projmo"] = new SelectList(categories_projmo, "id", "name");

            List <DD_MISSIONTYPE> missiontype = DD_MISSIONTYPE.GETALL();

            ViewData["missiontype"] = new SelectList(missiontype, "code", "cvalue");

            return(View());
        }