protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //设置只读权限
                if (Request.QueryString["type"] == "read")
                {
                    btn_submit.Visible = false;
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "$(function(){$('input').attr('readonly', 'readonly');$('select').attr('disabled', 'true');$('textarea').attr('readonly', 'readonly');});", true);
                }
                //遍历绑定人员列表
                DT_SheJiRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(100, 1, "u_designlimit like '%设计人%'", "username asc");
                DT_SheJiRen.DataTextField  = "UserName";
                DT_SheJiRen.DataValueField = "UserName";
                DT_SheJiRen.DataBind();
                DT_SheJiRen.Items.Insert(0, new ListItem("选设计人", ""));

                DT_JiaoDuiRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(100, 1, "u_designlimit like '%校对人%'", "username asc");
                DT_JiaoDuiRen.DataTextField  = "UserName";
                DT_JiaoDuiRen.DataValueField = "UserName";
                DT_JiaoDuiRen.DataBind();
                DT_JiaoDuiRen.Items.Insert(0, new ListItem("选校对人", ""));

                DT_ShenHeRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(50, 1, "u_designlimit like '%审核人%'", "username asc");
                DT_ShenHeRen.DataTextField  = "UserName";
                DT_ShenHeRen.DataValueField = "UserName";
                DT_ShenHeRen.DataBind();
                DT_ShenHeRen.Items.Insert(0, new ListItem("选审核人", ""));

                DT_ShenDingRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(50, 1, "u_designlimit like '%审定人%'", "username asc");
                DT_ShenDingRen.DataTextField  = "UserName";
                DT_ShenDingRen.DataValueField = "UserName";
                DT_ShenDingRen.DataBind();
                DT_ShenDingRen.Items.Insert(0, new ListItem("选审定人", ""));
                //WebBLL.Tbl_UserManager.GetUsersByDropDownList(DT_HeZhunRen);

                Bind();
            }
        }
