示例#1
0
        public ActionResult EditComment(int id) //修改訂單
        {
            SelectList getempList = new SelectList(this.getempList(), "fEmployeeID", "fName");

            ViewBag.theempList = getempList;

            tOrderComment comment = db.tOrderComments.First(p => p.fID == id);

            //customerlist(order.fCustomerID.Value);
            if (comment == null)
            {
                return(RedirectToAction("sales"));
            }
            return(View(comment));
        }
示例#2
0
        public ActionResult NewComment(tOrderComment p)
        {
            p.fOrderID = orderID;
            //p.fCustomerID =;
            //p.fEmployeeID =;
            tOrderComment m = new tOrderComment();

            m.fEmployeeID = Convert.ToInt32(Session[EmpDitctionary.SK_Login_ID]);
            m.fOrderID    = orderID;
            m.fComment    = p.fComment;
            m.fUpdateDate = p.fUpdateDate;
            db.tOrderComments.Add(m);
            db.SaveChanges();
            string com = "Comment/" + orderID;

            return(RedirectToAction(com));
        }
示例#3
0
        public ActionResult EditComment(tOrderComment p)//修改訂單儲存
        {
            //dbMSIT126Team02Entities3 db = new dbMSIT126Team02Entities3();
            tOrderComment EC = db.tOrderComments.First(m => m.fID == p.fID);

            if (EC == null)
            {
                return(RedirectToAction("sales"));
            }
            EC.fEmployeeID = p.fEmployeeID;
            EC.fOrderID    = orderID;
            EC.fComment    = p.fComment;
            EC.fUpdateDate = p.fUpdateDate;
            db.SaveChanges();
            string com = "Comment/" + orderID;

            return(RedirectToAction(com));
        }