/// <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")); } }
/// <summary> /// 转换成业务逻辑层的对象 /// </summary> /// <param name="financen">集团内收付款信息(模型层)</param> /// <returns>(业务逻辑层)对象</returns> IFinanceB ConvertToFinance_B(FinanceM financem) { IFinanceB result = null; if (financem != null) { result = new FinanceB(financem, this._connectionb); } return(result); }
/// <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()); }
/// <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()); }
/// <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()); }
/// <summary> /// 实例化对象 /// </summary> /// <param name="strNameSpace">命名空间</param> /// <param name="strInstance">实例名</param> void InstanceObject(string strNameSpace, string strInstance) { this._financeb = PublicMethods.Methods.InstanceObject(strNameSpace, strInstance, new object[] { this._connectionfactory.ConnectionB }) as IFinanceB; }