Exemple #2
0
        protected void ClassName1_SelectedIndexChanged(object sender, EventArgs e)
        {
            //卷
            ClassName2.DataSource     = WebBLL.Tbl_ClassManager.GetDataTableByPage(50, 1, "parentid=(select top 1 id from tbl_class where parentid=15 and classname='" + ClassName1.SelectedItem.Text + "')", "");
            ClassName2.DataTextField  = "ClassName";
            ClassName2.DataValueField = "ID";
            ClassName2.DataBind();
            ClassName2.Items.Insert(0, new ListItem("选择卷", ""));

            //该专业的人绑定
            DT_SheJiRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(100, 1, "status='在职' and u_designlimit like '%设计人%' and U_Specialty like '%" + ClassName1.SelectedItem.Text + "%'", "username asc");
            DT_SheJiRen.DataTextField  = "UserName";
            DT_SheJiRen.DataValueField = "UserName";
            DT_SheJiRen.DataBind();
            DT_SheJiRen.Items.Insert(0, new ListItem("选设计人", ""));

            DT_JiaoDuiRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(100, 1, "status='在职' and u_designlimit like '%校对人%' and U_Specialty like '%" + ClassName1.SelectedItem.Text + "%'", "username asc");
            DT_JiaoDuiRen.DataTextField  = "UserName";
            DT_JiaoDuiRen.DataValueField = "UserName";
            DT_JiaoDuiRen.DataBind();
            DT_JiaoDuiRen.Items.Insert(0, new ListItem("选校对人", ""));

            DT_ShenHeRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(50, 1, "status='在职' and u_designlimit like '%审核人%' and U_Specialty like '%" + ClassName1.SelectedItem.Text + "%'", "username asc");
            DT_ShenHeRen.DataTextField  = "UserName";
            DT_ShenHeRen.DataValueField = "UserName";
            DT_ShenHeRen.DataBind();
            DT_ShenHeRen.Items.Insert(0, new ListItem("选审核人", ""));

            DT_ShenDingRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(50, 1, "status='在职' and u_designlimit like '%审定人%' and U_Specialty like '%" + ClassName1.SelectedItem.Text + "%'", "username asc");
            DT_ShenDingRen.DataTextField  = "UserName";
            DT_ShenDingRen.DataValueField = "UserName";
            DT_ShenDingRen.DataBind();
            DT_ShenDingRen.Items.Insert(0, new ListItem("选审定人", ""));
            //任务绑定
            BindList();
        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //删除
                if (Request.QueryString["limit"] == "del")
                {
                    int ids   = Convert.ToInt32(Request.QueryString["id"].ToString());
                    int count = WebCommon.Public.DataTableDel("Tbl_DesignTask", "id in(" + ids + ")");
                    if (count > 0)
                    {
                        //ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('删除成功!');window.external.close()", true);
                        WebCommon.Script.AlertAndGoBack("删除成功!");
                    }
                    else
                    {
                        WebCommon.Script.AlertAndGoBack("删除失败!");
                    }
                }

                //项目ID
                ProjectID.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
                ProjectID.DataTextField  = "ClassName";
                ProjectID.DataValueField = "ClassName";
                ProjectID.DataBind();
                ProjectID.Items.Insert(0, new ListItem("选择项目类别", ""));
                ProjectName.Items.Insert(0, new ListItem("选择项目", ""));
                //专业
                ClassName1.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(15);
                ClassName1.DataTextField  = "ClassName";
                ClassName1.DataValueField = "ID";
                ClassName1.DataBind();
                ClassName1.Items.Insert(0, new ListItem("选择专业", ""));

                //遍历绑定人员列表
                WebBLL.Tbl_UserManager.GetUsersByDropDownList(DesignManager);
                DesignManager.Items.Insert(0, new ListItem("选择设总", ""));
                //遍历绑定人员列表
                WebBLL.Tbl_UserManager.GetUsersByDropDownList(DesignMain);
                DesignMain.Items.Insert(0, new ListItem("选择主设", ""));

                DT_SheJiRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(100, 1, "status='在职' and u_designlimit like '%设计人%'", "username asc");
                DT_SheJiRen.DataTextField  = "UserName";
                DT_SheJiRen.DataValueField = "UserName";
                DT_SheJiRen.DataBind();
                DT_SheJiRen.Items.Insert(0, new ListItem("选设计人", ""));

                DT_JiaoDuiRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(100, 1, "status='在职' and u_designlimit like '%校对人%'", "username asc");
                DT_JiaoDuiRen.DataTextField  = "UserName";
                DT_JiaoDuiRen.DataValueField = "UserName";
                DT_JiaoDuiRen.DataBind();
                DT_JiaoDuiRen.Items.Insert(0, new ListItem("选校对人", ""));

                DT_ShenHeRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(50, 1, "status='在职' and u_designlimit like '%审核人%'", "username asc");
                DT_ShenHeRen.DataTextField  = "UserName";
                DT_ShenHeRen.DataValueField = "UserName";
                DT_ShenHeRen.DataBind();
                DT_ShenHeRen.Items.Insert(0, new ListItem("选审核人", ""));

                DT_ShenDingRen.DataSource     = WebBLL.Tbl_UserManager.GetDataTableByPage(50, 1, "status='在职' and u_designlimit like '%审定人%'", "username asc");
                DT_ShenDingRen.DataTextField  = "UserName";
                DT_ShenDingRen.DataValueField = "UserName";
                DT_ShenDingRen.DataBind();
                DT_ShenDingRen.Items.Insert(0, new ListItem("选审定人", ""));

                //卷册
                ClassName1.Items.Insert(0, new ListItem("选择专业", ""));
                ClassName2.Items.Insert(0, new ListItem("选择卷", ""));
                ClassName3.Items.Insert(0, new ListItem("选择册", ""));

                //如果是通过任务明细连接过来
                int projectid = WebCommon.Public.ToInt(Request.QueryString["ProjectID"]);
                if (projectid > 0)
                {
                    ProjectName.SelectedValue = projectid.ToString();
                    WebModels.Tbl_Project project = WebBLL.Tbl_ProjectManager.GetTbl_ProjectById(Convert.ToInt32(Request.QueryString["ProjectID"]));
                    ProjectName.Items.Insert(0, new ListItem(project.ProjectName, Request.QueryString["ProjectID"]));
                    ProjectID.SelectedValue = project.ProjectTypes;
                    ProjectNo.Value         = project.ProjectNo;
                    ProjectName.Enabled     = false;
                    ProjectID.Enabled       = false;
                    ProjectNo.Attributes.Add("readonly", "readonly");

                    //设总默认
                    DesignManager.Items.Insert(0, new ListItem(project.ProjectMainDesigner, project.ProjectMainDesigner));
                    DesignManager.Enabled = false;

                    //主设默认
                    DesignMain.Items.Insert(0, new ListItem(WebCommon.Public.GetUserName(), WebCommon.Public.GetUserName()));
                    DesignMain.Enabled = false;

                    //专业默认
                    //string classname = WebBLL.Tbl_UserManager.GetTbl_UserByUserName(WebCommon.Public.GetUserName()).U_Specialty;
                    //if (WebCommon.Public.ToString(Request.QueryString["ClassName"]) != "") classname = Request.QueryString["ClassName"];
                    //ClassName1.DataSource = null;
                    ClassName1.DataSource     = WebBLL.Tbl_ProjectDesignerManager.GetDataTableByPage(10, 1, "UserName='******' and projectid=" + project.ID.ToString(), "");
                    ClassName1.DataTextField  = "ClassName";
                    ClassName1.DataValueField = "ClassName";
                    ClassName1.DataBind();
                    ClassName1.Items.Insert(0, new ListItem("选择专业", ""));

                    //卷默认
                    //ClassName2.DataSource = WebBLL.Tbl_ClassManager.GetDataTableByPage(50, 1, "parentid=(select top 1 id from tbl_class where parentid=15 and classname='" + classname + "')", "id asc");
                    //ClassName2.DataTextField = "ClassName";
                    //ClassName2.DataValueField = "ID";
                    //ClassName2.DataBind();
                    //ClassName2.Items.Insert(0, new ListItem("选择卷", ""));

                    //绑定当前任务
                    BindList();
                }
            }
        }