/// <summary>
 /// 985经费申请内容
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <returns></returns>
 public static OfficeBudgetDetail GetFundApply(this HttpRequest request, User user, IDatabase database)
 {
     var assetFundApply = request.getAssetFundApply(database);
     assetFundApply.DetailNumber = request.GetString("DetailNumber");
     assetFundApply.DocPath = request.GetString("DocPath");
     assetFundApply.DocName = request.GetString("DocName");
     assetFundApply.DocContent = request.GetString("DocContent");
     assetFundApply.DocNumber = request.GetString("DocNumber");
     assetFundApply.ReportYear = request.GetString("ReportYear");
     assetFundApply.Account = request.GetEnum<FundAccount>("Account");
     if (request.GetBoolean("IsCommit").Value)
     {
         assetFundApply.State = OfficeBudgetDetailState.Submit;
     }
     else
     {
         assetFundApply.State = OfficeBudgetDetailState.UnSubmit;
     }
     assetFundApply.FundSource = (FundSourceState)Enum.Parse(typeof(FundSourceState), request.GetString("FundSource").Trim());
     assetFundApply.Remark = request.GetString("Remark");
     if (request.GetBoolean("IsCommit").Value)
     {
         assetFundApply.State = OfficeBudgetDetailState.Submit;
     }
     else
     {
         assetFundApply.State = OfficeBudgetDetailState.UnSubmit;
     }
     assetFundApply.Operator = user;
     assetFundApply.OperateTime = DateTime.Now;
     return assetFundApply;
 }
        /// <summary>
        /// 国资处经费申请内容
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <param name="database"></param>
        /// <returns></returns>
        public static AssetFundApply GetAssetFundApply(this HttpRequest request, User user, IDatabase database)
        {
            var assetFundApply = request.getAssetFundApply(database);
            assetFundApply.Quantity = request.GetInt("Quantity").Value;
            //assetFundApply.BudgetAmount = request.GetInt("BudgetAmount").Value;
            //assetFundApply.BidControlAmount = request.GetInt("BidControlAmount").Value;
            //assetFundApply.DeviceValue = request.GetInt("DeviceValue").Value;
            //assetFundApply.TradeAgentFee = request.GetInt("TradeAgentFee").Value;
            assetFundApply.ApplyTotalAmount = request.GetInt("ApplyTotalAmount").Value;
            if (request.GetBoolean("IsCommit").Value)
            {
                assetFundApply.State = AssetFundApplyState.Submit;
            }else
            {
                assetFundApply.State = AssetFundApplyState.UnSubmit;
            }
            assetFundApply.Operator = user;
            assetFundApply.ModifyTime = DateTime.Now;
            if (assetFundApply.IsNew)
            {
                assetFundApply.OperateTime = DateTime.Now;
            }

            return assetFundApply;
        }
Esempio n. 3
0
 /// <summary>
 /// 显示调整
 /// </summary>
 /// <param name="adjust"></param>
 /// <param name="user"></param>
 /// <param name="response"></param>
 /// <param name="database"></param>
 public static void ShowAdjust(this Ipms.Server.Business.Adjusts.Adjust adjust, HttpResponse response, User user, IDatabase database)
 {
     response.WriteTagWithValue("ID", adjust.ID);
     response.WriteTagWithValue("ProjectName", adjust.GetProject(database).ProjectName);
     response.WriteTagWithValue("CollegeName", adjust.Operator.GetCollege(database).Name);
     response.WriteTagWithValue("ExperName", adjust.Operator.Name);
     var adjustHistoryState = database.AdjustHistoryStates.FirstOrDefault(c => c.Adjust == adjust && c.State == adjust.CurrentState);
     if (adjustHistoryState != null)
     {
         response.WriteTagWithValue("AdjustAuditTime", adjustHistoryState.OperateTime);
         response.WriteTagWithValue("AdjustAuditAdvice", adjustHistoryState.Suggestion);
         response.WriteTagWithValue("AdjustAuditOperator", adjustHistoryState.Operator.Name);
     }
     response.WriteTagWithValue("State", adjust.CurrentState);
     response.WriteTagWithValue("AdjustReason", adjust.AdjustReason);
     var stage = "已制定建设计划/未下达建设任务";
     if (adjust.Stage == 1)
         stage = "已下达建设任务/未制定采购计划";
     if (adjust.Stage == 2)
         stage = "已制定采购计划/未下达采购指令";
     if (adjust.Stage == 3)
         stage = "流标状态";
     response.WriteTagWithValue("Stage", stage);
     response.WriteTagWithValue("AdjustTime", adjust.OperateTime);
     response.WriteTagWithValue("DocPath", adjust.DocPath);
     //是否可以编辑或者删除
     response.WriteTagWithValue("CanEdit", adjust.CanEdit(database, user));
     //是否可以审核
     response.WriteTagWithValue("CanAudit", adjust.CanAudit(database, user));
 }
