• .NET ------ 界面显示优化(新增,查询窗口)


    1、对作判定的选项加上标识

    院校名称(<span style="color:red">*</span>)

     2、对一些重要的加上判断

     判断是否为空

    if (this.ddlDeptCode.SelectedValue == string.Empty)
            {
                WebMessageBox1.MessageBox_tishi(700, 300, 200, 300, "请正确院校名称"); return;
            }
    if (this.tbZhuanYeName.Text.Trim() == string.Empty) { WebMessageBox1.MessageBox_tishi(700, 300, 200, 300, "请输入专业名称!"); return; } bzhuanye.ZhuanYeName = this.tbZhuanYeName.Text.Trim();//专业名称

    3、将下拉框中值在前端控制

            <td  align="right">&nbsp;题型:
           <asp:DropDownList ID="ddlsqlModel" runat="server" style="121px"> <asp:ListItem Text="" Value=""></asp:ListItem> <asp:ListItem Text="单选" Value="单选"></asp:ListItem> <asp:ListItem Text="多选" Value="多选"></asp:ListItem></asp:DropDownList> </td>

    查询条件

            if (this.ddlsqlModel.SelectedValue.Trim() != string.Empty)//题型
            {
                strSql += " and TestMode =  '"+ this.ddlsqlModel.SelectedValue.Trim() + "'";
            }

    4、根据当前登陆的用户,取其所在部门,点击新增时,自动赋值

     {//所属单位
                List<ITEM.Model.qdCnt4.FourAdminDept> mList = _bllDept.get_Ex_List_FourAdminDept_DeptCode_Down("DeptName,DeptCode", base.EnterpriseGuid, _XUserLogin.UserLoginOrganizationCode, true); ;
                _bllDept.Set_Ex_Tree_Name_Code_ddlLoad(this.ddlDeptCode, mList); ;
                this.ddlDeptCode.Items.Insert(0, new ListItem());
                try
                {
                    this.ddlDeptCode.SelectedValue = _XUserLogin.UserLoginOrganizationCode;
                }
                catch
                {
    
                }

    5、查询对齐,如下有的下拉框内容过多,借助图片链接一个弹窗进行选择,导致同一列的没有对齐

    使用与其相同大小空白图片填充。

           <td  style="white-space: nowrap" align="right">&nbsp;登录账户:<asp:DropDownList ID="ddlsqlTeacher_loginGuid" runat="server" width="121px"></asp:DropDownList>               
                <a id="linkTeacher_loginGuid" href="javascript:return false;" onclick="javascript:WebDialogLoad('选择', 700, 500, '../../qdAdmin/qdmanage/admin_order_win.aspx?pwidth=670&pheight=370&c1=<%=ddlsqlTeacher_loginGuid.ClientID %>&dept=<%=_XUserLogin.UserLoginOrganizationCode %>')" ><img src="../../qdadmin/qdimages/where.png" align="top"></a>
            </td>
    
           <td  style="white-space: nowrap" align="right">&nbsp;性别:
              <%--  <asp:TextBox ID="tbsqlTeacherSex" runat="server" style="121px"></asp:TextBox>--%>
                 <asp:DropDownList ID="ddlTeacherSex" runat="server" Width="121px">
                                                                    <asp:ListItem Text="" Value=""></asp:ListItem>
                                                                    <asp:ListItem Text="" Value=""></asp:ListItem>
                                                                    <asp:ListItem Text="" Value=""></asp:ListItem>
                </asp:DropDownList><img src="../../qdadmin/qdimages/wherenot.png" align="top"></td>

    <img src="../../qdadmin/qdimages/wherenot.png" align="top">

    调整后如图:

     6、初始化 guid

     strsql = " and  SaleGuid = '" + Guid.Empty.ToString() + "'";
  • 相关阅读:
    6月15日学习日志
    6月14日学习日志
    6月13日学习日志
    6月12日学习日志
    给建民哥的意见
    6月10日学习日志
    6月9日学习日志
    6月8日学习日志
    梦断代码读书笔记3
    第二次冲刺(六)
  • 原文地址:https://www.cnblogs.com/obge/p/13527980.html
Copyright © 2020-2023  润新知