Example #1
0
 public ActionResult Test(FormCollection collect, PhieuThue phieuthue)
 {
     if (ModelState.IsValid)
     {
         NHANVIEN ad = (NHANVIEN)Session["TaiKhoanAdmin"];
         phieuthue.IDNhanVien = ad.ID;
         var id = collect["var2"].ToString();
         if (phieuthue.TenCongTy == null)
         {
             phieuthue.TenCongTy = "";
         }
         if (phieuthue.SDT == null)
         {
             phieuthue.SDT = "";
         }
         if (phieuthue.DiaChi == null)
         {
             phieuthue.DiaChi = "";
         }
         if (cc.Test(int.Parse(id), phieuthue.IDNhanVien, phieuthue.CMND, phieuthue.Ten, phieuthue.DiaChi, phieuthue.SDT, phieuthue.TenCongTy))
         {
             return(RedirectToAction("ThemNguoi", new { id = cc.GetID() }));
         }
     }
     return(View());
 }