Esempio n. 4
0
        /// <summary>
        /// 取得建设任务
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <param name="database"></param>
        /// <returns></returns>
        public static ConstructTask GetConstructTask(this HttpRequest request, User user, IDatabase database)
        {
            var task = request.getConstructTask(database);
            task.Operator = database.Users.SingleOrDefault(u => u == user);
            task.DocNumber = request.GetString("DocNumber").Trim();
            task.DocPath = request.GetString("DocPath") == null ? null : request.GetString("DocPath");
            task.DetailNumber = request.GetString("DetailNumber");
            task.DocName = request.GetString("DocName");
            task.ReportYear = request.GetString("ReportYear");
            task.Account = request.GetEnum<FundAccount>("Account");
            task.FundSource = (FundSourceState)Enum.Parse(typeof(FundSourceState), request.GetString("FundSource").Trim());
            task.Remark = request.GetString("Remark");
            task.ModifyTime = DateTime.Now;
            if (request.GetBoolean("isSubmit").Value)
            {
                task.IsSend = true ;
            }
            else
            {
                task.IsSend = false;
            }

            if (task.IsNew)
            {
                task.OperateTime = DateTime.Now;
            }
            return task;
        }
Esempio n. 5
0
 /// <summary>
 /// 取得设备
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <returns></returns>
 public static ApplyDevice GetDevice(this HttpRequest request, User user, IDatabase database)
 {
     var device = request.getDevice(database);
     device.DeviceName = request.GetString("DeviceName");
     device.EnglishName = request.GetString("EnglishName");
     device.Member = database.Users.SingleOrDefault(e => e == user);
     device.DeviceType = request.GetString("DeviceType");
     device.UnitPrice = request.GetMoney("UnitPrice");
     device.NecessityAnalysis = request.GetString("NecessityAnalysis");
     device.BenefitExpect = request.GetString("BenefitExpect");
     device.ResearchDirections = request.GetString("ResearchDirections");
     device.ReasonableComparison = request.GetString("ReasonableComparison");
     device.Configuration = request.GetString("Configuration");
     device.KeyWord = request.GetString("KeyWord");
     device.MainSpec = request.GetString("MainSpec");
     device.AccessorySpec = request.GetString("AccessorySpec");
     device.Environment = request.GetString("Environment");
     device.Power = request.GetString("Power");
     device.Consumables = request.GetString("Consumables");
     if (device.IsNew)
         device.CreateTime = DateTime.Now;
     else
         device.ModifyTime = DateTime.Now;
     return device;
 }
Esempio n. 6
0
 /// <summary>
 /// 查询或取得逻辑项目
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <param name="project"></param>
 /// <returns></returns>
 public static LogicProject GetLogicProject(this HttpRequest request, User user, IDatabase database, Project project)
 {
     var logicProject = request.getLogicProject(database);
     logicProject.ProjectName = project.ProjectName;
     logicProject.ParentProject = null;
     logicProject.Leaf = false;
     return logicProject;
 }
 /// <summary>
 /// 取得采购指令条目
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <returns></returns>
 public static PurchaseOrderItem GetPurchaseOrderItem(this HttpRequest request, User user, IDatabase database)
 {
     var purchaseItem = request.getGePurchaseOrderItem(database);
     purchaseItem.PurchaseOrderPackage = request.GetEntity(database.PurchaseOrderPackages, "PurchaseOrderPackageID");
     purchaseItem.PurchasePlanItem = request.GetEntity(database.PurchasePlanItems, "PurchasePlanItemID");
     purchaseItem.IsTerminated = false;
     return purchaseItem;
 }
