当前位置: 首页>>代码示例>>C#>>正文


C# HttpResponse.WriteTagEnd方法代码示例

本文整理汇总了C#中System.Web.HttpResponse.WriteTagEnd方法的典型用法代码示例。如果您正苦于以下问题:C# HttpResponse.WriteTagEnd方法的具体用法?C# HttpResponse.WriteTagEnd怎么用?C# HttpResponse.WriteTagEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.HttpResponse的用法示例。


在下文中一共展示了HttpResponse.WriteTagEnd方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Show

        /// <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");
        }
开发者ID:rbmyself,项目名称:ipmsnew,代码行数:18,代码来源:UserLoginLogExtension.cs

示例2: Show

        /// <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");
        }
开发者ID:rbmyself,项目名称:ipmsnew,代码行数:23,代码来源:MessageExtension.cs

示例3: Show

        /// <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");
        }
开发者ID:rbmyself,项目名称:ipmsnew,代码行数:16,代码来源:LoginResultExtension.cs

示例4: ShowAdjustItem

        /// <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", "未调整");

            }
        }
开发者ID:rbmyself,项目名称:ipmsnew,代码行数:47,代码来源:ConstructTaskItemExtension.cs

示例5: ShowItemToAdjust

        /// <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");
        }
开发者ID:rbmyself,项目名称:ipmsnew,代码行数:87,代码来源:ConstructTaskItemExtension.cs

示例6: Show

 /// <summary>
 /// 显示项目列表
 /// </summary>
 /// <param name="list"></param>
 /// <param name="response"></param>
 /// <param name="user"></param>
 /// <param name="database"></param>
 public static void Show(this IList<Project> list, HttpResponse response, User user, IDatabase database)
 {
     response.WriteTagBegin("List");
     foreach (var project in list)
         //project.Show<Project>(project, response, database);
         response.WriteTagEnd("List");
 }
开发者ID:rbmyself,项目名称:ipmsnew,代码行数:14,代码来源:ProjectExtension.cs

示例7: Show

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

            response.WriteTagEnd("Record");
            response.WriteTagEnd("List");
        }
开发者ID:rbmyself,项目名称:ipmsnew,代码行数:17,代码来源:ApplyDeviceExtension.cs


注:本文中的System.Web.HttpResponse.WriteTagEnd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。