/// <summary> /// 显示采购计划包 /// </summary> /// <param name="purchasePlanPackage"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowPurchasePlanPackage(this PurchasePlanPackage purchasePlanPackage, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", purchasePlanPackage.ID); response.WriteTagWithValue("OperatorID", purchasePlanPackage.OperatorID); response.WriteTagWithValue("OperateTime", purchasePlanPackage.OperateTime); response.WriteTagWithValue("Issued", purchasePlanPackage.Issued.ToString()); }
/// <summary> /// 建设任务 /// </summary> /// <param name="constructTask"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowConstructTask(this ConstructTask constructTask, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", constructTask.ID); response.WriteTagWithValue("DocNumber", constructTask.DocNumber); response.WriteTagWithValue("DocPath", constructTask.DocPath); response.WriteTagWithValue("Remark", constructTask.Remark); }
/// <summary> /// 显示平台 /// </summary> /// <param name="platForm"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowPlatForm(this PlatForm platForm, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", platForm.ID); response.WriteTagWithValue("PlatName", platForm.PlatName); response.WriteTagWithValue("PlatCode", platForm.PlatCode); response.WriteTagWithValue("IsBase", platForm.IsBase); }
/// <summary> /// 显示人才 /// </summary> /// <param name="outStanding"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowOutStanding(this OutStanding outStanding, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", outStanding.ID); response.WriteTagWithValue("Name", outStanding.Name); response.WriteTagWithValue("Code", outStanding.Code); response.WriteTagWithValue("SelectedYear", outStanding.SelectedYear); response.WriteTagWithValue("FullName", outStanding.SelectedYear + outStanding.Name); }
/// <summary> /// 显示调整后明细列表 /// </summary> /// <param name="adjustHistoryState"></param> /// <param name="response"></param> /// <param name="database"></param> public static void Show(this AdjustHistoryState adjustHistoryState, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", adjustHistoryState.ID); response.WriteTagWithValue("AdjustAuditTime", adjustHistoryState.OperateTime); response.WriteTagWithValue("AdjustAuditOperator", adjustHistoryState.Operator.Name); response.WriteTagWithValue("AdjustAuditAdvice", adjustHistoryState.Suggestion); response.WriteTagWithValue("State", adjustHistoryState.State); }
/// <summary> /// 显示选型供应商 /// </summary> /// <param name="deviceSupplier"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowDeviceSupplier(this DeviceSupplier deviceSupplier, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", deviceSupplier.ID); response.WriteTagWithValue("DeviceMatchID", deviceSupplier.DeviceMatchID); response.WriteTagWithValue("SupplierID", deviceSupplier.SupplierID); response.WriteTagWithValue("SupplierName", deviceSupplier.Supplier.Name); response.WriteTagWithValue("Price", deviceSupplier.Price); response.WriteTagWithValue("PriceSource", deviceSupplier.PriceSource == 0 ? "供应商" : "网络"); response.WriteTagWithValue("ContactPerson", deviceSupplier.ContactPerson); response.WriteTagWithValue("ContactPhone", deviceSupplier.ContactPhone); response.WriteTagWithValue("Email", deviceSupplier.Email); response.WriteTagWithValue("WebURL", deviceSupplier.WebURL); }
private static void showAssetFundApply(this AssetFundApply apply, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", apply.ID); response.WriteTagWithValue("Quantity", apply.Quantity); response.WriteTagWithValue("BudgetAmount", Convert.ToDouble(apply.BudgetAmount) / 1000000); //response.WriteTagWithValue("BidControlAmount", Convert.ToDouble(apply.BidControlAmount) / 1000000); response.WriteTagWithValue("DeviceValue", Convert.ToDouble(apply.DeviceValue) / 100); response.WriteTagWithValue("TradeAgentFee", Convert.ToDouble(apply.TradeAgentFee) / 100); response.WriteTagWithValue("ApplyTotalAmount", Convert.ToDouble(apply.ApplyTotalAmount) / 100); response.WriteTagWithValue("State", apply.State); response.WriteTagWithValue("OperatorName", apply.Operator.Name); response.WriteTagWithValue("OperateTime", apply.OperateTime); }
/// <summary> /// 列表显示预算明细条目信息 /// </summary> /// <param name="item"></param> /// <param name="response"></param> /// <param name="database"></param> private static void showOfficeBudgetDetailItem(this OfficeBudgetDetailItem item, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", item.ID); response.WriteTagWithValue("AssetFundApplyItemID", item.AssetFundApplyItemID); response.WriteTagWithValue("OfficeBudgetDetailID", item.OfficeBudgetDetailID); response.WriteTagWithValue("ContractNumber", item.AssetFundApplyItem.ContractItem.Contract.Number); response.WriteTagWithValue("SupplierName", item.AssetFundApplyItem.ContractItem.Contract.Supplier.Name); //response.WriteTagWithValue("BudgetAmount", item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.BudgetAmount); response.WriteTagWithValue("BudgetAmount", item.AssetFundApplyItem.ContractItem.Quantity * item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice); response.WriteTagWithValue("ContractItemAmount", item.AssetFundApplyItem.ContractItem.ContractItemAmount / 100); response.WriteTagWithValue("Currency", item.AssetFundApplyItem.ContractItem.BidResultItem.Currency); //response.WriteTagWithValue("TradeAgentFeeRate", item.AssetFundApplyItem.TradeAgentFeeRate); //response.WriteTagWithValue("ExchangeRate", item.AssetFundApplyItem.ExchangeRate); response.WriteTagWithValue("ApplyTotalAmount", item.AssetFundApplyItem.ApplyTotalAmount / 100); response.WriteTagWithValue("OfficeIssuedAmount", item.OfficeIssuedAmount / 100); response.WriteTagWithValue("ProductName", item.AssetFundApplyItem.ContractItem.ProductName); response.WriteTagWithValue("BcQuantity", item.AssetFundApplyItem.ContractItem.Quantity); response.WriteTagWithValue("CollegeName", item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.College.Name); response.WriteTagWithValue("PlatName", item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.College.PlatForm.PlatName); response.WriteTagWithValue("DepartmentCode", item.GetDepartmentCode(database, item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.CollegeID.Value)); response.WriteTagWithValue("ExpertName", item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Member.Name); response.WriteTagWithValue("DeviceNumber", item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.DeviceNumber); response.WriteTagWithValue("Remark1", item.Remark1); response.WriteTagWithValue("Remark2", item.Remark2); response.WriteTagWithValue("Account", item.OfficeBudgetDetail.Account); response.WriteTagWithValue("State", item.OfficeBudgetDetail.State); //response.WriteTagWithValue("Account", item.OfficeBudgetDetail.Account); var officeBudgetDetailState = database.OfficeBudgetDetails.Where(afa => afa.ID == item.OfficeBudgetDetailID).SingleOrDefault().State.ToString(); response.WriteTagWithValue("OfficeBudgetDetailState", officeBudgetDetailState == "UnSubmit" ? "未提交" : "已提交"); //var officeBudgetDetailState = database.OfficeBudgetDetails.Where(obd => obd.ID == item.OfficeBudgetDetailID).SingleOrDefault().State.ToString(); //response.WriteTagWithValue("OfficeBudgetDetailState",item.OfficeBudgetDetail.State); response.WriteTagWithValue("DetailNumber", item.OfficeBudgetDetail.DetailNumber); response.WriteTagWithValue("GroupField", item.OfficeBudgetDetailID + "," + officeBudgetDetailState.ToString()); //response.WriteTagWithValue("WinGroupField", item.OfficeBudgetDetailID); if (item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackage.OutStandingID != null) { response.WriteTagWithValue("WinGroupField", item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Member.Name); } else { response.WriteTagWithValue("WinGroupField", item.AssetFundApplyItem.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.College.Name); } //添加财务处经费预算核定条目 /* var financeBudgetCheckItem = database.FinanceBudgetCheckItems.FirstOrDefault(fbc => fbc.OfficeBudgetDetailItem == item); if (financeBudgetCheckItem != null) { response.WriteTagWithValue("FinanceBudgetCheckItemID", financeBudgetCheckItem.ID); response.WriteTagWithValue("IsChecked", "已核定"); } else { response.WriteTagWithValue("FinanceBudgetCheckItemID", ""); response.WriteTagWithValue("IsChecked", "未核定"); } * */ }
/// <summary> /// 显示催办提醒 /// </summary> /// <param name="Item"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowTaskReminder(this TaskReminder Item, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", Item.ID); response.WriteTagWithValue("Receiver", Item.Receiver.Name); response.WriteTagWithValue("ReceiverID", Item.ReceiverID); response.WriteTagWithValue("Sender", Item.Sender == null ? string.Empty : Item.Sender.Name); response.WriteTagWithValue("SenderID", Item.SenderID); response.WriteTagWithValue("Content", Item.Content); response.WriteTagWithValue("CreateTime", Item.CreateTime); response.WriteTagWithValue("RemindTime", Item.RemindTime); response.WriteTagWithValue("IsRead", Item.IsRead); }
/// <summary> /// ��ʾ�����豸 /// </summary> /// <param name="marketDevice"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowMarketDevice(this MarketDevice marketDevice, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", marketDevice.ID); response.WriteTagWithValue("MarketDeviceName", marketDevice.MarketDeviceName); response.WriteTagWithValue("isRecommended", marketDevice.IsRecommended); response.WriteTagWithValue("Manufactures", marketDevice.Manufactures); response.WriteTagWithValue("Model", marketDevice.Model); response.WriteTagWithValue("MainSpec", marketDevice.MainSpec); response.WriteTagWithValue("AccessorySpec", marketDevice.AccessorySpec); response.WriteTagWithValue("Configuration", marketDevice.Configuration); response.WriteTagWithValue("ModifyTime", marketDevice.ModifyTime); }
/// <summary> /// 列表显示预算明细信息 /// </summary> /// <param name="budget"></param> /// <param name="response"></param> /// <param name="database"></param> private static void showFinanceBudgetCheck(this FinanceBudgetCheck budget, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", budget.ID); response.WriteTagWithValue("Title", budget.Title); response.WriteTagWithValue("Number", budget.Number); response.WriteTagWithValue("DepartmentID", budget.DepartmentID); response.WriteTagWithValue("CheckDate", budget.CheckDate); response.WriteTagWithValue("State", budget.State); response.WriteTagWithValue("Remark", budget.Remark); response.WriteTagWithValue("OperateID", budget.OperatorID); }
/// <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="loginResult"></param> /// <param name="response"></param> /// <param name="database"></param> public static void Show(this LoginResult loginResult, HttpResponse response, IDatabase database) { response.WriteTagBegin("LoginResult"); response.WriteTagWithValue("State", loginResult.State); if (loginResult.State == LoginResultState.Succeed) loginResult.UserLoginLog.Show(response, database); response.WriteTagEnd("LoginResult"); }
/// <summary> /// 显示校外购置情况 /// </summary> /// <param name="deviceExtramural"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowDeviceExtramural(this DeviceExtramural deviceExtramural, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", deviceExtramural.ID); response.WriteTagWithValue("Brand", deviceExtramural.Brand); response.WriteTagWithValue("ApplyDeviceID", deviceExtramural.ApplyDeviceID); response.WriteTagWithValue("UserName", deviceExtramural.UserName); response.WriteTagWithValue("WorkUnit", deviceExtramural.WorkUnit); response.WriteTagWithValue("UnitPrice", deviceExtramural.UnitPrice); response.WriteTagWithValue("BuyTime", deviceExtramural.BuyTime); }
/// <summary> /// 显示用户登陆记录 /// </summary> /// <param name="userLogin"></param> /// <param name="response"></param> /// <param name="database"></param> public static void Show(this UserLoginLog userLogin, HttpResponse response, IDatabase database) { response.WriteTagBegin("UserLoginLog"); response.WriteTagWithValue("Token", userLogin.Token); response.WriteTagBegin("User"); userLogin.User.ShowUser(response, database); response.WriteTagEnd("User"); response.WriteTagEnd("UserLoginLog"); }
/// <summary> /// 返回流标结果 /// </summary> /// <param name="result"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowBidFailedResult(this BidFailedResult result, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", result.ID); response.WriteTagWithValue("OperatorID", result.OperatorID); response.WriteTagWithValue("OperatorName", result.Operator.Name); response.WriteTagWithValue("Number", result.Number); response.WriteTagWithValue("DocPath", result.DocPath); if (result.DocPath != "") { response.WriteTagWithValue("DocName", database.Resources.GetResourceByDocPath(result.DocPath, database).ResourceName); } response.WriteTagWithValue("FailedTime", result.FailedTime); response.WriteTagWithValue("OperatorTime", result.OperateTime); }
/// <summary> /// 返回中标结果 /// </summary> /// <param name="result"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowBidResult(this BidResult result, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", result.ID); response.WriteTagWithValue("Number", result.Number); response.WriteTagWithValue("DocPath", result.DocPath); if (result.DocPath != "") { response.WriteTagWithValue("DocName", database.Resources.GetResourceByDocPath(result.DocPath,database).ResourceName); } response.WriteTagWithValue("BiddingWay", result.BiddingWay); response.WriteTagWithValue("Remark", result.Remark); response.WriteTagWithValue("BidTime", result.BidTime); response.WriteTagWithValue("BidAllAmount", result.BidAllAmount); }
/// <summary> /// 显示查询短消息 /// </summary> /// <param name="result"></param> /// <param name="response"></param> /// <param name="user"></param> public static void Show(this QueryResult<Message> result, HttpResponse response, User user) { //ShowDelegate<Message> showDelegate = new ShowDelegate<Message>(ShowMessage); //result.Show<Message>(response, showDelegate); response.WriteTagBegin("QueryResult"); response.WriteTagWithValue("Total", result.Total); response.WriteTagBegin("List"); foreach (var message in result.ResultList) { response.WriteTagBegin("Record"); ShowMessage(message, response, user); response.WriteTagEnd("Record"); } response.WriteTagEnd("List"); response.WriteTagEnd("QueryResult"); }
/// <summary> /// 显示系统设置 /// </summary> public static void ShowSystemSetting(SystemSetting systemsetting, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", systemsetting.ID); response.WriteTagWithValue("EmailAddress", systemsetting.EmailAddress); response.WriteTagWithValue("SmtpHost", systemsetting.SmtpHost); response.WriteTagWithValue("SmtpPort", systemsetting.SmtpPort); response.WriteTagWithValue("SmtpUsername", systemsetting.SmtpUsername); response.WriteTagWithValue("SmtpPassword", systemsetting.SmtpPassword); //response.WriteTagWithValue("FinanceWebAddress", systemsetting.FinanceWebAddress); //response.WriteTagWithValue("ExpertWebAddress", systemsetting.ExpertWebAddress); response.WriteTagWithValue("LogType", systemsetting.GetAutoRunLogType(database)); response.WriteTagWithValue("WindowsServiceType", systemsetting.GetAutoRunWindowService(database)); }
/// <summary> /// 返回合同 /// </summary> /// <param name="contract"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowContract(this Contract contract, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", contract.ID); response.WriteTagWithValue("Number", contract.Number); response.WriteTagWithValue("DocPath", contract.DocPath); if (contract.DocPath != "") { response.WriteTagWithValue("DocName", database.Resources.GetResourceByDocPath(contract.DocPath, database).ResourceName); } response.WriteTagWithValue("Party", contract.Party); response.WriteTagWithValue("SupplierID", contract.SupplierID); response.WriteTagWithValue("SupplierName", contract.Supplier.Name); response.WriteTagWithValue("ContractTime", contract.ContractTime); response.WriteTagWithValue("ContractPlace", contract.ContractPlace); response.WriteTagWithValue("Currency", database.ContractItems.FirstOrDefault(ci => ci.ContractID == contract.ID).BidResultItem.Currency); response.WriteTagWithValue("ContractAmount", contract.ContractAmount); }
/// <summary> /// 显示调整设备条目 /// </summary> /// <param name="constructTaskItem"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowAdjustItem(this ConstructTaskItem constructTaskItem, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", constructTaskItem.ID); response.WriteTagWithValue("ProjectID", constructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.ProjectID); response.WriteTagWithValue("ConstructTaskItemID", constructTaskItem.ID); response.WriteTagWithValue("ConstructPlanItemID", constructTaskItem.ConstructPlanItemID); response.WriteTagWithValue("CurrentStage", "建设任务" + constructTaskItem.ConstructTask.DocNumber); response.WriteTagWithValue("DeviceNumber", constructTaskItem.ConstructPlanItem.DeviceNumber); response.WriteTagWithValue("DeviceID", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDeviceID); response.WriteTagWithValue("DeviceName", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.DeviceName); response.WriteTagWithValue("Price", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice); response.WriteTagWithValue("Count", constructTaskItem.Quantity); response.WriteTagWithValue("Configuration", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.Configuration); response.WriteTagWithValue("MainSpec", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.MainSpec); response.WriteTagWithValue("Cost", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * constructTaskItem.Quantity); response.WriteTagWithValue("AdjustType", "未调整"); var count = constructTaskItem.ConstructPlanItem.MemberApplyItem.Quantity - constructTaskItem.ConstructPlanItem.GetAllocatedCount(database); if (count > 0) { response.WriteTagEnd("Record"); response.WriteTagBegin("Record"); response.WriteBegin(); response.WriteTagWithValue("ID", constructTaskItem.ConstructPlanItemID); response.WriteTagWithValue("Count", count); response.WriteTagWithValue("ProjectID", constructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.ProjectID); response.WriteTagWithValue("ConstructTaskItemID", constructTaskItem.ID); response.WriteTagWithValue("ConstructPlanItemID", constructTaskItem.ConstructPlanItemID); response.WriteTagWithValue("CurrentStage", "建设计划"); response.WriteTagWithValue("Configuration", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.Configuration); response.WriteTagWithValue("MainSpec", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.MainSpec); response.WriteTagWithValue("DeviceNumber", constructTaskItem.ConstructPlanItem.DeviceNumber); response.WriteTagWithValue("DeviceID", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDeviceID); response.WriteTagWithValue("DeviceName", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.DeviceName); response.WriteTagWithValue("Price", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice); response.WriteTagWithValue("Cost", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * count); response.WriteTagWithValue("AdjustType", "未调整"); } }
/// <summary> /// 用于项目类型下拉表 /// </summary> /// <param name="contentType"></param> /// <param name="response"></param> public static void ShowProjectContentType(this ContentType contentType, HttpResponse response) { response.WriteTagWithValue("ID", contentType.ID); response.WriteTagWithValue("Value", contentType.TypeName); }
/// <summary> /// 为专家显示调整列表中的建设任务条目 /// </summary> /// <param name="constructTaskItem"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowItemToAdjust(this ConstructTaskItem constructTaskItem, HttpResponse response, IDatabase database) { var purchasePlanItem = database.PurchasePlanItems.SingleOrDefault(c => c.ConstructTaskItem == constructTaskItem); response.WriteTagBegin("Record"); response.WriteTagWithValue("ProjectID", constructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.ProjectID); response.WriteTagWithValue("ProjectName", constructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Project.ProjectName); response.WriteTagWithValue("ConstructTaskItemID", constructTaskItem.ID); response.WriteTagWithValue("ConstructTaskNumber", constructTaskItem.ConstructTask.DocNumber); response.WriteTagWithValue("ConstructTaskID", constructTaskItem.ConstructTask.ID); response.WriteTagWithValue("ConstructPlanItemID", constructTaskItem.ConstructPlanItemID); response.WriteTagWithValue("ConstructPlanID", constructTaskItem.ConstructPlanItem.ConstructPlanPackageID); // 为任务添加建设计划编号 response.WriteTagWithValue("PackageNumber", constructTaskItem.ConstructPlanItem.ConstructPlanPackage.PackageNumber + "--本批次任务已下达"); if (purchasePlanItem != null) { response.WriteTagWithValue("PurchasePlanItemID", purchasePlanItem.ID); var purchaseOrderItem = database.PurchaseOrderItems.SingleOrDefault(c => c.PurchasePlanItem == purchasePlanItem); if (purchaseOrderItem != null) { var bidFailedResultItem = database.BidFailedResultItems.SingleOrDefault(c => c.PurchaseOrderItem == purchaseOrderItem); response.WriteTagWithValue("BidFailedResultItemID", bidFailedResultItem.ID); } } response.WriteTagWithValue("MemberApplyItemID", constructTaskItem.ConstructPlanItem.MemberApplyItemID); response.WriteTagWithValue("ApplyDeviceID", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDeviceID); response.WriteTagWithValue("DeviceNumber", constructTaskItem.ConstructPlanItem.DeviceNumber); response.WriteTagWithValue("DeviceName", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.DeviceName); response.WriteTagWithValue("Price", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice); response.WriteTagWithValue("Configuration", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.Configuration); response.WriteTagWithValue("MainSpec", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.MainSpec); //任务量 response.WriteTagWithValue("DesendCount", constructTaskItem.Quantity); //计划量 response.WriteTagWithValue("Count", constructTaskItem.ConstructPlanItem.MemberApplyItem.Quantity); //申购完成量 response.WriteTagWithValue("CompleteCount", constructTaskItem.ConstructPlanItem.MemberApplyItem.GetCompleteAmount(database)); //申购流标量 response.WriteTagWithValue("FailCount", constructTaskItem.ConstructPlanItem.MemberApplyItem.GetFailAmount(database)); //任务完成量 response.WriteTagWithValue("TempCompleteCount", constructTaskItem.GetCompleteAmount(database)); //任务流标量 response.WriteTagWithValue("TempFailCount", constructTaskItem.GetFailAmount(database)); //判断当前状态,标示可调整量 //是否已指定采购计划 if (purchasePlanItem != null) { var purchaseOrderItem = database.PurchaseOrderItems.SingleOrDefault(c => c.PurchasePlanItem == purchasePlanItem); if (purchaseOrderItem != null) { response.WriteTagWithValue("CurrentStage", "招标完成/存在流标设备"); //调整设备量 response.WriteTagWithValue("AdjustCount", constructTaskItem.GetFailAmount(database)); //调整金额 response.WriteTagWithValue("Cost", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * constructTaskItem.GetFailAmount(database)); } else { response.WriteTagWithValue("CurrentStage", "已制定采购计划/未下达采购指令"); //调整设备量 response.WriteTagWithValue("AdjustCount", constructTaskItem.Quantity); //调整金额 response.WriteTagWithValue("Cost", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * constructTaskItem.Quantity); } } else { response.WriteTagWithValue("CurrentStage", "已下达建设任务/未制定采购计划"); //调整设备量 response.WriteTagWithValue("AdjustCount", constructTaskItem.Quantity); //调整金额 response.WriteTagWithValue("Cost", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * constructTaskItem.Quantity); } response.WriteTagEnd("Record"); }
/// <summary> /// 显示建设任务条目 /// </summary> /// <param name="constructTaskItem"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowConstructTaskItem(this ConstructTaskItem constructTaskItem, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", constructTaskItem.ID); response.WriteTagWithValue("Quantity", constructTaskItem.Quantity); response.WriteTagWithValue("Count", constructTaskItem.ConstructPlanItem.MemberApplyItem.Quantity); response.WriteTagWithValue("AllocatedCount", constructTaskItem.ConstructPlanItem.GetAllocatedCount(database)); response.WriteTagWithValue("ConstructTaskID", constructTaskItem.ConstructTaskID); response.WriteTagWithValue("ConstructPlanItemID", constructTaskItem.ConstructPlanItemID); response.WriteTagWithValue("MemberApplyItemID", constructTaskItem.ConstructPlanItem.MemberApplyItemID); response.WriteTagWithValue("MemberID", constructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.MemberID); response.WriteTagWithValue("ExpertName", constructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Member.Name); response.WriteTagWithValue("ProjectName", constructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Project.ProjectName); response.WriteTagWithValue("DeviceNumber", constructTaskItem.ConstructPlanItem.DeviceNumber); response.WriteTagWithValue("ApplyDeviceID", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDeviceID); response.WriteTagWithValue("DeviceName", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.DeviceName); response.WriteTagWithValue("UnitPrice", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice); response.WriteTagWithValue("Amount", constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * constructTaskItem.Quantity); response.WriteTagWithValue("DocNumber", constructTaskItem.ConstructTask.DocNumber); response.WriteTagWithValue("DocPath", constructTaskItem.ConstructTask.DocPath); response.WriteTagWithValue("DetailNumber", constructTaskItem.ConstructTask.DetailNumber); response.WriteTagWithValue("Account", constructTaskItem.ConstructTask.Account); response.WriteTagWithValue("ReportYear", constructTaskItem.ConstructTask.ReportYear); response.WriteTagWithValue("FundSource", constructTaskItem.ConstructTask.FundSource); response.WriteTagWithValue("ControllerAmount",constructTaskItem.ConstructPlanItem.ConstructPlanPackage.ControllerAmount); if (constructTaskItem.ConstructTask.DocPath != null && constructTaskItem.ConstructTask.DocPath != "") { response.WriteTagWithValue("DocFileName", database.Resources.GetResourceByDocPath(constructTaskItem.ConstructTask.DocPath, database).ResourceName); } response.WriteTagWithValue("DocName", constructTaskItem.ConstructTask.DocName); response.WriteTagWithValue("Remark", constructTaskItem.ConstructTask.Remark); response.WriteTagWithValue("IsPurchasePlanItem", constructTaskItem.IsPurchasePlanItem.ToString()); var constructTask = database.ConstructTaskItems.Where(c => c.ConstructTaskID == constructTaskItem.ConstructTaskID).ToList(); var constructTaskState = database.ConstructTasks.Where(afa => afa.ID == constructTaskItem.ConstructTaskID).SingleOrDefault().IsSend.ToString(); response.WriteTagWithValue("ConstructTaskState", constructTaskState == "False" ? "未下达" : "已下达"); //var amount = (constructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * constructTaskItem.Quantity).Value.ToShowAsMoney(); long amount = 0; foreach (var item in constructTask) { if ((item.IsBeforeAdjust == false || item.IsBeforeAdjust == null) && item.ConstructPlanItem.MemberApplyItem.Quantity != 0 && (item.IsAfterAdjust != true || (item.ConstructPlanItem.MemberApplyItem.IsAfterAdjustPassed(database)))) amount += (item.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * item.Quantity).Value; } response.WriteTagWithValue("ShowText", string.Format("{0:D}", constructTaskItem.ConstructTask.OperateTime) + " " + constructTaskItem.ConstructTask.Operator.Name + "下达," + "控制包总金额:" + amount.ToShowAsMoney()); var isSubmit = constructTaskItem.ConstructTask.IsSend.ToString().ToLower(); var canDeleteTask = constructTaskItem.ConstructTask.CanDeleteTask(constructTaskItem.ConstructTask, database).ToString().ToLower(); var canEditTask = constructTaskItem.ConstructTask.CanEditTask(constructTaskItem.ConstructTask, database).ToString().ToLower(); response.WriteTagWithValue("GroupField", constructTaskItem.ConstructTask.ID + "," + constructTaskItem.ConstructTask.DocPath + "," + canDeleteTask + "," + canEditTask + "," + isSubmit); }
/// <summary> /// 显示采购指令条目 /// </summary> /// <param name="purchaseOrderItem"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowPurchaseOrderItems(this PurchaseOrderItem purchaseOrderItem, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", purchaseOrderItem.ID); response.WriteTagWithValue("PurchaseOrderPackageID", purchaseOrderItem.PurchaseOrderPackageID); response.WriteTagWithValue("PurchasePlanItemID", purchaseOrderItem.PurchasePlanItemID); response.WriteTagWithValue("ConstructPlanPackageID", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackageID); response.WriteTagWithValue("Quantity", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.Quantity); response.WriteTagWithValue("BidQuantity", purchaseOrderItem.GetBitQuantityByPurchaseOrderItemID(purchaseOrderItem.ID, database)); response.WriteTagWithValue("FailedQuantity", purchaseOrderItem.GetFailedQuantityByPurchaseOrderItemID(purchaseOrderItem.ID, database)); response.WriteTagWithValue("MemberID", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.MemberID); response.WriteTagWithValue("ExpertName", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Member.Name); response.WriteTagWithValue("ProjectID", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.ProjectID); response.WriteTagWithValue("ProjectName", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Project.ProjectName); response.WriteTagWithValue("DeviceNumber", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.DeviceNumber); response.WriteTagWithValue("ApplyDeviceID", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDeviceID); response.WriteTagWithValue("DeviceName", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.DeviceName); response.WriteTagWithValue("UnitPrice", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice); response.WriteTagWithValue("Amount", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.Quantity); response.WriteTagWithValue("ControllerAmount", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackage.ControllerAmount); response.WriteTagWithValue("IsContract", database.ContractItems.Where(c => c.BidResultItem.PurchaseOrderItemID == purchaseOrderItem.ID).Count() > 0 ? bool.TrueString.ToLower() : bool.FalseString.ToLower()); response.WriteTagWithValue("ShowText", purchaseOrderItem.PurchaseOrderPackage.OrderName); response.WriteTagWithValue("BidOtherAmount", purchaseOrderItem.GetTotalBidAmount(purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackageID, database)); var alreadyApplyAmount = purchaseOrderItem.GetAlreadyApplyTotalAmount(purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackageID, database); response.WriteTagWithValue("IsControllerAmount0", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackage.ControllerAmount - alreadyApplyAmount == 0 ? bool.TrueString.ToLower() : bool.FalseString.ToLower()); var purchaseTerminals = database.PurchaseTerminals.SingleOrDefault(p => p.PurchaseOrderItemID == purchaseOrderItem.ID); if (purchaseTerminals == null) { response.WriteTagWithValue("Remark", ""); } else { response.WriteTagWithValue("Remark", purchaseTerminals.Remark); } if (purchaseOrderItem.IsTerminated == false || purchaseOrderItem.IsTerminated == null) { response.WriteTagWithValue("TerminatedQuantity", '0'); } else if (purchaseOrderItem.IsTerminated == true ) { response.WriteTagWithValue("TerminatedQuantity", purchaseOrderItem.PurchasePlanItem.ConstructTaskItem.Quantity - purchaseOrderItem.GetBitQuantityByPurchaseOrderItemID(purchaseOrderItem.ID, database)); } var canDeletePurchaseOrder = purchaseOrderItem.PurchaseOrderPackage.CanDeletePurchaseOrder(purchaseOrderItem.PurchaseOrderPackage, database).ToString().ToLower(); response.WriteTagWithValue("GroupField", purchaseOrderItem.PurchaseOrderPackageID + "," + purchaseOrderItem.PurchaseOrderPackage.BidFilePath + "," + canDeletePurchaseOrder); }
/// <summary> /// 显示交流运行项目 /// </summary> /// <param name="project"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowCommunicationOperation(this Project project, HttpResponse response, IDatabase database) { bool flg = true; response.WriteTagWithValue("ProjectID", project.ID); response.WriteTagWithValue("ProjectName", project.ProjectName); response.WriteTagWithValue("Object", project.Object); response.WriteTagWithValue("Achievement", project.Achievement); response.WriteTagWithValue("ManagerName", project.Manager.Name); response.WriteTagWithValue("ManagerID", project.ManagerID); response.WriteTagWithValue("CollegeName", project.College.Name); response.WriteTagWithValue("CollegeID", project.CollegeID); response.WriteTagWithValue("ContactorID", project.ContactorID); //未完成 response.WriteTagWithValue("IsBudget", false); var labExchanges = database.LaboratoryExchanges.GetByProjectID(project.ID,database).ResultList; //if (labExchanges.Count() == 0) //{ // response.WriteTagWithValue("IsConditionCanCommit", false); //} //else //{ //} if (project.Contactor != null) { response.WriteTagWithValue("ContactorName", project.Contactor.Name); response.WriteTagWithValue("ContactorPhone", project.Contactor.MobilePhone); } response.WriteTagWithValue("DocPath", project.DocPath); response.WriteTagWithValue("ProjectState", project.State); response.WriteTagWithValue("ModifyTime", project.ModifyTime); var manager = database.Experts.SingleOrDefault(d => d.UserID == project.ManagerID); if (project.CollegeID == manager.CollegeID) { response.WriteTagWithValue("IsSecondCollege", false); } else { response.WriteTagWithValue("IsSecondCollege", true); } var projectContentForum = database.ProjectContentForums.SingleOrDefault(pct => pct.ProjectContentType.Project == project && pct.ProjectContentType.ContentTypeID == 4 && pct.ContentForum.ContentTypeID == 4 && pct.ContentForum.ForumID == 4); if (projectContentForum != null) { if (labExchanges.Count() != 0) { var labExchange = database.LaboratoryExchanges.SingleOrDefault(d => d.ProjectContentForumID == projectContentForum.ID); response.WriteTagWithValue("LabExchangeID", labExchange.ID); response.WriteTagWithValue("LabID", labExchange.LabID); response.WriteTagWithValue("LabName", labExchange.Lab.Name); response.WriteTagWithValue("Year", labExchange.Year); response.WriteTagWithValue("Amount", labExchange.Amount); var LaboratoryExchangeTasks = database.LaboratoryExchangeTasks.Where(d => d.LaboratoryExchangeID == labExchange.ID).ToList(); if (LaboratoryExchangeTasks.Count() == 0) { flg = false; } } else { flg = false; } } else { flg = false; } response.WriteTagWithValue("IsConditionCanCommit", flg); var projectState = database.ProjectStateHistorys.Where(sh => sh.Project == project).OrderByDescending(s => s.OperateTime).FirstOrDefault(); response.WriteTagWithValue("Suggestion", projectState.Suggestion); //var projectContentForum2 = database.ProjectContentForums.SingleOrDefault(pct => pct.ProjectContentType.Project == project && pct.ProjectContentType.ContentTypeID == 4 && pct.ContentForum.ContentTypeID == 4 && pct.ContentForum.ForumID == 2); //response.WriteTagWithValue("IsLiberal", projectContentForum2 != null ? true : false); //var projectContentForum3 = database.ProjectContentForums.SingleOrDefault(pct => pct.ProjectContentType.Project == project && pct.ProjectContentType.ContentTypeID == 4 && pct.ContentForum.ContentTypeID == 4 && pct.ContentForum.ForumID == 3); //response.WriteTagWithValue("IsInternational", projectContentForum3 != null ? true : false); ////机制建设和队伍建设 //var teamConstruction = database.TeamConstructions.Where(p => p.Project == project).FirstOrDefault(); //if (teamConstruction != null) //{ // var description = teamConstruction.Description; // var performanceExpect = teamConstruction.PerformanceExpect; // var teamConstructionID = teamConstruction.ID; // response.WriteTagWithValue("TeaDescription", description); // response.WriteTagWithValue("TeaPerformanceExpect", performanceExpect); // response.WriteTagWithValue("TeaID", teamConstructionID); //} //var sysConstruction = database.SystemConstructions.Where(p => p.Project == project).FirstOrDefault(); //if (sysConstruction != null) //{ // var description = sysConstruction.Description; // var performanceExpect = sysConstruction.PerformanceExpect; // var sysConstructionid = sysConstruction.ID; // response.WriteTagWithValue("SysDescription", description); // response.WriteTagWithValue("SysPerformanceExpect", performanceExpect); // response.WriteTagWithValue("SysID", sysConstructionid); //} }
/// <summary> /// 显示项目 /// </summary> /// <param name="project"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowProject(this Project project, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", project.ID); response.WriteTagWithValue("ProjectName", project.ProjectName); response.WriteTagWithValue("ProjectObj", project.Object); response.WriteTagWithValue("ProjectAchiv", project.Achievement); response.WriteTagWithValue("ManagerName", project.Manager.Name); response.WriteTagWithValue("ManagerID", project.ManagerID); response.WriteTagWithValue("CollegeName", project.College.Name); response.WriteTagWithValue("CollegeID", project.CollegeID); response.WriteTagWithValue("ContactorID", project.ContactorID); if (project.Contactor != null) { response.WriteTagWithValue("ContactorName", project.Contactor.Name); response.WriteTagWithValue("ContactorPhone", project.Contactor.MobilePhone); } response.WriteTagWithValue("DocPath", project.DocPath); response.WriteTagWithValue("IsCommit", project.IsCommit(project, database)); response.WriteTagWithValue("InConditionCanCommit", project.InConditionCanCommit(project, database)); response.WriteTagWithValue("ProjectState", project.State); response.WriteTagWithValue("ModifyTime", project.ModifyTime); var stateHistory = database.ProjectStateHistorys.Where(c => c.Project == project && (c.State == MemberApplyState.CollegeReject || c.State == MemberApplyState.CollegeAgree || c.State == MemberApplyState.OfficeAgree || c.State == MemberApplyState.OfficeReject)).OrderByDescending(a => a.OperateTime).FirstOrDefault(); if (stateHistory != null) { var st = stateHistory.Suggestion.Trim(); if (!String.IsNullOrEmpty(st)) if (st.Split('&').Count() > 1) { response.WriteTagWithValue("Suggestion1", st.Split('&')[0]); response.WriteTagWithValue("Suggestion2", st.Split('&')[1]); response.WriteTagWithValue("Suggestion3", st.Split('&')[2]); response.WriteTagWithValue("Suggestion4", st.Split('&')[3]); } else response.WriteTagWithValue("Suggestion1", stateHistory.Suggestion); } var projectContentType1 = database.ProjectContentTypes.SingleOrDefault(pct => pct.Project == project && pct.ContentType == database.ContentTypes.GetByID(1)); response.WriteTagWithValue("IsConditionConstruct", projectContentType1 != null ? true : false); var projectContentType2 = database.ProjectContentTypes.SingleOrDefault(pct => pct.Project == project && pct.ContentType == database.ContentTypes.GetByID(2)); response.WriteTagWithValue("IsContentConstruct", projectContentType2 != null ? true : false); var projectContentType3 = database.ProjectContentTypes.SingleOrDefault(pct => pct.Project == project && pct.ContentType == database.ContentTypes.GetByID(3)); response.WriteTagWithValue("IsTeemConstruct", projectContentType3 != null ? true : false); var projectContentType4 = database.ProjectContentTypes.SingleOrDefault(pct => pct.Project == project && pct.ContentType == database.ContentTypes.GetByID(4)); response.WriteTagWithValue("IsCommunateConstruct", projectContentType4 != null ? true : false); response.WriteTagWithValue("IconCls", project.IconCls); response.WriteTagWithValue("IsConstructPlan", project.IsConstructPlan(project, database)); response.WriteTagWithValue("OverAllAccount", project.GetOverAmount(project, database)); var managerSubmit = database.ProjectStateHistorys.Where(p => p.ProjectID == project.ID && p.State == MemberApplyState.WaitingCollegeCensor).OrderBy(q => q.OperateTime).FirstOrDefault(); if (managerSubmit != null) { response.WriteTagWithValue("ManagerApplyTime", managerSubmit.OperateTime); } //机制建设和队伍建设 var teamConstruction = database.TeamConstructions.Where(p => p.Project == project).FirstOrDefault(); if (teamConstruction != null) { var description = teamConstruction.Description; var performanceExpect = teamConstruction.PerformanceExpect; var teamConstructionID = teamConstruction.ID; response.WriteTagWithValue("Description2", description); response.WriteTagWithValue("PerformanceExpect2", performanceExpect); response.WriteTagWithValue("TeamConstructionID",teamConstructionID); } var sysConstruction = database.SystemConstructions.Where(p => p.Project == project).FirstOrDefault(); if (sysConstruction != null) { var description = sysConstruction.Description; var performanceExpect = sysConstruction.PerformanceExpect; var sysConstructionid = sysConstruction.ID; response.WriteTagWithValue("Description", description); response.WriteTagWithValue("PerformanceExpect", performanceExpect); response.WriteTagWithValue("SystemConstructionID",sysConstructionid); } }
private static void showAssetFundApplyItem(this AssetFundApplyItem item, HttpResponse response, User user, IDatabase database) { response.WriteTagWithValue("ID", item.ID); response.WriteTagWithValue("AssetFundApplyID", item.AssetFundApplyID); response.WriteTagWithValue("ContractItemID", item.ContractItemID); response.WriteTagWithValue("ConstructPlanPackageID", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackageID); //response.WriteTagWithValue("BidControlAmount", Convert.ToDouble(item.BidControlAmount) / 1000000); response.WriteTagWithValue("ApplyTotalAmount", Convert.ToDouble(item.ApplyTotalAmount) / 100); response.WriteTagWithValue("BiddingWay", item.ContractItem.BidResultItem.BidResult.BiddingWay); response.WriteTagWithValue("OperatorName", item.AssetFundApply.Operator.Name); response.WriteTagWithValue("OperateTime", item.AssetFundApply.OperateTime); response.WriteTagWithValue("ProductName", item.ContractItem.ProductName); response.WriteTagWithValue("DeviceNumber", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.DeviceNumber); response.WriteTagWithValue("BcQuantity", item.ContractItem.Quantity); response.WriteTagWithValue("CollegeName", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.College.Name); response.WriteTagWithValue("ExpertName", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Member.Name); //response.WriteTagWithValue("BudgetAmount", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.BudgetAmount); response.WriteTagWithValue("BudgetAmount", item.ContractItem.Quantity * item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice); response.WriteTagWithValue("SupplierName", item.ContractItem.Contract.Supplier.Name); response.WriteTagWithValue("ContractItemAmount", Convert.ToDouble(item.ContractItem.ContractItemAmount) / 100); response.WriteTagWithValue("Currency", item.ContractItem.BidResultItem.Currency); response.WriteTagWithValue("ContractNumber", item.ContractItem.Contract.Number); response.WriteTagWithValue("IsBudgeted", database.OfficeBudgetDetailItems.Where(ob => ob.AssetFundApplyItemID == item.ID).Count() > 0 ? bool.TrueString.ToLower() : bool.FalseString.ToLower()); response.WriteTagWithValue("PlatName", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.College.PlatForm.PlatName); response.WriteTagWithValue("DepartmentCode", item.GetDepartmentCode(database, item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.CollegeID.Value)); var assetFundApplyState = database.AssetFundApplys.Where(afa => afa.ID == item.AssetFundApplyID).SingleOrDefault().State.ToString(); if (user.IsStateAssetOffice(database)) response.WriteTagWithValue("AssetFundApplyState", assetFundApplyState == "UnSubmit" ? "未提交" : "已提交"); else response.WriteTagWithValue("AssetFundApplyState", ""); response.WriteTagWithValue("ExchangeRate", item.ContractItem.BidResultItem.ExchangeRate); //response.WriteTagWithValue("TradeAgentFee", item.ContractItem.BidResultItem.TradeAgentFee); response.WriteTagWithValue("TradeAgentFeeRate", item.ContractItem.BidResultItem.TradeAgentFeeRate); response.WriteTagWithValue("USDRate", item.ContractItem.BidResultItem.USDRate); //response.WriteTagWithValue("DeviceValue", item.ContractItem.BidResultItem.DeviceValue); response.WriteTagWithValue("DetailNumber", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructTask.DetailNumber); response.WriteTagWithValue("Account", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructTask.Account); response.WriteTagWithValue("Remark", item.Remark); var alreadyApplyTotalAmount = item.ContractItem.BidResultItem.GetTotalApplyAmount(item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackageID, database); response.WriteTagWithValue("RestOfControllerAmount", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackage.ControllerAmount - alreadyApplyTotalAmount); response.WriteTagWithValue("ShowText", item.AssetFundApply.Operator.Name + " " + string.Format("{0:D}", item.AssetFundApply.OperateTime)); response.WriteTagWithValue("GroupField", item.AssetFundApplyID + "," + item.AssetFundApply.State.ToString()); if (item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackage.OutStandingID != null) { response.WriteTagWithValue("WinGroupField", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Member.Name); } else { response.WriteTagWithValue("WinGroupField", item.ContractItem.BidResultItem.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.College.Name); } /* //添加985经费申请条目 var officeFundItem = database.OfficeBudgetDetailItems.FirstOrDefault(obd => obd.AssetFundApplyItem == item); if (officeFundItem != null) { response.WriteTagWithValue("FundApplyItemID", officeFundItem.ID); response.WriteTagWithValue("Account", officeFundItem.OfficeBudgetDetail.Account); } else response.WriteTagWithValue("FundApplyItemID", ""); response.WriteTagWithValue("Account", ""); * */ //财务处已核定条目 var financeBudgetCheckItem = database.FinanceBudgetCheckItems.FirstOrDefault(fbc => fbc.AssetFundApplyItem == item); if (financeBudgetCheckItem != null) { response.WriteTagWithValue("FinanceBudgetCheckItemID", financeBudgetCheckItem.ID); response.WriteTagWithValue("IsChecked", "已核定"); } else { response.WriteTagWithValue("FinanceBudgetCheckItemID", ""); response.WriteTagWithValue("IsChecked", "未核定"); } }
/// <summary> /// 返回xml列表格式 /// </summary> /// <param name="Item"></param> /// <param name="response"></param> /// <param name="database"></param> public static void ShowBidResultItem(this BidResultItem Item, HttpResponse response, IDatabase database) { response.WriteTagWithValue("ID", Item.ID); response.WriteTagWithValue("BidResultID", Item.BidResultID); response.WriteTagWithValue("BidResultNumber", Item.BidResult.Number); response.WriteTagWithValue("PurchaseOrderItemID", Item.PurchaseOrderItemID); response.WriteTagWithValue("BidTime", Item.BidResult.BidTime); response.WriteTagWithValue("MemberApplyItemID", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ID); response.WriteTagWithValue("DeviceID", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.ID); response.WriteTagWithValue("DeviceName", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.DeviceName); response.WriteTagWithValue("DeviceNumber", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.DeviceNumber); response.WriteTagWithValue("TotalNum", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.Quantity); response.WriteTagWithValue("BcQuantity", Item.BidQuantity); response.WriteTagWithValue("BidQuantity", Item.PurchaseOrderItem.GetBitQuantityByPurchaseOrderItemID(Item.PurchaseOrderItemID, database)); response.WriteTagWithValue("BidAmount", Item.BidAmount); response.WriteTagWithValue("RestOfBidAmount", Item.BidAmount - Item.GetBidTotalAmountByBidResultItemID(Item.ID, database)); var alreadyApplyAmount = Item.PurchaseOrderItem.GetAlreadyApplyTotalAmount(Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackageID, database); response.WriteTagWithValue("IsControllerAmount0", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.ConstructPlanPackage.ControllerAmount - alreadyApplyAmount == 0 ? bool.TrueString.ToLower() : bool.FalseString.ToLower()); response.WriteTagWithValue("Currency", Item.Currency); response.WriteTagWithValue("ExchangeRate", Item.ExchangeRate); response.WriteTagWithValue("ExchangeValue", Item.ExchangeValue); response.WriteTagWithValue("USDRate", Item.USDRate); response.WriteTagWithValue("DeviceValue", Item.DeviceValue); response.WriteTagWithValue("TradeAgentFeeRate", Item.TradeAgentFeeRate); response.WriteTagWithValue("TradeAgentFee", Item.TradeAgentFee); response.WriteTagWithValue("Remark", Item.Remark); response.WriteTagWithValue("Quantity", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.Quantity); response.WriteTagWithValue("BidResultID", Item.BidResultID); response.WriteTagWithValue("PurchaseOrderItemID", Item.PurchaseOrderItemID); response.WriteTagWithValue("MemberID", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.MemberID); response.WriteTagWithValue("ExpertName", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Member.Name); response.WriteTagWithValue("ProjectID", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.ProjectID); response.WriteTagWithValue("ProjectName", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.MemberApply.Project.ProjectName); response.WriteTagWithValue("ApplyDeviceID", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDeviceID); response.WriteTagWithValue("UnitPrice", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice); response.WriteTagWithValue("Amount", Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.ConstructPlanItem.MemberApplyItem.ApplyDevice.UnitPrice * Item.PurchaseOrderItem.PurchasePlanItem.ConstructTaskItem.Quantity); response.WriteTagWithValue("ContractQuantity", Item.GetContractQuantityByBidResultItemID(Item.ID, database)); response.WriteTagWithValue("SupplierID", Item.Supplier == null ? new Nullable<int>() : Item.SupplierID); response.WriteTagWithValue("SupplierName", Item.Supplier == null ? "" : Item.Supplier.Name); response.WriteTagWithValue("Number", Item.BidResult.Number); response.WriteTagWithValue("BiddingWay", Item.BidResult.BiddingWay); response.WriteTagWithValue("DocPath", Item.BidResult.DocPath); response.WriteTagWithValue("ShowText", string.Format("{0:D}", Item.BidResult.BidTime) + " 中标 " + (double)Item.BidResult.BidAllAmount / 1000000 + "万元"); response.WriteTagWithValue("GroupField", Item.BidResultID + "," + Item.BidResult.DocPath); }
/// <summary> /// 显示查询用户 /// </summary> /// <param name="accountingSubject"></param> /// <param name="response"></param> /// <param name="datebase"></param> public static void ShowAsAccountingSubjectSearchRecord(AccountingSubject accountingSubject, HttpResponse response, IDatabase datebase) { response.WriteTagWithValue("ID", accountingSubject.ID); response.WriteTagWithValue("AccountingSubjectName", accountingSubject.BudgetSubjectName); response.WriteTagWithValue("Content", accountingSubject.Content); response.WriteTagWithValue("Remark", accountingSubject.Remark); }