Esempio n. 8
0
        /// <summary>
        /// 取得人才
        /// </summary>
        /// <param name="request"></param> 
        /// <param name="user"></param>
        /// <param name="database"></param>
        /// <returns></returns>
        public static OutStanding GetOutStanding(this HttpRequest request, User user, IDatabase database)
        {
            var outStanding = request.getOutStanding(database);
            outStanding.Name = request.GetString("Name");
            outStanding.Code = request.GetString("Code");
            outStanding.SelectedYear = request.GetInt("SelectedYear");

            return outStanding;
        }
 /// <summary>
 /// 取得建设任务条目
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <returns></returns>
 public static ConstructTaskItem GetConstructTaskItem(this HttpRequest request, User user, IDatabase database)
 {
     var constructTaskItem = request.getConstructTaskItem(database);
     constructTaskItem.Quantity = request.GetInt("Quantity").Value;
     constructTaskItem.ConstructPlanItem = request.GetEntity(database.ConstructPlanItems, "ConstructPlanItemID");
     constructTaskItem.ConstructTask = request.GetEntity(database.ConstructTasks, "ConstructTaskID");
     constructTaskItem.IsPurchasePlanItem = false;
     return constructTaskItem;
 }
Esempio n. 10
0
 /// <summary>
 /// 取得短信息
 /// </summary>
 /// <param name="request"></param>
 /// <param name="database"></param>
 /// <param name="user"></param>
 /// <returns></returns>
 public static Message GetMessage(this HttpRequest request, IDatabase database, User user)
 {
     Message message = request.getMessage(database, user);
     message.Receiver = request.GetEntity<User>(database.Users, "ReceiverID");
     message.Title = request.GetString("Title");
     message.Information = request.GetString("Content");
     message.MessageType = MessageType.Send;
     return message;
 }
Esempio n. 11
0
 /// <summary>
 /// 取得导入设备批次
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <returns></returns>
 public static DeviceReport GetDeviceReport(this HttpRequest request, User user, IDatabase database)
 {
     var report = request.getDeviceReport(database);
     report.ReportYear = request.GetString("ReportYear");
     report.FundSource = request.GetEnum<FundSourceState>("FundSource");
     report.Operator = user;
     report.OperateTime = DateTime.Now;
     return report;
 }
        /// <summary>
        /// 取得采购计划包
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <param name="database"></param>
        /// <returns></returns>
        public static PurchasePlanItem GetPurchasePlanItem(this HttpRequest request, User user, IDatabase database)
        {
            var purchasePlanItem = request.getPurchasePlanItem(database);

            purchasePlanItem.PurchasePlanPackage = request.GetEntity(database.PurchasePlanPackages, "PurchasePlanPackageID");
            purchasePlanItem.ConstructTaskItem = request.GetEntity(database.ConstructTaskItems, "ConstructTaskItemID");
            purchasePlanItem.IsAffirm = false;
            //purchasePlanItem.AffirmTime = DateTime.Now;
            return purchasePlanItem;
        }
Esempio n. 13
0
        /// <summary>
        /// 显示项目列表
        /// </summary>
        /// <param name="list"></param>
        /// <param name="response"></param>
        /// <param name="user"></param>
        /// <param name="database"></param>
        public static void Show(this IList<MemberApply> list, HttpResponse response, User user, IDatabase database)
        {
            response.WriteTagBegin("List");
            response.WriteTagBegin("Record");
            foreach (var device in list)
                device.ShowExpertAply(response, database);

            response.WriteTagEnd("Record");
            response.WriteTagEnd("List");
        }
