示例#1
0
        private void AddAttachControl()
        {
            string Template;
            long   FlowID;

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            FlowID   = df.GetDocumentFlowID(DocID);
            Template = df.GetStyleTemplate(FlowID);
            if (Template != "")
            {
                TableRow  tr = new TableRow();
                TableCell td = new TableCell();
                TableCell tc = new TableCell();
                Literal   lt = new Literal();


                lt.Text            = "<a href='" + Template + "' style='text-decoration: underline' titile='模板下载' target='_blank'>模板</a>:";
                tc.HorizontalAlign = HorizontalAlign.Right;
                tc.Width           = Unit.Percentage(20);
                tc.Controls.Add(lt);


                td.HorizontalAlign = HorizontalAlign.Left;
                td.ColumnSpan      = 5;


                System.Web.UI.HtmlControls.HtmlInputFile hif = new System.Web.UI.HtmlControls.HtmlInputFile();
                hif.ID             = "fileTemplate";
                hif.Name           = "fileTemplate";
                hif.Style["width"] = Unit.Percentage(70).ToString();
                hif.Style["Class"] = "Input3";

                td.Controls.Add(hif);

                tr.Cells.Add(tc);
                tr.Cells.Add(td);


                tabDispDocument.Rows.Add(tr);

                td = null;
                tr = null;
            }

            df = null;
        }
示例#2
0
        private void Bind()
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();


            if (DocID > 0)
            {
                //读取稿件内容
                FlowID            = df.GetDocumentFlowID(DocID);
                StepID            = df.GetDocumentStepID(DocID);
                ProjectID         = 0;
                cmdSend.Enabled   = true;
                cmdDelete.Enabled = true;
                bEditMode         = true;
                if (df.IsProject(UserName, DocID))
                {
                    ProjectID = Int32.Parse(PID.Value);
                    if (!Page.IsPostBack)
                    {
                        DataTable dt;

                        ddlProject.Visible = true;
                        ddlProject.Items.Clear();

                        df.GetProject(UserName, out dt);

                        ddlProject.DataSource     = dt.DefaultView;
                        ddlProject.DataTextField  = "ClassName";
                        ddlProject.DataValueField = "ClassID";
                        ddlProject.DataBind();

                        //				for(int i=0;i<ddlProject.Items.Count;i++)
                        //				{
                        //					if(ddlProject.Items[i].Value.ToString()==UDS.Components.DocumentFlow.GetDocumentProjectID(DocID).ToString())
                        //						ddlProject.SelectedIndex = i;
                        //				}

                        if (ddlProject.Items.Count > 0)
                        {
                            PID.Value = ddlProject.Items[0].Value.ToString();
                        }
                    }
                }
                else
                {
//					StepID = 1;
//					cmdSend.Enabled		= false;
//					cmdDelete.Enabled	= false;
//					bEditMode			= false;
                    ddlProject.Visible         = false;
                    ddlProject.EnableViewState = false;
                }
            }
            else
            {
                StepID                     = 1;
                cmdSend.Enabled            = false;
                cmdDelete.Enabled          = false;
                bEditMode                  = false;
                ddlProject.EnableViewState = false;
                ddlProject.Visible         = false;
            }

            df = null;
        }
示例#3
0
        private void Bind()
        {
            UDS.Components.DocumentFlow df =new UDS.Components.DocumentFlow();

            if(DocID>0)
            {

                //��ȡ�������
                FlowID		= df.GetDocumentFlowID(DocID);
                StepID		= df.GetDocumentStepID(DocID);
                ProjectID	= 0;
                cmdSend.Enabled		= true;
                cmdDelete.Enabled	= true;
                bEditMode			= true;
                if(df.IsProject(UserName,DocID))
                {

                    ProjectID = Int32.Parse(PID.Value);
                    if(!Page.IsPostBack)
                    {
                        DataTable dt;

                        ddlProject.Visible = true;
                        ddlProject.Items.Clear();

                        df.GetProject(UserName,out dt);

                        ddlProject.DataSource		= dt.DefaultView;
                        ddlProject.DataTextField	= "ClassName";
                        ddlProject.DataValueField	= "ClassID";
                        ddlProject.DataBind();

                        //				for(int i=0;i<ddlProject.Items.Count;i++)
                        //				{
                        //					if(ddlProject.Items[i].Value.ToString()==UDS.Components.DocumentFlow.GetDocumentProjectID(DocID).ToString())
                        //						ddlProject.SelectedIndex = i;
                        //				}

                        if(ddlProject.Items.Count>0)
                        {
                            PID.Value = ddlProject.Items[0].Value.ToString();
                        }
                    }
                }
                else
                {
            //					StepID = 1;
            //					cmdSend.Enabled		= false;
            //					cmdDelete.Enabled	= false;
            //					bEditMode			= false;
                    ddlProject.Visible = false;
                    ddlProject.EnableViewState = false;
                }
            }
            else
            {
                StepID = 1;
                cmdSend.Enabled		= false;
                cmdDelete.Enabled	= false;
                bEditMode			= false;
                ddlProject.EnableViewState = false;
                ddlProject.Visible = false;
            }

            df = null;
        }
