示例#1
0
        /// <summary>
        /// 编辑工程量信息(Quantity_Edit页面)
        /// </summary>
        public ActionResult Edit_Quantity()
        {
            QuantityFactory quantityfactory = new QuantityFactory();
            //获取工程量编号(id)信息
            string id = ViewMethods.GetForm(Request, "ID", CommonEnums.ValueEnum.vlGet).ToString();

            IQuantityB quantityb = quantityfactory.GetDataByID(id);
            QuantityM  quantitym = (quantityb == null ? null : quantityb.Infomation_Quantity);
            //编辑工程量信息
            string quantityname   = ViewMethods.GetForm(Request, "name", CommonEnums.ValueEnum.vlPost).ToString();
            string quantitybelong = ViewMethods.GetForm(Request, "belong", CommonEnums.ValueEnum.vlPost).ToString();

            //quantitym.SFName = quantityname;
            //quantitym.SFBelong = quantitybelong;
            quantityfactory.Infomation_quantity = quantitym;
            ViewBag.QuantityInfo = quantitym;
            bool isSuccess = quantityfactory.Update();

            if (isSuccess)
            {
                return(ViewMethods.AlertBack("修改成功", "../../Quantity/Quantity"));
            }
            else
            {
                return(ViewMethods.AlertBack("修改失败", "-1"));
            }
        }
示例#2
0
        /// <summary>
        /// Quantity_Edit页面行为
        /// </summary>
        /// <returns>视图</returns>
        public ActionResult Quantity_Edit()
        {
            //获取工程量编号(id)数据信息
            string          id = ViewMethods.GetForm(Request, "ID", CommonEnums.ValueEnum.vlGet).ToString();
            QuantityFactory quantityfactory = new QuantityFactory();
            IQuantityB      lstQuantity     = quantityfactory.GetDataByID(id);
            QuantityM       quantitym       = (lstQuantity != null ? lstQuantity.Infomation_Quantity : null);

            ViewBag.QuantityInfo = quantitym;
            return(View());
        }
示例#3
0
        /// <summary>
        /// Quantity_List页面行为
        /// </summary>
        /// <return>视图</return>
        public ActionResult Quantity_List()
        {
            //获取项目信息
            ProjectsFactory   projectsfactory = new ProjectsFactory();
            List <IProjectsB> lstprojects     = projectsfactory.GetDataProjects();
            List <ProjectsM>  projectsm       = new List <ProjectsM>();

            if (lstprojects != null && lstprojects.Count > 0)
            {
                lstprojects.ForEach(p => projectsm.Add(p.Infomation_projects));
            }
            ViewBag.Projects = projectsm;

            //获取工程量单ID数据信息
            string          sfid            = ViewMethods.GetForm(Request, "ID", CommonEnums.ValueEnum.vlGet).ToString();
            QuantityFactory quantityFactory = new QuantityFactory();
            IQuantityB      lstQuantity     = quantityFactory.GetDataByID(sfid);
            QuantityM       quantitym       = (lstQuantity != null ? lstQuantity.Infomation_Quantity : null);

            ViewBag.QuantityInfo = quantitym;
            return(View());
        }