Пример #1
0
        private string createList(string ContractTypeName)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder("");

            sb.Append("<table class=\"table table-border table-bordered table-hover table-bg table-sort\" id=\"tablelist\">");
            sb.Append("<thead>");
            sb.Append("<tr class=\"text-c\">");
            sb.Append("<th width=\"5%\">序号</th>");
            sb.Append("<th width='35%'>合同类型编号</th>");
            sb.Append("<th width='60%'>合同类型名称</th>");
            sb.Append("</tr>");
            sb.Append("</thead>");

            int r = 1;

            sb.Append("<tbody>");
            Business.Base.BusinessContractType bc = new project.Business.Base.BusinessContractType();
            foreach (Entity.Base.EntityContractType it in bc.GetListQuery(string.Empty, ContractTypeName))
            {
                sb.Append("<tr class=\"text-c\" id=\"" + it.ContractTypeNo + "\">");
                sb.Append("<td style=\"text-align:center;\">" + r.ToString() + "</td>");
                sb.Append("<td style=\"text-align:left;\">" + it.ContractTypeNo + "</td>");
                sb.Append("<td style=\"text-align:left;\">" + it.ContractTypeName + "</td>");
                sb.Append("</tr>");
                r++;
            }
            sb.Append("</tbody>");
            sb.Append("</table>");

            return(sb.ToString());
        }
