コード例 #1
0
        private static ConstructPlanPackage getConstructPackage(this HttpRequest request, IDatabase database)
        {
            var id = request.GetInt("id");
            if (id.HasValue)
                return database.ConstructPlanPackages.GetByID(id.Value);

            var package = new ConstructPlanPackage();
            return package;
        }
コード例 #2
0
 private static string _deviceNumberFromConstructPackage(IDatabase database, ConstructPlanPackage constructPlanPackage, MemberApplyItem memberApplyItem, string lastFourDeviceNumber)
 {
     return constructPlanPackage.PackageNumber.Trim().ToString() + lastFourDeviceNumber;
 }
コード例 #3
0
 /// <summary>
 /// 删除建设计划条目时,调整计划包控制总额
 /// </summary>
 /// <param name="request"></param>
 /// <param name="package"></param>
 /// <param name="packageItem"></param>
 /// <returns></returns>
 public static long? GetControlerDescendAmount(this HttpRequest request, ConstructPlanPackage package, ConstructPlanItem packageItem)
 {
     return package.ControllerAmount - packageItem.BudgetAmount;
 }