Esempio n. 14
0
        /// <summary>
        /// 显示项目列表
        /// </summary>
        /// <param name="list"></param>
        /// <param name="response"></param>
        /// <param name="user"></param>
        /// <param name="database"></param>
        public static void Show(this IList<StoreDevice> list, HttpResponse response, User user, IDatabase database)
        {
            response.WriteTagBegin("List");
            response.WriteTagBegin("Record");
            foreach (var device in list)
                device.ShowStoreDevice(response, database);

            response.WriteTagEnd("Record");
            response.WriteTagEnd("List");
        }
        /// <summary>
        /// 获得或更新中标结果条目
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <param name="database"></param>
        /// <returns></returns>
        public static BidResultMemberItem GetBidResultMemberItem(this HttpRequest request, User user, IDatabase database)
        {
            var bidItem = request.getBidResultItem(database);
            bidItem.BidResultItem = request.GetEntity<BidResultItem>(database.BidResultItems, "BidResultItemID");
            bidItem.BidDevice = request.GetEntity<BidDevice>(database.BidDevices, "BidDeviceID");
            bidItem.Quantity = request.GetInt("TempNum").Value;
            bidItem.Operator = user;
            bidItem.OperateTime = DateTime.Now;

            return bidItem;
        }
        /// <summary>
        /// 获取985经费申请条目内容
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <param name="database"></param>
        /// <returns></returns>
        public static OfficeBudgetDetailItem GetFundApplyItem(this HttpRequest request, User user, IDatabase database)
        {
            var assetFundApplyItem = request.getAssetFundApplyItem(database);
            assetFundApplyItem.OfficeBudgetDetail = database.OfficeBudgetDetails.GetByID(request.GetInt("officeBudgetDetailID").Value);
            assetFundApplyItem.AssetFundApplyItem = database.AssetFundApplyItems.GetByID(request.GetInt("assetFundApplyItemID").Value);
            assetFundApplyItem.OfficeIssuedAmount = request.GetInt("OfficeIssuedAmount").Value;
            assetFundApplyItem.Remark1 = request.GetString("remark1");
            //assetFundApplyItem. = request.GetInt("budgetAmount");
            assetFundApplyItem.Remark2 = request.GetString("remark2");

            return assetFundApplyItem;
        }
Esempio n. 17
0
 /// <summary>
 /// 显示用户记录
 /// </summary>
 /// <param name="user"></param>
 /// <param name="response"></param>
 /// <param name="userLogin"></param>
 /// <param name="database"></param>
 public static void ShowUserRecord(this User user, HttpResponse response, User userLogin, IDatabase database)
 {
     response.WriteTagWithValue("ID", user.ID);
     var userrole = database.UserRoles.SingleOrDefault(c => c.User == user);
     response.WriteTagWithValue("UserRoleID", userrole.Role.ID);
     response.WriteTagWithValue("UserRole", userrole.Role.Name);
     response.WriteTagWithValue("UserRoleType", userrole.Role.TypeCode);
     response.WriteTagWithValue("LoginID", user.LoginID);
     response.WriteTagWithValue("Name", user.Name);
     response.WriteTagWithValue("NameSpell", user.NameSpell);
     response.WriteTagWithValue("AllowMultiLogin", user.AllowMultiLogin);
 }
 /// <summary>
 /// 取得采购计划包
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <returns></returns>
 public static PurchasePlanPackage GetPurchasePlanPackage(this HttpRequest request, User user, IDatabase database)
 {
     var purchasePlanPackage = request.getPurchasePlanPackage(database);
     purchasePlanPackage.Issued = false;
     purchasePlanPackage.Operator = database.Users.SingleOrDefault(u => u == user);
     purchasePlanPackage.ModifyTime = DateTime.Now;
     if (purchasePlanPackage.IsNew)
     {
         purchasePlanPackage.OperateTime = DateTime.Now;
     }
     return purchasePlanPackage;
 }