示例#4
0
        private void Bind()
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            Database mySQL = new Database();

            long FlowID;
            long StepID;

            DataTable dt;

            FlowID = df.GetDocumentFlowID(DocID);
            StepID = df.GetDocumentStepID(DocID);

            cmdPostilFinish.Visible = cmdPostilFinish.Visible && df.GetStepRightToFinish(FlowID, StepID) == 1?true:false;
            ProjectID = Int32.Parse(PID.Value);

            //流程批阅状态并且按照项目流转
            if (FlowState == true && df.IsProject(UserName, DocID))
            {
                if (!Page.IsPostBack)
                {
                    ddlProject.Visible = true;
                    ddlProject.Items.Clear();

                    df.GetProject(UserName, out dt);

                    ddlProject.DataSource     = dt.DefaultView;
                    ddlProject.DataTextField  = "ClassName";
                    ddlProject.DataValueField = "ClassID";
                    ddlProject.DataBind();

                    if (ddlProject.Items.Count > 0)
                    {
                        PID.Value = ddlProject.Items[0].Value;
                    }
                    else
                    {
                        PID.Value = "-1";
                    }
                }
            }
            else
            {
                ddlProject.Visible = false;
            }

            df.GetDocumentInfo(DocID, out dt);

            AddRow(tabDispDocument, "基本信息");

            AddRow(tabDispDocument, "流程:", dt.Rows[0]["flow_name"].ToString());
            AddRow(tabDispDocument, "发送者:", dt.Rows[0]["realname"].ToString());
            AddRow(tabDispDocument, "发送日期:", dt.Rows[0]["doc_added_date"].ToString());
            AddRow(tabDispDocument, "当前步骤:", "<a href='DisplayTacheMember.aspx?DocID=" + DocID.ToString() + "&ReturnPage=" + ReturnPage.ToString() + "'>" + dt.Rows[0]["Step_name"].ToString() + "</a>");

            AddRow(tabDispDocument, "详细表单");

            if (dt.Rows.Count > 0)
            {
                FlowID = Int32.Parse(dt.Rows[0]["flow_id"].ToString());

                HtmlForm PostilDocument = (HtmlForm)this.Page.FindControl("PostilDocument");

                //=============================//
                //			添加正文
                //=============================//
                DataTable dtSheet;
                df.GetStyleDescription(FlowID, 0, out dtSheet);

                for (int i = 0; i < dtSheet.Rows.Count; i++)
                {
                    AddRow(tabDispDocument, dtSheet.Rows[i]["Field_Description"].ToString() + ":", dt.Rows[0][dtSheet.Rows[i]["Field_Name"].ToString()].ToString());
                }

                dtSheet = null;

                //=============================//
                //			添加附件
                //=============================//
                AddAttach(DocID);

                //=============================//
                //			添加批注
                //=============================//
                DataTable dtPostil;
                df.GetDocumentPostil(DocID, out dtPostil);

                if (dtPostil.Rows.Count > 0)
                {
                    AddRow(tabDispDocument, "审批意见");
                    AddPostitleHead(tabDispDocument);

                    for (int i = 0; i < dtPostil.Rows.Count; i++)
                    {
                        AddRow(tabDispDocument, dtPostil.Rows[i]["RealName"].ToString(), dtPostil.Rows[i]["Postil_Date"].ToString(), dtPostil.Rows[i]["Postil_Content"].ToString(), Int32.Parse(dtPostil.Rows[i]["Postil_Type"].ToString()), dtPostil.Rows[i]["FileName"].ToString(), dtPostil.Rows[i]["FileVisualPath"].ToString(), dtPostil.Rows[i]["usedtime"].ToString());
                    }
                }

                dtPostil = null;

                AddProjectControl();
                AddControl(tabDispDocument);
            }
        }
