Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.UserCode = Convert.ToString(this.Session["yhdm"]);
         DataTable dataTable = DocumentAction.QueryCorpCode(this.UserCode);
         if (dataTable.Rows.Count > 0)
         {
             this.CorpCode = dataTable.Rows[0]["CorpCode"].ToString();
         }
         else
         {
             this.CorpCode = "";
         }
         this.btnAdd.Attributes["onclick"] = string.Concat(new string[]
         {
             "openClassEdit(1,'",
             this.CorpCode,
             "','",
             this.UserCode,
             "')"
         });
         this.btnEdit.Attributes["onclick"] = string.Concat(new string[]
         {
             "openClassEdit(2,'",
             this.CorpCode,
             "','",
             this.UserCode,
             "')"
         });
         this.btnView.Attributes["onclick"] = string.Concat(new string[]
         {
             "openClassEdit(3,'",
             this.CorpCode,
             "','",
             this.UserCode,
             "')"
         });
         this.btnGiveOut.Attributes["onclick"]  = "openSelect(1);";
         this.btnViewSign.Attributes["onclick"] = "openSelect(2);";
         this.btnDel.Attributes["onclick"]      = " return confirm('确定删除当前记录数据吗?');";
         this.btnOnHole.Attributes["onclick"]   = " return confirm('确定归档吗?');";
         this.dgFileList_Bind();
     }
 }
Esempio n. 2
0
    protected void btnPigeOnHole_Click(object sender, EventArgs e)
    {
        string    corpCode  = "%";
        string    userCode  = this.Session["yhdm"].ToString();
        DataTable dataTable = DocumentAction.QueryCorpCode(userCode);

        if (dataTable.Rows.Count > 0)
        {
            corpCode = dataTable.Rows[0]["corpCode"].ToString();
        }
        int meetingInfoId = Convert.ToInt32(this.hdnRecordID.Value);

        if (ConferenceManage.PigeOnHole(userCode, corpCode, meetingInfoId))
        {
            this.JS.Text = "alert('会议纪要已归档!');";
            this.gvMeetinInfo.DataBind();
        }
    }
Esempio n. 3
0
    protected void TVCorpCode_Create()
    {
        DataTable dataTable = DocumentAction.QueryCorpCode(this.UserCode);
        TreeNode  treeNode  = new TreeNode();

        treeNode.Text        = "名称";
        treeNode.NavigateUrl = "";
        treeNode.Target      = "SendFileList";
        this.TVCorpCode.Nodes.Add(treeNode);
        foreach (DataRow dataRow in dataTable.Rows)
        {
            TreeNode treeNode2 = new TreeNode();
            treeNode2.Text        = dataRow["CorpName"].ToString();
            treeNode2.NavigateUrl = "SendFileList.aspx?code=" + dataRow["CorpCode"].ToString();
            treeNode2.Target      = "SendFileList";
            treeNode.Nodes.Add(treeNode2);
        }
    }