Esempio n. 19
0
        /// <summary>
        /// 取得学院
        /// </summary>
        /// <param name="request"></param> 
        /// <param name="user"></param>
        /// <param name="database"></param>
        /// <returns></returns>
        public static College GetCollege(this HttpRequest request, User user, IDatabase database)
        {
            var college = request.getCollege(database);
            college.Name = request.GetString("Name");
            college.CollegeCode = request.GetString("CollegeCode");

            college.ModifyTime = DateTime.Now;
            if (college.IsNew)
            {
                college.CreateTime = DateTime.Now;
            }
            return college;
        }
        /// <summary>
        /// 人才信息
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public static OutStandingQueryInformation GetOutStandingQueryInformationExtension(this HttpRequest request, User user)
        {
            var outStandingQueryInformation = new OutStandingQueryInformation();

            outStandingQueryInformation.Start = request.GetQueryInformation_Start();
            outStandingQueryInformation.Limit = request.GetQueryInformation_Limit();
            outStandingQueryInformation.SortInfo = request.GetQueryCondition_SortInfo();

            outStandingQueryInformation.name = request.GetString("Name");
            outStandingQueryInformation.code = request.GetString("Code");
            outStandingQueryInformation.selectedYear = request.GetInt("SelectedYear");
            return outStandingQueryInformation;
        }
        /// <summary>
        /// 获取国资处经费申请条目内容
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <param name="database"></param>
        /// <returns></returns>
        public static AssetFundApplyItem GetAssetFundApplyItem(this HttpRequest request, User user, IDatabase database)
        {
            var assetFundApplyItem = request.getAssetFundApplyItem(database);
            assetFundApplyItem.AssetFundApply = database.AssetFundApplys.GetByID(request.GetInt("AssetFundApplyID").Value);
            assetFundApplyItem.ContractItem = database.ContractItems.GetByID(request.GetInt("ContractItemID").Value);
            //assetFundApplyItem.BidControlAmount = request.GetInt("BidControlAmount").Value;
            assetFundApplyItem.ApplyTotalAmount = request.GetInt("ApplyTotalAmount").Value;
            //assetFundApplyItem.ExchangeRate = request.GetString("ExchangeRate");
            //assetFundApplyItem.TradeAgentFeeRate = request.GetString("TradeAgentFeeRate");
            assetFundApplyItem.Remark = request.GetString("Remark");

            return assetFundApplyItem;
        }
        /// <summary>
        /// 平台信息
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public static PlatFormQueryInformation GetPlatFormQueryInformationExtension(this HttpRequest request, User user)
        {
            var platFormQueryInformation = new PlatFormQueryInformation();

            platFormQueryInformation.Start = request.GetQueryInformation_Start();
            platFormQueryInformation.Limit = request.GetQueryInformation_Limit();
            platFormQueryInformation.SortInfo = request.GetQueryCondition_SortInfo();

            platFormQueryInformation.platName = request.GetString("PlatName");
            platFormQueryInformation.platCode = request.GetString("PlatCode");
            platFormQueryInformation.isBase = request.GetBoolean("IsBase");
            return platFormQueryInformation;
        }
        /// <summary>
        /// 项目信息
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public static ProjectQueryInformation GetProjectQueryInformationExtension(this HttpRequest request, User user)
        {
            var projectQueryInformation = new ProjectQueryInformation();

            projectQueryInformation.Start = request.GetQueryInformation_Start();
            projectQueryInformation.Limit = request.GetQueryInformation_Limit();
            projectQueryInformation.SortInfo = request.GetQueryCondition_SortInfo();

            projectQueryInformation.projectName = request.GetString("ProjectName");
            projectQueryInformation.managerName = request.GetString("ManagerName");
            projectQueryInformation.collegeName = request.GetString("CollegeName");
            projectQueryInformation.projectState = request.GetEnumList<MemberApplyState>("ProjectState");
            return projectQueryInformation;
        }
Esempio n. 24
0
 /// <summary>
 /// 取得专家申请
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <returns></returns>
 public static MemberApply GetExpertApply(this HttpRequest request, User user, IDatabase database)
 {
     var expertApply = request.getExpertApply(database);
     expertApply.Member = database.Users.SingleOrDefault(u => u == user);
     expertApply.Project = request.GetEntity<Project>(database.Projects, "ProjectID");
     expertApply.College = expertApply.Project.College;
     var projectMember = database.ProjectMembers.SingleOrDefault(p => p.Project == expertApply.Project && p.Member == user);
     projectMember.MemberDocPath = request.GetString("ProjectDeclarePath") == null ? null : request.GetString("ProjectDeclarePath");
     projectMember.Save(database);
     expertApply.UseTime = DateTime.Parse(request.GetString("ExpertUseTime"));
     expertApply.ApplyTime = DateTime.Parse(request.GetString("ExpertApplyTime"));
     expertApply.ModifyTime = DateTime.Now;
     return expertApply;
 }
Esempio n. 25
0
 /// <summary>
 /// 查询或取得逻辑设备
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <param name="project"></param>
 /// <returns></returns>
 public static LogicDevice GetLogicDevice(this HttpRequest request, User user, IDatabase database,Project project)
 {
     var logicDevice = request.getLogicDevice(database);
     logicDevice.LogicDeviceName = project.ProjectName;
     logicDevice.ParentLogicDevice = null;
     logicDevice.Leaf = false;
     logicDevice.IconCls = "wy-projectLeafIcon";
     logicDevice.ModifyTime = DateTime.Now;
     if (logicDevice.IsNew)
     {
         logicDevice.CreateTime = DateTime.Now;
     }
     return logicDevice;
 }
