Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //项目类别
                ProjectType.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
                ProjectType.DataTextField  = "ClassName";
                ProjectType.DataValueField = "ClassName";
                ProjectType.DataBind();
                ProjectType.Items.Insert(0, new ListItem("选择项目类别", ""));
                ProjectID.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("选择专业", ""));
                lishitizi.Visible = false;
                //卷册
                ClassName2.Items.Insert(0, new ListItem("选择卷", ""));
                //卷册
                //ClassName3.DataSource = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(60);
                //ClassName3.DataTextField = "ClassName";
                //ClassName3.DataValueField = "ClassName";
                //ClassName3.DataBind();
                //ClassName3.Items.Insert(0, new ListItem("选择册", ""));
            }
        }
 protected void ProjectID_SelectedIndexChanged(object sender, EventArgs e)
 {
     ClassName1.DataSource     = WebBLL.Tbl_ClassManager.GetDataTableByPage(20, 1, "parentid=15 and classname in(select classname from tbl_projectdesigner where projectid=" + ProjectID.SelectedValue + ")", "");
     ClassName1.DataTextField  = "ClassName";
     ClassName1.DataValueField = "ID";
     ClassName1.DataBind();
     ClassName1.Items.Insert(0, new ListItem("选择专业", ""));
 }
 //如果选择了公共档案
 protected void PA_Type1_SelectedIndexChanged(object sender, EventArgs e)
 {
     ClassName1.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(227);
     ClassName1.DataTextField  = "ClassName";
     ClassName1.DataValueField = "ID";
     ClassName1.DataBind();
     ClassName1.Items.Insert(0, new ListItem("一级分类", ""));
     ClassName2.Items[0].Text = "二级分类";
     ClassName3.Items[0].Text = "三级分类";
 }
Exemplo n.º 4
0
 protected void ClassName_SelectedIndexChanged(object sender, EventArgs e)
 {
     //选择卷
     ClassName1.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(Convert.ToInt32(this.ClassName.SelectedValue));
     ClassName1.DataTextField  = "ClassName";
     ClassName1.DataValueField = "ID";
     ClassName1.DataBind();
     ClassName1.Items.Insert(0, new ListItem("选择卷", ""));
     if (ProjectName.SelectedValue != "")
     {
         BindList();
     }
 }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //绑定专业
                ClassName1.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(15);
                ClassName1.DataTextField  = "ClassName";
                ClassName1.DataValueField = "ClassName";
                ClassName1.DataBind();
                ClassName1.Items.Insert(0, new ListItem("全部专业", ""));

                //绑定列表
                Bind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Title = Request.QueryString["limit"];
                if (Title == "借阅申请")
                {
                    this.RequestType.SelectedValue = "借阅申请";
                }
                else
                {
                    this.RequestType.SelectedValue = "出版申请";
                }
                //项目类别
                ProjectType.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
                ProjectType.DataTextField  = "ClassName";
                ProjectType.DataValueField = "ClassName";
                ProjectType.DataBind();
                ProjectType.Items.Insert(0, new ListItem("选择项目类别", ""));
                ProjectID.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("选择专业", ""));
                //卷册
                ClassName2.Items.Insert(0, new ListItem("选择卷", ""));
                ClassName3.Items.Insert(0, new ListItem("选择册", ""));
                PA_Name.Items.Insert(0, new ListItem("选择档案", ""));

                //如果通过借阅查询列表点过来的借阅
                //int ID = Convert.ToInt32(Request.QueryString["aid"]);
                //if (ID > 0)
                //{
                //    WebModels.Tbl_ProjectArchiveRequest project = WebBLL.Tbl_ProjectArchiveRequestManager.GetTbl_ProjectArchiveRequestById(ID);
                //    this.ProjectID.SelectedValue = project.ProjectID.ToString();
                //    this.PA_Name.SelectedValue = project.ProjectArchiveID.ToString();
                //    this.Remark.InnerText = project.Remark;
                //    this.RequestType.SelectedValue = project.RequestType;
                //    this.Status.SelectedValue = project.Status;
                //    PA_Type2.SelectedValue = project.PA_Type2;
                //}
            }
        }
Exemplo n.º 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //专业
         ClassName1.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(15);
         ClassName1.DataTextField  = "ClassName";
         ClassName1.DataValueField = "ID";
         ClassName1.DataBind();
         //ClassName1.Items.Insert(0, new ListItem("选择专业", ""));
         //ClassName2.Items.Insert(0, new ListItem("选择卷册", ""));
         //删除
         if (Request.QueryString["limit"] == "del")
         {
             int ids   = Convert.ToInt32(Request.QueryString["id"].ToString());
             int count = WebCommon.Public.DataTableDel("Tbl_DesignVolume", "id in(" + ids + ")");
             if (count > 0)
             {
                 ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('删除成功!');", true);
             }
             else
             {
                 WebCommon.Script.AlertAndGoBack("删除失败!");
             }
         }
         if (WebCommon.Public.ToString(Request.QueryString["ClassName1"]) != "")
         {
             ClassName1.Items.Insert(0, new ListItem(Request.QueryString["ClassName1"], Request.QueryString["ClassName1"]));
             ClassName2.Items.Insert(0, new ListItem(Request.QueryString["ClassName2"], Request.QueryString["ClassName2"]));
             BindList();
         }
         else
         {
             ClassName1.Items.Insert(0, new ListItem("选择专业", ""));
             ClassName2.Items.Insert(0, new ListItem("选择卷册", ""));
         }
     }
 }
Exemplo n.º 8
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();
                }
            }
        }