Esempio n. 4
0
    protected void BtnAdd_Click(object sender, EventArgs e)
    {
        string    pStr      = this.ddltIsValid.SelectedValue.ToString();
        DataTable dataTable = DocumentAction.QueryCorpCode(this.UserCode);
        string    pStr2;

        if (dataTable.Rows.Count == 0)
        {
            pStr2 = "%";
        }
        else
        {
            pStr2 = dataTable.Rows[0]["CorpCode"].ToString();
        }
        Hashtable hashtable = new Hashtable();

        hashtable.Add("ClassTypeCode", SqlStringConstructor.GetQuotedString(this.ClassTypeCode));
        hashtable.Add("CorpCode", SqlStringConstructor.GetQuotedString(pStr2));
        hashtable.Add("ClassCode", SqlStringConstructor.GetQuotedString(this.txtClassCode.Text));
        hashtable.Add("ClassName", SqlStringConstructor.GetQuotedString(this.txtClassName.Text));
        hashtable.Add("IsValid", SqlStringConstructor.GetQuotedString(pStr));
        if (this.ClassID == 0)
        {
            if (DocumentAction.AddDocClass(hashtable))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
        else
        {
            string where = " where ClassID = '" + this.ClassID + " '";
            if (DocumentAction.UpdDocClass(hashtable, where))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
    }
Esempio n. 5
0
    protected void BtnSave_Click(object sender, EventArgs e)
    {
        string    pStr      = "%";
        DataTable dataTable = DocumentAction.QueryCorpCode(this.UserCode);

        if (dataTable.Rows.Count > 0)
        {
            pStr = dataTable.Rows[0]["CorpCode"].ToString();
        }
        DateTime dateTime = default(DateTime);

        dateTime = DateTime.Now;
        Hashtable hashtable = new Hashtable();

        hashtable.Add("MeetingInfoID", this.MeetingInfoID.ToString());
        hashtable.Add("UserCode", SqlStringConstructor.GetQuotedString(this.UserCode));
        hashtable.Add("RecordDate", SqlStringConstructor.GetQuotedString(dateTime.ToString("yyyy-MM-dd")));
        hashtable.Add("CorpCode", SqlStringConstructor.GetQuotedString(pStr));
        hashtable.Add("Topic", SqlStringConstructor.GetQuotedString(this.txtTopic.Text));
        hashtable.Add("Content", SqlStringConstructor.GetQuotedString(this.txtContent.Text));
        if (this.RecordID == 0)
        {
            if (ConferenceManage.AddConferenceTopic(hashtable))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
        else
        {
            string where = " where RecordID = " + this.RecordID.ToString();
            if (ConferenceManage.UpdConferenceTopic(hashtable, where))
            {
                this.JS.Text = "alert('保存成功!');window.returnValue=true;window.close();";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
    }
Esempio n. 6
0
    private PTMultiClasses GetData()
    {
        PTMultiClasses pTMultiClasses = new PTMultiClasses();

        pTMultiClasses.ClassTypeCode   = this.ClassTypeCode;
        pTMultiClasses.ClassCode       = this.ClassCode;
        pTMultiClasses.ParentClassCode = "";
        pTMultiClasses.ClassName       = this.txtClassName.Text.Trim();
        pTMultiClasses.Remark          = this.txtRemark.Text.Trim();
        pTMultiClasses.IsValid         = "1";
        string    corpCode  = "%";
        DataTable dataTable = DocumentAction.QueryCorpCode(this.Session["yhdm"].ToString());

        if (dataTable.Rows.Count > 0)
        {
            corpCode = dataTable.Rows[0]["corpCode"].ToString();
        }
        pTMultiClasses.CorpCode = corpCode;
        return(pTMultiClasses);
    }
Esempio n. 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         this.UserCode = Convert.ToString(this.Session["yhdm"]);
         DataTable dataTable = DocumentAction.QueryCorpCode(this.UserCode);
         if (dataTable.Rows.Count > 0)
         {
             this.CorpCode = dataTable.Rows[0]["CorpCode"].ToString();
         }
         else
         {
             this.CorpCode = "";
         }
         this.btnAdd.Attributes["onclick"] = string.Concat(new string[]
         {
             "openMyDocEdit(1,'",
             this.CorpCode,
             "','",
             this.UserCode,
             "')"
         });
         this.btnEdit.Attributes["onclick"] = string.Concat(new string[]
         {
             "openMyDocEdit(2,'",
             this.CorpCode,
             "','",
             this.UserCode,
             "')"
         });
         this.btnDel.Attributes["onclick"]     = " return confirm('确定删除当前记录数据吗?');";
         this.btnStartWF.Attributes["onclick"] = " return confirm('确定提交审核吗?');";
         this.btnViewWF.Attributes["onclick"]  = "return OpenViewWF();";
         this.btnWFPrint.Attributes["onclick"] = "OpenPrintWF();";
         this.BtnView.Attributes["onclick"]    = "OpenLock();";
         this.dgFileList_Bind();
     }
 }
Esempio n. 8
0
    protected void BtnAdd_Click(object sender, EventArgs e)
    {
        string pStr = this.ddltIsValid.SelectedValue.ToString();
        string pStr2;

        if (this.Types == "0")
        {
            pStr2 = "%";
        }
        else
        {
            DataTable dataTable = DocumentAction.QueryCorpCode(this.UserCode);
            if (dataTable.Rows.Count == 0)
            {
                pStr2 = "%";
            }
            else
            {
                pStr2 = dataTable.Rows[0]["CorpCode"].ToString();
            }
        }
        if (string.IsNullOrEmpty(this.txtClassCode.Text.Trim()))
        {
            this.JS.Text = "alert('分类编号不允许为空!');";
            this.txtClassCode.Focus();
            return;
        }
        if (string.IsNullOrEmpty(this.txtClassName.Text.Trim()))
        {
            this.JS.Text = "alert('分类名称不允许为空!');";
            this.txtClassName.Focus();
            return;
        }
        if (this.txtRemark.Text.Trim().Length > 100)
        {
            this.JS.Text = "alert('备注长度不许超过100个字符!');";
            this.txtRemark.Focus();
            return;
        }
        if (this.ClassID == 0)
        {
            DataTable dataTable2 = DocumentAction.QueryOneDocumentClasscode(this.txtClassCode.Text.Trim(), this.ClassTypeCode);
            if (dataTable2.Rows.Count > 0)
            {
                this.JS.Text = "alert('分类编号不允许重复!');";
                this.txtClassCode.Focus();
                return;
            }
            DataTable dataTable3 = DocumentAction.QueryOneDocumentClassname(this.txtClassName.Text.Trim(), this.ClassTypeCode);
            if (dataTable3.Rows.Count > 0)
            {
                this.JS.Text = "alert('分类名称不允许重复!')";
                this.txtClassName.Focus();
                return;
            }
        }
        else
        {
            DataTable dataTable4 = DocumentAction.QueryOneDocumentClass(this.ClassID);
            if (dataTable4.Rows.Count > 0)
            {
                string b  = dataTable4.Rows[0]["ClassCode"].ToString();
                string b2 = dataTable4.Rows[0]["ClassName"].ToString();
                if (this.txtClassCode.Text.Trim() != b)
                {
                    DataTable dataTable5 = DocumentAction.QueryOneDocumentClasscode(this.txtClassCode.Text.Trim(), this.ClassTypeCode);
                    if (dataTable5.Rows.Count > 0)
                    {
                        this.JS.Text = "alert('分类编号不允许重复!');";
                        this.txtClassCode.Focus();
                        return;
                    }
                }
                if (this.txtClassName.Text.Trim() != b2)
                {
                    DataTable dataTable6 = DocumentAction.QueryOneDocumentClassname(this.txtClassName.Text.Trim(), this.ClassTypeCode);
                    if (dataTable6.Rows.Count > 0)
                    {
                        this.JS.Text = "alert('分类名称不允许重复!')";
                        this.txtClassName.Focus();
                        return;
                    }
                }
            }
        }
        Hashtable hashtable = new Hashtable();

        hashtable.Add("ClassTypeCode", SqlStringConstructor.GetQuotedString(this.ClassTypeCode));
        hashtable.Add("CorpCode", SqlStringConstructor.GetQuotedString(pStr2));
        hashtable.Add("ClassCode", SqlStringConstructor.GetQuotedString(this.txtClassCode.Text.Trim()));
        hashtable.Add("ClassName", SqlStringConstructor.GetQuotedString(this.txtClassName.Text.Trim()));
        hashtable.Add("Remark", SqlStringConstructor.GetQuotedString(this.txtRemark.Text.Trim()));
        hashtable.Add("IsValid", SqlStringConstructor.GetQuotedString(pStr));
        if (this.ClassID == 0)
        {
            if (DocumentAction.AddDocClass(hashtable))
            {
                this.JS.Text = "successed('保存');";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
        else
        {
            string where = " where ClassID = '" + this.ClassID + " '";
            if (DocumentAction.UpdDocClass(hashtable, where))
            {
                this.JS.Text = "successed('保存');";
                return;
            }
            this.JS.Text = "alert('保存失败!');";
            return;
        }
    }