public ActionResult InitIndividualSavingData() { using (FATContainer dataContainer = new FATContainer()) { int tchRoutineID = Convert.ToInt32(RouteData.Values["tchRoutineID"]); TeachingRoutine routine = SharedCasePool.GetCasePool().GetRoutine(tchRoutineID); //all tags: DWHQ_Deposit DWHQ_Withdraw DWHQ_Interest DWHQ_Clear DWZZ_Deposit DWZZ_Withdraw DWLZ_Deposit DWLZ_Withdraw DWZL_Deposit DWZL_Withdraw DWZL_Interest DWTI_Deposit DWTI_Interest DWTI_Withdraw //Section controls which section should be displayed and filled ViewBag.Section = routine.RelTmpRoutine.RoutineTag.Split('_')[1]; IndividualSaving info = dataContainer.IndividualSaving.FirstOrDefault(item => (item.TchRoutineID == tchRoutineID)); if (info == null) { info = dataContainer.IndividualSaving.Create(); info.TchRoutineID = tchRoutineID; info.AccountCreateTime = DateTime.Now; info.DepositTime = DateTime.Now; info.WithdrawTime = DateTime.Now; info.InterestTime = DateTime.Now; dataContainer.IndividualSaving.Add(info); dataContainer.SaveChanges(); } return(View("IndividualSaving", info)); } }
public static V_IndividualWithdraw DWZL_Withdraw(IndividualSaving orgObj) { Mapper.CreateMap <IndividualSaving, V_IndividualWithdraw>(); V_IndividualWithdraw targetObj = Mapper.Map <IndividualSaving, V_IndividualWithdraw>(orgObj); targetObj.WithdrawType = "整零"; return(targetObj); }
public static V_IndividualDeposit DWTI_Deposit(IndividualSaving orgObj) { Mapper.CreateMap <IndividualSaving, V_IndividualDeposit>(); V_IndividualDeposit targetObj = Mapper.Map <IndividualSaving, V_IndividualDeposit>(orgObj); targetObj.DepositType = "本息"; return(targetObj); }
public static V_InterestVoucher DWTI_Interest(IndividualSaving orgObj) { Mapper.CreateMap <IndividualSaving, V_InterestVoucher>(); V_InterestVoucher targetObj = Mapper.Map <IndividualSaving, V_InterestVoucher>(orgObj); targetObj.Abstract = "结息"; return(targetObj); }
public ActionResult SaveIndividualSavingData(IndividualSaving info) { using (FATContainer dataContainer = new FATContainer()) { IndividualSaving orgInfo = dataContainer.IndividualSaving.Find(info.Row_ID); dataContainer.Entry <IndividualSaving>(orgInfo).CurrentValues.SetValues(info); dataContainer.SaveChanges(); JsonResult result = new JsonResult(); result.Data = string.Empty; return(result); } }
public ActionResult InterestVoucher() { using (FATContainer dataContainer = new FATContainer()) { int tchRoutineID = dataContainer.TeachingNode.Find(Convert.ToInt32(RouteData.Values["id"])).RoutineID; TeachingRoutine routine = SharedCasePool.GetCasePool().GetRoutine(tchRoutineID); TeachingNode node = routine.NodeList[Convert.ToInt32(RouteData.Values["id"])]; IndividualSaving targetObj = dataContainer.IndividualSaving.FirstOrDefault(info => (info.TchRoutineID == node.RoutineID)); ViewData[ConstDefine.ViewData_CaseText] = SharedCasePool.GetCasePool().GetRoutine(node.RoutineID).GroupList[node.GroupIdx].GroupText; ViewBag.RoutineName = routine.RelTmpRoutine.RoutineName; ViewBag.NodeName = node.RelTmpNode.NodeName; ViewBag.TchNodeID = node.Row_ID; ViewBag.TchRoutineID = routine.Row_ID; Type type = Type.GetType("FATS.BusinessObject.Converters.InterestVoucherConverter"); MethodInfo method = type.GetMethod(routine.RelTmpRoutine.RoutineTag, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static); V_InterestVoucher modalInfo = (V_InterestVoucher)method.Invoke(null, new Object[] { targetObj }); return(View("IndividualSaving_Interest", modalInfo)); } }