Esempio n. 26
0
        /// <summary>
        /// 取得系统设置
        /// </summary>
        /// <param name="request"></param>
        /// <param name="database"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public static SystemSetting GetSystemSetting(this HttpRequest request, IDatabase database, User user)
        {
            var systemsetting = request.getSystemSetting(database, user);

            systemsetting.EmailAddress = request.GetString("EmailAddress");
            systemsetting.SmtpHost = request.GetString("SmtpHost");
            systemsetting.SmtpPort = request.GetInt("SmtpPort");
            systemsetting.SmtpUsername = request.GetString("SmtpUsername");
            systemsetting.SmtpPassword = request.GetString("SmtpPassword");
            //systemsetting.FinanceWebAddress = request.GetString("FinanceWebAddress");
            //systemsetting.ExpertWebAddress = request.GetString("ExpertWebAddress");
            //systemsetting.WindowsServiceType = null;

            return systemsetting;
        }
Esempio n. 27
0
 /// <summary>
 /// 获得合同条目
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <returns></returns>
 public static ContractItem GetContractItem(this HttpRequest request, User user, IDatabase database)
 {
     var contractItem = request.getContractItem(database);
     contractItem.Contract = request.GetEntity<Contract>(database.Contracts, "ContractID");
     contractItem.BidResultItem = request.GetEntity<BidResultItem>(database.BidResultItems, "BidResultItemID");
     contractItem.ProductName = request.GetString("ProductName").Trim();
     contractItem.ProductOrigin = request.GetString("ProductOrigin").Trim();
     contractItem.Model = request.GetString("Model").Trim();
     contractItem.Unit = (UnitType)Enum.Parse(typeof(UnitType), request.GetString("Unit").Trim());
     contractItem.Quantity = request.GetInt("Quantity").Value;
     contractItem.ContractUnitPrice = request.GetMoney("ContractUnitPrice").Value;
     contractItem.ContractItemAmount = request.GetMoney("ContractItemAmount").Value;
     contractItem.State = request.GetEnum<ContractItemState>("State");
     return contractItem;
 }
Esempio n. 28
0
        /// <summary>
        /// 取得中标结果
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <param name="database"></param>
        /// <returns></returns>
        public static BidFailedResult GetBidFailedResult(this HttpRequest request, User user, IDatabase database)
        {
            var result = request.getBidFailedResult(database);

            result.Number = request.GetString("number").Trim() == null ? "" : request.GetString("number");
            result.DocPath = request.GetString("docPath") == null ? null : request.GetString("docPath");
            result.FailedTime = request.GetDateTime("FailedTime");
            result.Operator = database.Users.SingleOrDefault(u => u == user);
            result.ModifyTime = DateTime.Now;
            if (result.IsNew)
            {
                result.OperateTime = DateTime.Now;
            }
            return result;
        }
        /// <summary>
        /// 用户信息
        /// </summary>
        /// <param name="request"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        public static UserQueryInformation GetUserQueryInformationExtension(this HttpRequest request, User user)
        {
            var queryInformation = new UserQueryInformation();

            queryInformation.Start = request.GetQueryInformation_Start();
            queryInformation.Limit = request.GetQueryInformation_Limit();
            queryInformation.SortInfo = request.GetQueryCondition_SortInfo();

            queryInformation.name = request.GetString("name");
            queryInformation.loginID = request.GetString("loginID");
            queryInformation.allowMultiLogin = request.GetBoolean("allowMultiLogin");
            queryInformation.modifyTime = request.GetDateRange("modifyTime");

            return queryInformation;
        }
 /// <summary>
 /// 取得建设计划包
 /// </summary>
 /// <param name="request"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 /// <returns></returns>
 public static ConstructPlanItem GetConstructPackageItem(this HttpRequest request, User user, IDatabase database)
 {
     var packageItem = request.getConstructPackageItem(database);
     packageItem.ConstructPlanPackage = request.GetEntity(database.ConstructPlanPackages, "ConstructPlanPackageID");
     packageItem.MemberApplyItem = request.GetEntity(database.MemberApplyItems, "MemberApplyItemID");
     packageItem.BudgetAmount = request.GetMoney("BudgetAmount").Value;
     if (packageItem.IsNew)
     {
         var lastFourDeviceNumber = request.GetString("DeviceNumber");
         packageItem.DeviceNumber = _deviceNumberFromConstructPackage(database, packageItem.ConstructPlanPackage, packageItem.MemberApplyItem, lastFourDeviceNumber);
     }
     else
         packageItem.DeviceNumber = request.GetString("DeviceNumber");
     return packageItem;
 }