コード例 #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("选择类型", ""));;

                //专业
                ClassName.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(15);
                ClassName.DataTextField  = "ClassName";
                ClassName.DataValueField = "ClassName";
                ClassName.DataBind();
                ClassName.Items.Insert(0, new ListItem("选择专业", ""));

                DesignTaskID.Items.Insert(0, new ListItem("选择任务", ""));

                //如果是通过卷册任务执行点过来的话
                int taskid = WebCommon.Public.ToInt(Request.QueryString["taskid"]);
                if (taskid > 0)
                {
                    WebModels.Tbl_DesignTask task = WebBLL.Tbl_DesignTaskManager.GetTbl_DesignTaskById(taskid);
                    ProjectID.Items.Insert(0, new ListItem(task.ProjectName, task.ProjectID.ToString()));
                    ClassName.SelectedValue = task.ClassName1;
                    DesignTaskID.Items.Insert(0, new ListItem(task.DT_SheJiRen, task.ID.ToString()));
                }
                else
                {
                    ProjectID.Items.Insert(0, new ListItem("选择项目", ""));
                }
            }
        }
コード例 #2
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("选择册", ""));
            }
        }
コード例 #3
0
        private void loadDdl()
        {
            objBLL = new MetisBLL();
            DataTable dt = new DataTable();

            dt = objBLL.getProjectType();
            ProjectType.DataSource     = dt;
            ProjectType.DataTextField  = dt.Columns[1].ToString();
            ProjectType.DataValueField = dt.Columns[0].ToString();
            ProjectType.DataBind();
        }
コード例 #4
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("选择项目", ""));
         ContractID.Items.Insert(0, new ListItem("选择合同", ""));
     }
 }
コード例 #5
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("选择项目名称", ""));
         FlowWorkID.Items.Insert(0, new ListItem("选择工作流程", ""));
     }
 }
コード例 #6
0
        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;
                //}
            }
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //判断当前人是不是设计师权限
                if (!WebBLL.Tbl_UserManager.GetTbl_UserByUserName(WebCommon.Public.GetUserName()).U_DesignLimit.Contains("设计人"))
                {
                    ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('您不是设计人没有提资权限!');window.external.close();", true);
                    btn_submit.Visible = false;
                }

                //项目类型
                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("选择项目", ""));
                //专业
                ClassName.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(15);
                ClassName.DataTextField  = "ClassName";
                ClassName.DataValueField = "ClassName";
                ClassName.DataBind();
                ClassName.Items.Insert(0, new ListItem("选择专业", ""));
                lishitizi.Visible = false;

                string cfromStr = WebBLL.Tbl_UserManager.GetTbl_UserByUserName(WebCommon.Public.GetUserName()).U_Specialty;
                foreach (string str in cfromStr.Split(','))
                {
                    if (str != "")
                    {
                        ClassNameFrom.Items.Insert(0, str);
                    }
                }
                ClassNameFrom.SelectedIndex = 0;
            }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //流程分类
                FlowID.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByParentID(67);
                FlowID.DataTextField  = "ClassName";
                FlowID.DataValueField = "ClassName";
                FlowID.DataBind();
                FlowID.Items.Insert(0, new ListItem("流程类型", ""));
                FlowName.Items.Insert(0, new ListItem("选择流程", ""));

                //绑定项目
                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("选择项目", ""));

                //获取表单常用短语
                string FromWords = "";
                foreach (WebModels.Tbl_FlowFormWord formword in WebBLL.Tbl_FlowFormWordManager.GetTbl_FlowFormWordAll())
                {
                    FromWords += "<div onclick=InputText($(this).text()) style=margin:5px>" + formword.IFW_Name + "</div>";
                }
                //向表单注册验证程序
                string LocalPwd    = WebBLL.Tbl_UserManager.GetTbl_UserByUserName(WebCommon.Public.GetUserName()).UserPwd;
                string LimitScript = "" +
                                     "$('.formctrl[disabled]').removeAttr('disabled');" +
                                     "$('.formctrl[data-node!=1]').attr('disabled','disabled');" +
                                     "$('.formctrl[type=textarea]').dblclick(function(){$(this).attr('lock','1');$$.MsgBox('常用短语', '" + FromWords + "', '关闭窗口');});" +
                                     "$('.formctrl[value=电子签名]').click(function(){$$.MsgBox('密码验证', '<input type=password id=password>', '确定:InsertSign()', '取消');});" +
                                     "function InsertSign(){" +
                                     "if($.md5($('#password').val())=='" + LocalPwd + "'){$('.formctrl[value=电子签名]').hide();$$.MsgBox(0);" +
                                     "$('.formctrl[value=电子签名]').after('<img src=" + WebBLL.Tbl_UserManager.GetTbl_UserByUserName(WebCommon.Public.GetUserName()).U_Sign + ">');" +
                                     "}else{alert('密码不正确');}}" +
                                     "function InputText(info){" +
                                     "$('.formctrl[lock=1]').val(info);$(this).removeAttr('lock');$$.MsgBox(0);}";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "message", LimitScript, true);

                //如果是项目流程发起的表单
                int flowid    = WebCommon.Public.ToInt(Request.QueryString["FlowID"]);
                int projectid = WebCommon.Public.ToInt(Request.QueryString["ProjectID"]);
                if (flowid > 0 && projectid > 0)
                {
                    string flowname    = WebBLL.Tbl_FlowManager.GetTbl_FlowById(flowid).FlowName;
                    string projectname = WebBLL.Tbl_ProjectManager.GetTbl_ProjectById(projectid).ProjectName;
                    FlowName.Items.Insert(0, new ListItem(flowname, flowid.ToString()));
                    ProjectID.Items.Insert(0, new ListItem(projectname, projectid.ToString()));
                    WorkName.Value        = projectname + " " + flowname;
                    FormContent.InnerHtml = WebBLL.Tbl_FlowManager.GetTbl_FlowById(flowid).FormContent;

                    FlowID.Enabled      = false;
                    FlowName.Enabled    = false;
                    ProjectType.Enabled = false;
                    ProjectID.Enabled   = false;
                }
            }
            hid.Value = ProjectID.SelectedItem.Text;
        }