protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //专业类别
         ProjectTypes.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
         ProjectTypes.DataTextField  = "ClassName";
         ProjectTypes.DataValueField = "ClassName";
         ProjectTypes.DataBind();
         ProjectTypes.Items.Insert(0, new ListItem("选择类型", ""));
         //级别
         ProjectLevel.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(58);
         ProjectLevel.DataTextField  = "ClassName";
         ProjectLevel.DataValueField = "ClassName";
         ProjectLevel.DataBind();
         ProjectLevel.Items.Insert(0, new ListItem("选择级别", ""));
         //部门
         Depart.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(52);
         Depart.DataTextField  = "ClassName";
         Depart.DataValueField = "ClassName";
         Depart.DataBind();
         Depart.Items.Insert(0, new ListItem("选择部门", ""));
         ProjectManager.Items.Insert(0, new ListItem("选择负责人", ""));
     }
 }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //项目类别
                ProjectTypes.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
                ProjectTypes.DataTextField  = "ClassName";
                ProjectTypes.DataValueField = "ClassName";
                ProjectTypes.DataBind();
                ProjectTypes.Items.Insert(0, new ListItem("选择项目类别", ""));
                //级别
                ProjectLevel.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(58);
                ProjectLevel.DataTextField  = "ClassName";
                ProjectLevel.DataValueField = "ClassName";
                ProjectLevel.DataBind();
                ProjectLevel.Items.Insert(0, new ListItem("选择项目级别", ""));

                //删除
                if (Request.QueryString["limit"] == "del")
                {
                    string ids   = Request.QueryString["id"].ToString();
                    int    count = WebCommon.Public.DataTableDel("tbl_Project", "id in(" + ids + ")");
                    if (count > 0)
                    {
                        WebCommon.Script.Redirect(WebCommon.Public.GetFromUrl());
                    }
                    else
                    {
                        WebCommon.Script.AlertAndGoBack("删除失败!");
                    }
                }
                //绑定列表
                Bind();
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //项目类别
                ProjectTypes.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
                ProjectTypes.DataTextField  = "ClassName";
                ProjectTypes.DataValueField = "ClassName";
                ProjectTypes.DataBind();

                //从项目流程打开该页面时
                int projectid = WebCommon.Public.ToInt(Request.QueryString["ProjectID"]);
                if (projectid > 0)
                {
                    WebModels.Tbl_Project project = WebBLL.Tbl_ProjectManager.GetTbl_ProjectById(projectid);
                    ProjectTypes.Items.Insert(0, new ListItem(project.ProjectTypes, project.ProjectTypes));
                    ProjectID.Items.Insert(0, new ListItem(project.ProjectName, projectid.ToString()));
                    ProjectNo.Value = WebBLL.Tbl_ProjectManager.GetProjectNo(project.ProjectTypes);
                }
                else
                {
                    ProjectTypes.Items.Insert(0, new ListItem("选择类别", ""));
                    ProjectID.Items.Insert(0, new ListItem("选择项目", ""));
                }
            }
        }
        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);
                }

                //专业类别
                ProjectTypes.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
                ProjectTypes.DataTextField  = "ClassName";
                ProjectTypes.DataValueField = "ClassName";
                ProjectTypes.DataBind();
                //级别
                ProjectLevel.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(58);
                ProjectLevel.DataTextField  = "ClassName";
                ProjectLevel.DataValueField = "ClassName";
                ProjectLevel.DataBind();
                //部门
                Depart.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(52);
                Depart.DataTextField  = "ClassName";
                Depart.DataValueField = "ClassName";
                Depart.DataBind();
                Depart.Items.Insert(0, new ListItem("选择部门", ""));

                Bind();
            }
        }
Exemple #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //项目类别
                ProjectTypes.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
                ProjectTypes.DataTextField  = "ClassName";
                ProjectTypes.DataValueField = "ClassName";
                ProjectTypes.DataBind();

                ProjectTypes.Items.Insert(0, new ListItem("选择类别", "0"));
                ProjectID.Items.Insert(0, new ListItem("选择项目", "0"));
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //专业类别
         ProjectTypes.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(56);
         ProjectTypes.DataTextField  = "ClassName";
         ProjectTypes.DataValueField = "ClassName";
         ProjectTypes.DataBind();
         ProjectTypes.Items.Insert(0, new ListItem("选择类型", ""));
         ProjectID.Items.Insert(0, new ListItem("选择项目", ""));
         PBL_Time.Text = DateTime.Now.ToString("yyy-MM-dd");
     }
 }