Пример #2
0
        protected override void Page_Load(object sender, EventArgs e)
        {
            try
            {
                HttpCookie hc = getCookie("1");
                if (hc != null)
                {
                    string str = hc.Value.Replace("%3D", "=");
                    userid = Encrypt.DecryptDES(str, "1");
                    user.load(userid);
                    userName = user.Entity.UserName;
                    CheckRight(user.Entity, "pm/Op/ContractRefund_PT.aspx");

                    if (!Page.IsCallback)
                    {
                        if (user.Entity.UserType.ToUpper() != "ADMIN")
                        {
                            string sqlstr = "select a.RightCode from Sys_UserRight a left join sys_menu b on a.MenuId=b.MenuID " +
                                            "where a.UserType='" + user.Entity.UserType + "' and menupath='pm/Op/ContractRefund_PT.aspx'";
                            DataTable dt = obj.PopulateDataSet(sqlstr).Tables[0];
                            if (dt.Rows.Count > 0)
                            {
                                string rightCode = dt.Rows[0]["RightCode"].ToString();
                                if (rightCode.IndexOf("view") >= 0)
                                {
                                    Buttons += "<a href=\"javascript:;\" onclick=\"view()\" class=\"btn btn-secondary radius\"><i class=\"Hui-iconfont\">&#xe627;</i> 查看</a>&nbsp;&nbsp;";
                                }
                                if (rightCode.IndexOf("view") >= 0)
                                {
                                    Buttons += "<a href=\"javascript:;\" onclick=\"viewfee()\" class=\"btn btn-secondary radius\"><i class=\"Hui-iconfont\">&#xe627;</i> 查看费用明细</a>&nbsp;&nbsp;&nbsp;&nbsp;";
                                }
                                if (rightCode.IndexOf("applyrefund") >= 0)
                                {
                                    Buttons += "<a href=\"javascript:;\" onclick=\"applyrefund()\" class=\"btn btn-warning radius\"><i class=\"Hui-iconfont\">&#xe6e0;</i> 预约退租</a>&nbsp;&nbsp;";
                                }
                                if (rightCode.IndexOf("cancelrefund") >= 0)
                                {
                                    Buttons += "<a href=\"javascript:;\" onclick=\"cancelrefund()\" class=\"btn btn-secondary radius\"><i class=\"Hui-iconfont\">&#xe66b;</i> 取消预约退租</a>&nbsp;&nbsp;";
                                }
                                if (rightCode.IndexOf("refund") >= 0)
                                {
                                    Buttons += "<a href=\"javascript:;\" onclick=\"refund()\" class=\"btn btn-danger radius\"><i class=\"Hui-iconfont\">&#xe631;</i> 确认退租</a>&nbsp;&nbsp;";
                                }
                            }
                        }
                        else
                        {
                            Buttons += "<a href=\"javascript:;\" onclick=\"view()\" class=\"btn btn-secondary radius\"><i class=\"Hui-iconfont\">&#xe627;</i> 查看</a>&nbsp;&nbsp;";
                            Buttons += "<a href=\"javascript:;\" onclick=\"viewfee()\" class=\"btn btn-secondary radius\"><i class=\"Hui-iconfont\">&#xe627;</i> 查看费用明细</a>&nbsp;&nbsp;&nbsp;&nbsp;";
                            Buttons += "<a href=\"javascript:;\" onclick=\"applyrefund()\" class=\"btn btn-warning radius\"><i class=\"Hui-iconfont\">&#xe6e0;</i> 预约退租</a>&nbsp;&nbsp;";
                            Buttons += "<a href=\"javascript:;\" onclick=\"cancelrefund()\" class=\"btn btn-secondary radius\"><i class=\"Hui-iconfont\">&#xe66b;</i> 取消预约退租</a>&nbsp;&nbsp;";
                            Buttons += "<a href=\"javascript:;\" onclick=\"refund()\" class=\"btn btn-danger radius\"><i class=\"Hui-iconfont\">&#xe631;</i> 确认退租</a>&nbsp;&nbsp;";
                        }

                        list = createList(string.Empty, string.Empty, "04", string.Empty, string.Empty, string.Empty,
                                          string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, 1);

                        date = GetDate().ToString("yyyy-MM-dd");

                        ContractTypeStr   = "<select class=\"input-text required\" id=\"ContractType\">";
                        ContractTypeStr  += "<option value=\"\"></option>";
                        ContractTypeStrS  = "<select class=\"input-text size-MINI\" id=\"ContractTypeS\" style=\"width:120px;\" >";
                        ContractTypeStrS += "<option value=\"\" selected>全部</option>";
                        Business.Base.BusinessContractType bc = new project.Business.Base.BusinessContractType();
                        foreach (Entity.Base.EntityContractType it in bc.GetListQuery(string.Empty, string.Empty))
                        {
                            ContractTypeStr  += "<option value='" + it.ContractTypeNo + "'>" + it.ContractTypeName + "</option>";
                            ContractTypeStrS += "<option value='" + it.ContractTypeNo + "'>" + it.ContractTypeName + "</option>";
                        }
                        ContractTypeStr  += "</select>";
                        ContractTypeStrS += "</select>";

                        ContractSPNoStr   = "<select class=\"input-text required\" id=\"ContractSPNo\">";
                        ContractSPNoStr  += "<option value=\"\"></option>";
                        ContractSPNoStrS  = "<select class=\"input-text size-MINI\" id=\"ContractSPNoS\" style=\"width:120px;\" >";
                        ContractSPNoStrS += "<option value=\"\" selected>全部</option>";
                        Business.Base.BusinessServiceProvider bc1 = new project.Business.Base.BusinessServiceProvider();
                        foreach (Entity.Base.EntityServiceProvider it in bc1.GetListQuery(string.Empty, string.Empty, true))
                        {
                            ContractSPNoStr  += "<option value='" + it.SPNo + "'>" + it.SPShortName + "</option>";
                            ContractSPNoStrS += "<option value='" + it.SPNo + "'>" + it.SPShortName + "</option>";
                        }
                        ContractSPNoStr  += "</select>";
                        ContractSPNoStrS += "</select>";


                        //管理费 空调费 水费 电费 超额电费
                        Business.Base.BusinessSetting setting = new Business.Base.BusinessSetting();
                        setting.load("PropertyFee");
                        Business.Base.BusinessSetting setting1 = new Business.Base.BusinessSetting();
                        setting1.load("AirConditionFee");
                        Business.Base.BusinessSetting setting2 = new Business.Base.BusinessSetting();
                        setting2.load("WaterFee");
                        Business.Base.BusinessSetting setting3 = new Business.Base.BusinessSetting();
                        setting3.load("ElectricFee");

                        SRVNo4Str  = "<select class=\"input-text size-MINI\" id=\"SRVNo4\">";
                        SRVNo4Str += "<option value='" + setting.Entity.SRVNo + "'>" + setting.Entity.SRVName + "</option>";
                        SRVNo4Str += "<option value='" + setting1.Entity.SRVNo + "'>" + setting1.Entity.SRVName + "</option>";
                        SRVNo4Str += "<option value='" + setting2.Entity.SRVNo + "'>" + setting2.Entity.SRVName + "</option>";
                        SRVNo4Str += "<option value='" + setting3.Entity.SRVNo + "'>" + setting3.Entity.SRVName + "</option>";
                        SRVNo4Str += "</select>";
                    }
                }
                else
                {
                    Response.Write(errorpage);
                    return;
                }
            }
            catch
            {
                Response.Write(errorpage);
                return;
            }
        }