Beispiel #1
0
        // GET: Information/Edit/5
        public ActionResult Edit(long id)
        {
            InformationDao dbDao = new InformationDao();

            SetViewBag();
            FeedbackInforDao feedDao = new FeedbackInforDao();

            ViewBag.Feedback   = feedDao.ToListFeebBackUser(id).ToArray <FeedbacInfokUser>();
            ViewBag.Infomation = dbDao.FindByID(id);
            SetViewSupplier(ViewBag.Infomation.SupplierID);
            SetStatus(ViewBag.Infomation.Status);
            InforUserDao     usDao      = new InforUserDao();
            List <InforUser> lstUP      = usDao.FindByInforID(ViewBag.Infomation.InformationID);
            List <string>    lstUPlogin = new List <string>();

            foreach (var pUs in lstUP)
            {
                //string sLogin = pUs.LoginID.ToString();
                lstUPlogin.Add(pUs.LoginID.ToString());
            }
            SetUserBag(lstUPlogin.ToArray <string>());

            if (ViewBag.Infomation.ContratorID != null)
            {
                ContratorDao contrDao  = new ContratorDao();
                Contrator    objConTra = contrDao.FindByID(ViewBag.Infomation.ContratorID);
                string       str       = "<p><b>Tên chủ đầu tư: </b>" + objConTra.ContraName + "</p>";
                str += "<p><b>Địa chỉ: </b>" + objConTra.Address + "</p>";
                str += "<p><b>Thông tin liên hệ: </b>" + objConTra.FullName + "<b> &nbsp;&nbsp;&nbsp;  Điện thoại: </b>" + objConTra.Phone + "</p>";
                ViewBag.PrContraDetail = str;
                ViewBag.PrContraCode   = objConTra.ContratorID;
            }
            if (ViewBag.Infomation.BuilderID != null)
            {
                BuilderDao buiDao     = new BuilderDao();
                Builder    objBuilder = buiDao.FindByID(ViewBag.Infomation.BuilderID);
                ViewBag.PrBuiderCode = objBuilder.BuilderID;
                string str = "";
                str  = "<p><b>Tên nhà thầu: </b>" + objBuilder.BuilderName + "</p>";
                str += "<p><b>Địa chỉ: </b>" + objBuilder.Address + "</p>";
                str += "<p><b>Thông tin liên hệ: </b>" + objBuilder.FullName + "<b>&nbsp;&nbsp; &nbsp; Điện thoại: </b>" + objBuilder.Phone + "</p>";
                ViewBag.BuiderDetail = str;
            }



            return(View());
        }
Beispiel #2
0
        // GET: Builders/Edit/5
        public ActionResult Edit(long id)
        {
            BuilderDao bdDao = new BuilderDao();

            return(View(bdDao.FindByID(id)));
        }