Exemplo n.º 1
0
 public static bool SaveEditPayMent(PayMent model)
 {
     using (var entity = new BusEntities())
     {
         var obj = entity.PayMent.FirstOrDefault(x => x.ID == model.ID);
         if (obj != null)
         {
             obj.LineID     = model.LineID;
             obj.UsersID    = model.UsersID;
             obj.PayNames   = model.PayNames;
             obj.StartTime  = model.StartTime;
             obj.EndTime    = model.EndTime;
             obj.Money      = model.Money;
             obj.isUse      = model.isUse;
             obj.PayType    = model.PayType;
             obj.HeXiao     = model.HeXiao;
             obj.HXTime     = model.HXTime;
             obj.Memo       = model.Memo;
             obj.addUsers   = model.addUsers;
             obj.ZWQ        = model.ZWQ;
             obj.SZ         = model.SZ;
             obj.CreateTime = model.CreateTime;
             return(entity.SaveChanges() > 0);
         }
         return(false);
     }
 }
Exemplo n.º 2
0
 public static int AddPayMent(PayMent model)
 {
     using (var entity = new BusEntities())
     {
         var id = 0;
         try
         {
             entity.AddToPayMent(model);
             entity.SaveChanges();
             id = model.ID;
         }
         catch { }
         return(id);
     }
 }
Exemplo n.º 3
0
        public ActionResult PayMent(FormCollection col)
        {
            string  email   = col["txtEmail"];
            string  name    = col["txtName"];
            string  address = col["txtDiaChi"];
            string  city    = col["txtThanhPho"];
            string  phone   = col["txtPhone"];
            PayMent pm      = new PayMent();

            pm.sEmail   = email;
            pm.sName    = name;
            pm.sPhone   = phone;
            pm.sCity    = city;
            pm.sAdderss = address;
            ViewBag.pm  = pm;

            GioHang gh = (GioHang)Session["gh"];

            return(View(gh));
        }