Пример #1
0
        /// <summary>
        /// 编辑收付款信息(Finance_Edit页面)
        /// </summary>
        public ActionResult Edit_Finance()
        {
            FinanceFactory financefactory = new FinanceFactory();
            //获取收付款编号(id)信息
            string id = ViewMethods.GetForm(Request, "ID", CommonEnums.ValueEnum.vlGet).ToString();

            IFinanceB financeb = financefactory.GetDataByID(id);
            FinanceM  financem = (financeb == null ? null : financeb.Infomation_finance);
            //编辑收付款信息
            string financename   = ViewMethods.GetForm(Request, "name", CommonEnums.ValueEnum.vlPost).ToString();
            string financebelong = ViewMethods.GetForm(Request, "belong", CommonEnums.ValueEnum.vlPost).ToString();

            //financem.SFName = financename;
            //financem.SFBelong = financebelong;
            financefactory.Infomation_finance = financem;
            ViewBag.FinanceInfo = financem;
            bool isSuccess = financefactory.Update();

            if (isSuccess)
            {
                return(ViewMethods.AlertBack("修改成功", "../../Finance/Finance"));
            }
            else
            {
                return(ViewMethods.AlertBack("修改失败", "-1"));
            }
        }
Пример #2
0
        /// <summary>
        /// Finance_Edit页面行为
        /// </summary>
        /// <returns>视图</returns>
        public ActionResult Finance_Edit()
        {
            //获取收付款编号(id)数据信息
            string         id             = ViewMethods.GetForm(Request, "ID", CommonEnums.ValueEnum.vlGet).ToString();
            FinanceFactory financefactory = new FinanceFactory();
            IFinanceB      lstFinance     = financefactory.GetDataByID(id);
            FinanceM       financem       = (lstFinance != null ? lstFinance.Infomation_finance : null);

            ViewBag.FinanceInfo = financem;
            return(View());
        }
Пример #3
0
        /// <summary>
        /// Finance_List页面行为
        /// </summary>
        /// <return>视图</return>
        public ActionResult FinanceA_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           = "2";
            FinanceFactory financeFactory = new FinanceFactory();
            IFinanceB      lstFinance     = financeFactory.GetDataByID(sfid);
            FinanceM       financem       = (lstFinance != null ? lstFinance.Infomation_finance : null);

            ViewBag.FinanceInfo = financem;
            return(View());
        }
Пример #4
0
        /// <summary>
        /// Finance_List页面行为
        /// </summary>
        /// <return>视图</return>
        public ActionResult Finance_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();
            FinanceFactory financeFactory = new FinanceFactory();
            IFinanceB      lstFinance     = financeFactory.GetDataByID(sfid);
            FinanceM       financem       = (lstFinance != null ? lstFinance.Infomation_finance : null);

            ViewBag.FinanceInfo = financem;
            return(View());
        }