示例#5
0
        private void AddAttachControl()
        {
            string Template;
            long FlowID;
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            FlowID = df.GetDocumentFlowID(DocID);
            Template = df.GetStyleTemplate(FlowID);
            if(Template!="")
            {
                TableRow  tr	= new TableRow();
                TableCell td	= new TableCell();
                TableCell tc	= new TableCell();
                Literal	  lt	= new Literal();

                lt.Text  = "<a href='" + Template + "' style='text-decoration: underline' titile='ģ������' target='_blank'>ģ��</a>:";
                tc.HorizontalAlign = HorizontalAlign.Right;
                tc.Width = Unit.Percentage(20);
                tc.Controls.Add(lt);

                td.HorizontalAlign = HorizontalAlign.Left;
                td.ColumnSpan = 5;

                System.Web.UI.HtmlControls.HtmlInputFile hif = new System.Web.UI.HtmlControls.HtmlInputFile();
                hif.ID				= "fileTemplate";
                hif.Name			= "fileTemplate";
                hif.Style["width"]	= Unit.Percentage(70).ToString();
                hif.Style["Class"]	= "Input3";

                td.Controls.Add(hif);

                tr.Cells.Add(tc);
                tr.Cells.Add(td);

                tabDispDocument.Rows.Add(tr);

                td = null;
                tr = null;

            }

            df = null;
        }
示例#6
0
        private void Bind()
        {
            UDS.Components.DocumentFlow df	= new UDS.Components.DocumentFlow();
            Database	mySQL				= new Database();

            long			FlowID;
            long			StepID;

            DataTable	dt;

            FlowID	= df.GetDocumentFlowID(DocID);
            StepID	= df.GetDocumentStepID(DocID);

            cmdPostilFinish.Visible  =cmdPostilFinish.Visible&&df.GetStepRightToFinish(FlowID,StepID) == 1?true:false;
            ProjectID = Int32.Parse(PID.Value);

            //��������״̬���Ұ�����Ŀ��ת
            if(FlowState==true&&df.IsProject(UserName,DocID))
            {
                if(!Page.IsPostBack)
                {
                    ddlProject.Visible = true;
                    ddlProject.Items.Clear();

                    df.GetProject(UserName,out dt);

                    ddlProject.DataSource		= dt.DefaultView;
                    ddlProject.DataTextField	= "ClassName";
                    ddlProject.DataValueField	= "ClassID";
                    ddlProject.DataBind();

                    if(ddlProject.Items.Count>0)
                    {
                        PID.Value = ddlProject.Items[0].Value;
                    }
                    else
                        PID.Value = "-1";
                }

            }
            else
            {
                ddlProject.Visible = false;
            }

            df.GetDocumentInfo(DocID,out dt);

            AddRow(tabDispDocument,"������Ϣ");

            AddRow(tabDispDocument,"����:",dt.Rows[0]["flow_name"].ToString());
            AddRow(tabDispDocument,"������:",dt.Rows[0]["realname"].ToString());
            AddRow(tabDispDocument,"��������:",dt.Rows[0]["doc_added_date"].ToString());
            AddRow(tabDispDocument,"��ǰ����:","<a href='DisplayTacheMember.aspx?DocID=" + DocID.ToString() + "&ReturnPage=" + ReturnPage.ToString() + "'>" + dt.Rows[0]["Step_name"].ToString() + "</a>");

            AddRow(tabDispDocument,"��ϸ���");

            if(dt.Rows.Count >0)
            {

                FlowID = Int32.Parse(dt.Rows[0]["flow_id"].ToString());

                HtmlForm PostilDocument   = (HtmlForm)this.Page.FindControl("PostilDocument");

                //=============================//
                //			�������
                //=============================//
                DataTable dtSheet;
                df.GetStyleDescription(FlowID,0,out dtSheet);

                for(int i =0;i<dtSheet.Rows.Count;i++)
                {
                    AddRow(tabDispDocument,dtSheet.Rows[i]["Field_Description"].ToString() + ":",dt.Rows[0][dtSheet.Rows[i]["Field_Name"].ToString()].ToString());
                }

                dtSheet = null;

                //=============================//
                //			��Ӹ���
                //=============================//
                AddAttach(DocID);

                //=============================//
                //			�����ע
                //=============================//
                DataTable dtPostil;
                df.GetDocumentPostil(DocID,out dtPostil);

                if(dtPostil.Rows.Count>0)
                {
                    AddRow(tabDispDocument,"�������");
                    AddPostitleHead(tabDispDocument);

                    for(int i=0;i<dtPostil.Rows.Count;i++)
                    {
                        AddRow(tabDispDocument,dtPostil.Rows[i]["RealName"].ToString(),dtPostil.Rows[i]["Postil_Date"].ToString(),dtPostil.Rows[i]["Postil_Content"].ToString(),Int32.Parse(dtPostil.Rows[i]["Postil_Type"].ToString() ),dtPostil.Rows[i]["FileName"].ToString(),dtPostil.Rows[i]["FileVisualPath"].ToString(),dtPostil.Rows[i]["usedtime"].ToString());
                    }
                }

                dtPostil = null;

                AddProjectControl();
                AddControl(tabDispDocument);

            }
        }