public ActionResult DeleteConfirmed(int id)
        {
            Client_Information client_Information = db.Client_Information.Find(id);

            db.Client_Information.Remove(client_Information);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 2
0
 public ActionResult Client_Edit([Bind(Include = "Client_ID,Client_Code,Client_Short_Name,Client_Full_Name,Approach_Year,EM_Code,EM_Full_Name,CL_Field_Code,CL_Field_Full_Name,Client_Phone,Client_website,Client_mail,Client_Owner,Client_Owner_Phone,Client_Owner_Email,Client_Principal,Client_Principal_Phone,Client_Principal_Email,Address_Detail,Address_District,Status,Note,Type,CreateDate,CreateBy")] Client_Information client_Information)
 {
     if (ModelState.IsValid)
     {
         db.Entry(client_Information).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(PartialView(client_Information));
 }
Exemplo n.º 3
0
        public ActionResult Client_Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Client_Information client_information = new Client_Information();

            if (client_information == null)
            {
                return(HttpNotFound());
            }
            return(PartialView(client_information));
        }
        // GET: Admin/Client_Information/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Client_Information client_Information = db.Client_Information.Find(id);

            if (client_Information == null)
            {
                return(HttpNotFound());
            }
            return(View(client_Information));
        }
Exemplo n.º 5
0
        public ActionResult Client_Create([Bind(Include = "Client_ID,Client_Code,Client_Short_Name,Client_Full_Name,Approach_Year,EM_Code,EM_Full_Name,CL_Field_Code,CL_Field_Full_Name,Client_Phone,Client_website,Client_mail,Client_Owner,Client_Owner_Phone,Client_Owner_Email,Client_Principal,Client_Principal_Phone,Client_Principal_Email,Address_Detail,Address_District,Status,Note,Type,CreateDate,CreateBy")] Client_Information client_Information)
        {
            if (ModelState.IsValid)
            {
                if (Request.Cookies["UserName"] != null)
                {
                    client_Information.CreateBy = Request.Cookies["UserName"].Value;
                }
                db.Client_Information.Add(client_Information);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(client_Information));
        }