예제 #1
0
        private void cmdBack_Click(object sender, System.EventArgs e)
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            HtmlForm FrmNewDocument        = (HtmlForm)this.Page.FindControl("PostilDocument");
            TextBox  tmpText;

            tmpText = (TextBox)FrmNewDocument.FindControl("txtPostil");
            long PostilID;

            try
            {
                PostilID = df.AddPostil(UserName, DocID, tmpText.Text, 4, ProjectID, 2);
                df.BackDocument(DocID);
                UploadFile(PostilID);
            }
            catch (Exception ex)
            {
                UDS.Components.Error.Log(ex.ToString());
            }
            finally
            {
                df = null;
            }
            Response.AddHeader("Refresh", "1");
        }
예제 #2
0
파일: EditFlow.aspx.cs 프로젝트: hoku85/UDS
        private void cmdFinish_Click(object sender, System.EventArgs e)
        {
            String UserName = Request.Cookies["UserName"].Value.ToString();
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            if(FlowID<=0)
            {

                FlowID=df.AddFlow(txtFlowName.Text,txtFlowRemark.Text,UserName,Int32.Parse(dpStyle.Items[dpStyle.SelectedIndex].Value));
                if(FlowID>0)
                {
                    Server.Transfer("ManageFlow.aspx?FlowID=" + FlowID.ToString());
                }
                df = null;
            }
            else
            {

                if(df.UpdateFlow(FlowID,txtFlowName.Text,txtFlowRemark.Text,UserName,Int32.Parse(dpStyle.Items[dpStyle.SelectedIndex].Value))==0)
                {
                    Server.Transfer("EditTache.aspx?FlowID=" + FlowID.ToString() + "&StepID=1");
                }
                df = null;
                Server.Transfer("ManageFlow.aspx?FlowID=" + FlowID.ToString());
            }
        }
예제 #3
0
        void Bind()
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            DataTable dt;

            Table     tt = new Table();
            TableRow  tr = new TableRow();
            TableCell tc = new TableCell();

            tt.Style.Add("font-size", "10pt");
            tt.Width           = Unit.Percentage(100);
            tt.HorizontalAlign = HorizontalAlign.Center;

            AddRow(tt, df.GetFlowTitle(FlowID), Color.FromArgb(250, 250, 250));

            df.GetStep(FlowID, 0, out dt);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                AddStep(tt, dt.Rows[i], i + 1);
                AddRow(tt, "<span lang='EN-US' style='font-size: 10.5pt; font-family: Wingdings'>ò</span>", Color.FromArgb(250, 250, 250));
            }

            df = null;

            AddRow(tt, "<a href='#' onclick='history.back();'>流程结束</a>", Color.FromArgb(250, 250, 250));


            Page.Controls.Add(tt);
        }
예제 #4
0
        private void cmdOK_Click(object sender, System.EventArgs e)
        {
            string FileName;

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            try
            {
                FileName = UploadFile();
                if (StyleID == 0)
                {
                    StyleID = df.AddStyle(txtStyleName.Text, txtStyleRemark.Text, FileName);
                }
                else
                {
                    df.UpdateStyle(StyleID, txtStyleName.Text, txtStyleRemark.Text, FileName, Server.MapPath(".") + @"\Template");
                }
            }
            finally
            {
                if (df != null)
                {
                    df = null;
                }
            }
            //Server.Transfer("ManageStyle.aspx");
            Server.Transfer("DefineStyle.aspx?StyleID=" + StyleID.ToString());
        }
예제 #5
0
 private void cmdInsert_Click(object sender, System.EventArgs e)
 {
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.AddJump(FlowID, StepID, ddFieldName.Items[ddFieldName.SelectedIndex].Value.ToString(), ddCompare.Items[ddCompare.SelectedIndex].Text, Double.Parse(txtContant.Text), Int32.Parse(ddStep.Items[ddStep.SelectedIndex].Value), Int32.Parse(ddlFlowRule.SelectedItem.Value));
     df = null;
     Bind();
 }
예제 #6
0
        private void AddAttachControl()
        {
            string Template;

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            Template = df.GetStyleTemplate(FlowID);
            if (Template != "")
            {
                TableRow  tr = new TableRow();
                TableCell td = new TableCell();
                TableCell tl = new TableCell();

                td.Text            = "<a href='" + Template + "' style='text-decoration: underline' titile='模板下载' target='_blank'>模板</a>:";
                td.HorizontalAlign = HorizontalAlign.Right;
                tr.Cells.Add(td);

                System.Web.UI.HtmlControls.HtmlInputFile hif = new System.Web.UI.HtmlControls.HtmlInputFile();
                hif.ID             = "fileTemplate";
                hif.Name           = "fileTemplate";
                hif.Style["width"] = "450px";
                hif.Style["Class"] = "Input3";

                tl.Controls.Add(hif);
                tr.Cells.Add(tl);

                ht.Rows.Add(tr);

                td = null;
                tr = null;
            }

            df = null;
        }
예제 #7
0
        private void AddAttach(long DocID)
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            DataTable dt = new DataTable();

            df.GetDocumentAttach(DocID, out dt);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                TableRow  tr = new TableRow();
                TableCell td = new TableCell();
                TableCell tc = new TableCell();

                td.Text            = "附件:";
                td.HorizontalAlign = HorizontalAlign.Right;

                string FilePath = dt.Rows[i]["FileVisualPath"].ToString() + dt.Rows[i]["FileName"].ToString();

                tc.Text            = "<a href='" + "." + FilePath.Replace("\\", "/") + "' target='_blank'>" + dt.Rows[i]["FileName"].ToString() + "</a>";
                tc.HorizontalAlign = HorizontalAlign.Left;

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

                tr.Height          = 22;
                tr.HorizontalAlign = HorizontalAlign.Center;

                ht.Rows.Add(tr);
            }

            dt = null;
            df = null;
        }
예제 #8
0
        private void cmdFinish_Click(object sender, System.EventArgs e)
        {
            String UserName = Request.Cookies["UserName"].Value.ToString();

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            if (FlowID <= 0)
            {
                FlowID = df.AddFlow(txtFlowName.Text, txtFlowRemark.Text, UserName, Int32.Parse(dpStyle.Items[dpStyle.SelectedIndex].Value));
                if (FlowID > 0)
                {
                    Server.Transfer("ManageFlow.aspx?FlowID=" + FlowID.ToString());
                }
                df = null;
            }
            else
            {
                if (df.UpdateFlow(FlowID, txtFlowName.Text, txtFlowRemark.Text, UserName, Int32.Parse(dpStyle.Items[dpStyle.SelectedIndex].Value)) == 0)
                {
                    Server.Transfer("EditTache.aspx?FlowID=" + FlowID.ToString() + "&StepID=1");
                }
                df = null;
                Server.Transfer("ManageFlow.aspx?FlowID=" + FlowID.ToString());
            }
        }
예제 #9
0
        private void cmdSend_Click(object sender, System.EventArgs e)
        {
            //发送到下一环节,使程序处于运行中
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            if (ProjectID >= 0)
            {
                int iResult = df.PostDocument(UserName, DocID, ProjectID);

                if (iResult == 0)
                {
                    df = null;
                    Server.Transfer("DisplayDocument.aspx?DocID=" + DocID.ToString());
                }
                else
                {
                    Response.Write("<script lanuage='javascript'>alert('" + df.DoMessage(iResult, DocID, false) + "');</script>");
                }
            }
            else
            {
                Response.Write("<script language='javascript'>alert('用户没有一个项目,不能按项目发送!');</script>");
            }
            df = null;
        }
예제 #10
0
        private void cmdOK_Click(object sender, System.EventArgs e)
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            df.AddPostil(UserName, DocID, txtPostil.Text, Operation);

            switch (Operation)
            {
            case 1:
                NextDocument(DocID);
                break;

            case 2:
                df.FaileDocument(DocID);
                break;

            case 3:
                df.FinishDocument(DocID);
                break;

            default:
                break;
            }

            df = null;
            Server.Transfer("ListDocument.aspx?DisplayType=3");

            //Response.Write("<script laguage='javascript'>window.close();</script>");
        }
예제 #11
0
        private void cmdDeleteFlow_Click(object sender, System.EventArgs e)
        {
            long FlowID;

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            string IDstr = this.GetSelectedItemID(dgFlowList, "FlowID");

            if (IDstr.Length > 0)
            {
                if (IDstr.IndexOf(",") > 0)
                {
                    Response.Write("<script lanauage='javascript'>alert('不能同时删除多个流程!');</script>");
                }
                else
                {
                    FlowID = Int32.Parse(IDstr);
                    if (df.DeleteFlow(FlowID) != 0)
                    {
                        Response.Write("<script lanauage='javascript'>alert('流程删除失败!此流程正在被一个文档使用!');</script>");
                    }
                    else
                    {
                        Response.Write("<script lanauage='javascript'>alert('流程删除成功!');</script>");
                    }
                }
            }
            else
            {
                Response.Write("<script lanauage='javascript'>alert('请选择流程!');</script>");
            }

            Bangding();

            //Response.AddHeader("Refresh","1");
        }
예제 #12
0
        protected void cmdOK_Click(object sender, EventArgs e)
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            try
            {
                if (DeptID == 0)
                {
                   // DeptID = df.AddDept(txtDeptName.Text, txtRemark.Text);

                    Dept dept = new Dept();
                    dept.Dept_Name = txtDeptName.Text;
                    dept.Dept_Remark = txtRemark.Text;
                    dept.Save();

                }
                else
                {
                    df.UpdateDept(DeptID, txtDeptName.Text, txtRemark.Text);
                }
            }
            finally
            {
                if (df != null)
                    df = null;
            }
            Server.Transfer("DepartmentManagement.aspx");
        }
예제 #13
0
        private void cmdOK_Click(object sender, System.EventArgs e)
        {
            UDS.Components.DocumentFlow df =new UDS.Components.DocumentFlow();

            df.AddPostil(UserName,DocID,txtPostil.Text,Operation);

            switch(Operation)
            {
                case 1:
                    NextDocument(DocID);
                    break;
                case 2:
                    df.FaileDocument(DocID);
                    break;
                case 3:
                    df.FinishDocument(DocID);
                    break;
                default:
                    break;
            }

            df = null;
            Server.Transfer("ListDocument.aspx?DisplayType=3");

            //Response.Write("<script laguage='javascript'>window.close();</script>");
        }
예제 #14
0
        private void AddAttach(long DocID)
        {
            UDS.Components.DocumentFlow df	= new UDS.Components.DocumentFlow();
            DataTable dt					= new DataTable();

            df.GetDocumentAttach(DocID,out dt);
            for(int i=0;i<dt.Rows.Count;i++)
            {
                TableRow  tr		= new TableRow();
                TableCell td		= new TableCell();
                TableCell tc		= new TableCell();

                td.Text ="����:";
                td.HorizontalAlign	= HorizontalAlign.Right;

                string FilePath		= dt.Rows[i]["FileVisualPath"].ToString() + dt.Rows[i]["FileName"].ToString();

                tc.Text				= "<a href='" +"." + FilePath.Replace("\\","/") +"' target='_blank'>" + dt.Rows[i]["FileName"].ToString() + "</a>";
                tc.HorizontalAlign	= HorizontalAlign.Left;

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

                tr.Height			= 22;
                tr.HorizontalAlign	= HorizontalAlign.Center;

                ht.Rows.Add(tr);
            }

            dt = null;
            df = null;
        }
예제 #15
0
        private void cmdCancel_Click(object sender, System.EventArgs e)
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            df.DeleteDocument(DocID);
            df = null;
            Server.Transfer("Listview.aspx");
        }
예제 #16
0
        private void cmdCancel_Click(object sender, System.EventArgs e)
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            df.DeleteDocument(DocID);
            df =null;
            Server.Transfer("Listview.aspx");
        }
예제 #17
0
 private void cmdDelete_Click(object sender, System.EventArgs e)
 {
     //删除拟稿文档
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.DeleteDocument(DocID);
     df = null;
     Server.Transfer("FlowTemplate.aspx");
 }
예제 #18
0
 public void MyDataGrid_Delete(object sender,DataGridCommandEventArgs e)
 {
     string FlowID = dgFlowList.DataKeys[e.Item.ItemIndex].ToString();
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.DeleteFlow(Int32.Parse(FlowID));
     df = null;
     Bangding();
 }
예제 #19
0
 protected void MyDataGrid_Delete(object source, DataGridCommandEventArgs e)
 {
     string StyleID = dgStyleListAdmin.DataKeys[e.Item.ItemIndex].ToString();
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.DeleteNews(Int32.Parse(StyleID));
     df = null;
     Bangding();
 }
예제 #20
0
 public void MyDataGrid_Delete(object sender,DataGridCommandEventArgs e)
 {
     string StyleID = dgStyleList.DataKeys[e.Item.ItemIndex].ToString();
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.DeleteStyle(Int32.Parse(StyleID),Server.MapPath("."));
     df = null;
     Bangding();
 }
예제 #21
0
파일: EditJump.aspx.cs 프로젝트: hoku85/UDS
 public void MyGrid_Move(object sender,DataGridCommandEventArgs e)
 {
     string Priority = dgJumpList.DataKeys[e.Item.ItemIndex].ToString();
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.MoveUpJump(FlowID,StepID,Int32.Parse(Priority));
     df = null;
     Bind();
 }
예제 #22
0
        private void cmdNext_Click(object sender, System.EventArgs e)
        {
            String UserName = Request.Cookies["UserName"].Value.ToString();

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            int iPassNum;

            if (radPassNumNo.Checked == true)
            {
                iPassNum = 0;
            }
            else
            {
                iPassNum = Int32.Parse(txtPassNum.Text);
            }
            int iBaseHour;
            int iCycTimes;
            int iPeriod;

            if (chkUrgencyAlert.Checked == true)
            {
                iBaseHour = Int32.Parse(txtBaseHour.Text);
                iCycTimes = Int32.Parse(txtCycTimes.Text);
                iPeriod   = Int32.Parse(txtPeriod.Text);
            }
            else
            {
                iBaseHour = 0;
                iCycTimes = 0;
                iPeriod   = 0;
            }

            //判断此流程的步骤是否存在
            if (StepID > df.GetMaxStep(FlowID))
            {
                if (df.AddStep(FlowID, txtTacheName.Text, txtRemark.Text, chkFinishYes.Checked?1:0, Int32.Parse(cboFlowRule.SelectedItem.Value), iPassNum, chkLocalAlert.Checked?1:0, iBaseHour, iCycTimes, iPeriod) > 0)
                {
                    StepID += 1;
                    Server.Transfer("EditTache.aspx?FlowID=" + FlowID.ToString() + "&StepID=" + StepID.ToString());
                }
                else
                {
                    Server.Transfer("../../Error.aspx");
                }
            }
            else
            {
                if (df.UpdateStep(FlowID, StepID, txtTacheName.Text, txtRemark.Text, chkFinishYes.Checked?1:0, Int32.Parse(cboFlowRule.SelectedItem.Value), iPassNum, chkLocalAlert.Checked?1:0, iBaseHour, iCycTimes, iPeriod) == 0)
                {
                    StepID += 1;
                    Server.Transfer("EditTache.aspx?FlowID=" + FlowID.ToString() + "&StepID=" + StepID.ToString());
                }
                else
                {
                    Server.Transfer("../../Error.aspx");
                }
            }
        }
예제 #23
0
 private void cmdUpdate_Click(object sender, System.EventArgs e)
 {
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     if (df.UpdateStyleDescription(DescriptionID, StyleID, ddlFieldName.SelectedItem.Value, tbFieldDescription.Text, JudgedYes.Checked?1:0, MultiLineYes.Checked?1:0, Int32.Parse(tbHeight.Text), Int32.Parse(tbWidth.Text), Int32.Parse(tbPosition.Text), tbExample.Text) != 0)
     {
         Response.Write("<script language='javascript'>alert('所修改的字段有重复!');</script>");
     }
     Bangding();
 }
예제 #24
0
        public void MyDataGrid_Delete(object sender, DataGridCommandEventArgs e)
        {
            string StyleID = dgStyleList.DataKeys[e.Item.ItemIndex].ToString();

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            df.DeleteStyle(Int32.Parse(StyleID), Server.MapPath("."));
            df = null;
            Bangding();
        }
예제 #25
0
        public void MyGrid_Delete(object sender, DataGridCommandEventArgs e)
        {
            string Priority = dgJumpList.DataKeys[e.Item.ItemIndex].ToString();

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            df.DeleteJump(FlowID, StepID, Int32.Parse(Priority));
            df = null;
            Bind();
        }
예제 #26
0
        public void MyDataGrid_Move(object sender, DataGridCommandEventArgs e)
        {
            string StepID = dgStepList.DataKeys[e.Item.ItemIndex].ToString();

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            df.MoveUpStep(FlowID, Int32.Parse(StepID));
            df = null;
            Bind();
        }
예제 #27
0
        public void MyDataGrid_Delete(object sender, DataGridCommandEventArgs e)
        {
            string FlowID = dgFlowList.DataKeys[e.Item.ItemIndex].ToString();

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            df.DeleteFlow(Int32.Parse(FlowID));
            df = null;
            Bangding();
        }
예제 #28
0
        private void cmdCancelSignIn_Click(object sender, System.EventArgs e)
        {
            string UserName = Request.Cookies["UserName"].Value.ToString();

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            df.CancelSignInDocument(UserName, DocID);
            df = null;

            Response.AddHeader("Refresh", "1");
        }
예제 #29
0
 private void cmdDelete_Click(object sender, System.EventArgs e)
 {
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.DeleteStyleDescription(DescriptionID);
     tbFieldDescription.Text = "";
     tbWidth.Text            = "450";
     tbHeight.Text           = "20";
     tbPosition.Text         = "1";
     Bangding();
 }
예제 #30
0
        protected void MyDataGrid_Delete(object source, DataGridCommandEventArgs e)
        {
            //string StyleID = dgStyleList.DataKeys[e.Item.ItemIndex].ToString();

            string StyleID = e.Item.Cells[0].Text;

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            df.DeleteFieldValue(Int32.Parse(StyleID));
            df = null;
            Bangding();
        }
예제 #31
0
        private void BindGrid()
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            if (DocID == 0)
            {
                lbReceiver.Enabled   = false;
                lbSignIner.Enabled   = false;
                lbUnSignIner.Enabled = false;
                lbPostiler.Enabled   = false;
            }


            DataTable dt;

            switch (DisplayType)
            {
            case 0:
                if (DocID > 0)
                {
                    df.GetStaffInStep(DocID, out dt);
                }
                else
                {
                    df.GetStaffInStep(FlowID, StepID, out dt);
                }
                break;

            case 1:
                df.GetReceiver(DocID, out dt);
                break;

            case 2:
                df.GetSignIner(DocID, out dt);
                break;

            case 3:
                df.GetUnSignIner(DocID, out dt);
                break;

            case 4:
                df.GetPostiler(DocID, out dt);
                break;

            default:
                dt = null;
                break;
            }
            if (dt != null)
            {
                dbStaffList.DataSource = dt.DefaultView;
                dbStaffList.DataBind();
            }
        }
예제 #32
0
        private void cmdDeleteTache_Click(object sender, System.EventArgs e)
        {
            string TacheID = GetSelectedItemID("cboTacheID");

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();


            df.DeleteTache(TacheID);
            df = null;

            Bangding();
        }
예제 #33
0
 private void Page_Load(object sender, System.EventArgs e)
 {
     // 在此处放置用户代码以初始化页面
     UserName = Request.Cookies["UserName"].Value.ToString().ToLower();
     if (!Page.IsPostBack)
     {
         Bangding();
     }
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     bManageFlow = df.GetAccessPermission(Request.Cookies["ActiveNodeID"] != null?Int32.Parse(Request.Cookies["ActiveNodeID"].Value):0, UserName, 4);
     df          = null;
 }
예제 #34
0
        private void Bangding()
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            DataTable dt;

            df.GetTache(0, out dt);

            dgTacheList.DataSource = dt.DefaultView;
            dgTacheList.DataBind();

            df = null;
        }
예제 #35
0
 private void cmdCancel_Click(object sender, System.EventArgs e)
 {
     //删除流程
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     if (df.DeleteFlow(FlowID) == 0)
     {
         Server.Transfer("Listview.aspx");
     }
     else
     {
         Server.Transfer("../../Error.aspx");
     }
 }
예제 #36
0
        private void Bind()
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            DataTable dt;

            labTitle.Text = df.GetFlowTitle(FlowID);
            df.GetStep(FlowID, 0, out dt);

            dgStepList.DataSource = dt.DefaultView;
            dgStepList.DataBind();

            df = null;
        }
예제 #37
0
 protected void MyDataGrid_Delete(object source, DataGridCommandEventArgs e)
 {
     string StyleID = dgStyleList.DataKeys[e.Item.ItemIndex].ToString();
     if (FlowFieldObject.IsStyleInUse(StyleID))
     {
         Response.Write("<script laguage='javascript'>alert('此字段被表单使用,不能删除。请先从表单中删除。');</script>");
         return;
     }
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.DeleteField(Int32.Parse(StyleID));
     df = null;
     Bangding();
 }
예제 #38
0
        private void Bind()
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            DataTable dt;

            labTitle.Text = df.GetFlowTitle(FlowID);
            df.GetStep(FlowID,0,out dt);

            dgStepList.DataSource = dt.DefaultView;
            dgStepList.DataBind();

            df = null;
        }
예제 #39
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;
        }
예제 #40
0
        private void cmdOK_Click(object sender, System.EventArgs e)
        {
            if (lbProject.SelectedIndex >= 0)
            {
                long ProjectID = Int32.Parse(lbProject.Items[lbProject.SelectedIndex].Value.ToString());
                UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

//				df.DoMessage(df.PostDocument(UserName,DocID,DefineID,ProjectID),DocID);

                df = null;
                Server.Transfer("ListDocument.aspx?DisplayType=1");
            }
            else
            {
                Response.Write("<script language='javascript'>alert('请选择一个项目!');</script>");
            }
        }
예제 #41
0
        private void cmdOK_Click(object sender, System.EventArgs e)
        {
            if(lbProject.SelectedIndex>=0)
            {
                long ProjectID =Int32.Parse(lbProject.Items[lbProject.SelectedIndex].Value.ToString());
                UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            //				df.DoMessage(df.PostDocument(UserName,DocID,DefineID,ProjectID),DocID);

                df = null;
                Server.Transfer("ListDocument.aspx?DisplayType=1");
            }
            else
            {
                Response.Write("<script language='javascript'>alert('��ѡ��һ����Ŀ��');</script>");
            }
        }
예제 #42
0
        private void cmdDelete_Click(object sender, System.EventArgs e)
        {
            //删除此步
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            df.DeleteStep(FlowID, StepID);
            df = null;

            if (StepID > 1)
            {
                StepID -= 1;
                Server.Transfer("EditTache.aspx?FlowID=" + FlowID.ToString() + "&StepID=" + StepID.ToString());
            }
            else
            {
                Server.Transfer("EditFlow.aspx?FlowID=" + FlowID.ToString());
            }
        }
예제 #43
0
        private void BindGrid()
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            if(DocID==0)
            {
                lbReceiver.Enabled		= false;
                lbSignIner.Enabled		= false;
                lbUnSignIner.Enabled	= false;
                lbPostiler.Enabled		= false;
            }

            DataTable dt;

            switch(DisplayType)
            {
                case 0:
                    if(DocID>0)
                        df.GetStaffInStep(DocID,out dt);
                    else
                    {
                        df.GetStaffInStep(FlowID,StepID,out dt);
                    }
                    break;
                case 1:
                    df.GetReceiver(DocID,out dt);
                    break;
                case 2:
                    df.GetSignIner(DocID,out dt);
                    break;
                case 3:
                    df.GetUnSignIner(DocID,out dt);
                    break;
                case 4:
                    df.GetPostiler(DocID,out dt);
                    break;
                default:
                    dt = null;
                    break;
            }
            if(dt !=null)
            {
                dbStaffList.DataSource = dt.DefaultView;
                dbStaffList.DataBind();
            }
        }
예제 #44
0
        private void cmdSave_Click(object sender, System.EventArgs e)
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            string mySql;


            if (bEditMode == false)
            {
                mySql = GetStyleInsertData();

                //拟稿
                DocID = df.AddDocument(UserName, FlowID, mySql);

                //上传文件
                UploadFile(DocID);

                df = null;

                //转到查看稿件
                Server.Transfer("NewDocument.aspx?FlowID=" + FlowID.ToString() + "&DocID=" + DocID.ToString());
            }
            else
            {
                mySql = GetStyleUpdateData(DocID);

                //Response.Write("<script language='javascript'>alert('" + mySql + "');</script>");
                df.UpdateDocument(mySql);

                string FileName = df.GetAttachName(DocID);
                if (FileName.Length > 0)
                {
                    df.DeleteAttach(DocID);
                    if (System.IO.File.Exists(Server.MapPath(@"." + FileName)) == true)
                    {
                        System.IO.File.Delete(Server.MapPath(@"." + FileName));
                    }
                }

                //上传文件
                UploadFile(DocID);

                df = null;
                //修改编辑文件
            }
            Response.AddHeader("Refresh", "1");
        }
예제 #45
0
파일: EditFlow.aspx.cs 프로젝트: hoku85/UDS
        private void Bangding()
        {
            int StyleID=0;
            if(FlowID>0)
            {
                UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
                DataTable dt;
                df.GetFlow(FlowID,out dt);
                if(dt.Rows.Count >0)
                {
                    txtFlowName.Text	= dt.Rows[0]["Flow_Name"].ToString();
                    txtFlowRemark.Text	= dt.Rows[0]["Remark"].ToString();
                    StyleID				= Int32.Parse(dt.Rows[0]["Style_ID"].ToString());

                }
            }
            FillStyle(StyleID);
        }
예제 #46
0
        private void cmdDeleteStyle_Click(object sender, System.EventArgs e)
        {
            string StyleID = GetSelectedItemID("cboStyleID");

            if(StyleID!="")
            {
                if(StyleID.IndexOf(",")<0)
                {
                    UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
                    df.DeleteStyle(Int32.Parse(StyleID),Server.MapPath("."));
                    df = null;
                    Bangding();
                }
                else
                    Response.Write("<script laguage='javascript'>alert('ֻ��ɾ��һ����');</script>");
            }
            else
                Response.Write("<script laguage='javascript'>alert('��ѡ��һ��Ҫɾ������ʽ��');</script>");
        }
예제 #47
0
        private void NextDocument(long lDocID)
        {
            long DefineID;

            UDS.Components.DocumentFlow df =new UDS.Components.DocumentFlow();

            DefineID = df.GetNextDefineID(lDocID);

            if(DefineID>0)
            {
                //���͵���һ����
                switch(df.GetTacheRule(DefineID))
                {
                    case 0:													//����Ŀ��
                        if(df.GetParentProjectAccount(UserName)>0)			//���ϼ���Ŀ
                        {
                            df = null;
                            Server.Transfer("SelectProject.aspx?DocID=" + lDocID.ToString() + "&DefineID=" + DefineID.ToString());
                        }
                        else												//û���ϼ���Ŀ
                        {
                            Response.Write("<script language='javascript'>alert('" + df.DoMessage(-3,lDocID) + "');</script>");
                            df = null;
                        }
                        break;
                    case 1:													//��������
                        Response.Write("<script language='javascript'>alert('" + df.DoMessage(df.PostDocument(UserName,DocID,DefineID,0),DocID) + "');</script>");
                        break;
                    case 2:													//����������ȫ�����˶���
                        break;
                    default:
                        break;
                }
            }
            else
                df.FinishDocument(lDocID);									//û����һ���ڣ�����

            df = null;
        }
예제 #48
0
        private void AddAttachControl()
        {
            string Template;
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            Template = df.GetStyleTemplateEx(StyleID);
            if(Template!="")
            {
                TableRow  tr	= new TableRow();
                TableCell td	= new TableCell();
                TableCell tl	= new TableCell();
                TableCell tt	= new TableCell();

                tt.Text =" ";
                tr.Cells.Add(tt);

                td.Text  = "<a href='" + Template + "' style='text-decoration: underline' titile='ģ������'>ģ��</a>:";
                td.HorizontalAlign = HorizontalAlign.Right;
                tr.Cells.Add(td);

                System.Web.UI.HtmlControls.HtmlInputFile hif = new System.Web.UI.HtmlControls.HtmlInputFile();
                hif.ID				= "fileTemplate";
                hif.Name			= "fileTemplate";
                hif.Style["width"]	= "450px";
                hif.Style["Class"]	= "Input3";

                tl.Controls.Add(hif);
                tr.Cells.Add(tl);

                tabDemo.Rows.Add(tr);

                td = null;
                tr = null;

            }

            df = null;
        }
예제 #49
0
 private void cmdUpdate_Click(object sender, System.EventArgs e)
 {
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     if(df.UpdateStyleDescription(DescriptionID,StyleID,ddlFieldName.SelectedItem.Value ,tbFieldDescription.Text ,JudgedYes.Checked?1:0,MultiLineYes.Checked?1:0,Int32.Parse(tbHeight.Text),Int32.Parse(tbWidth.Text),Int32.Parse(tbPosition.Text),tbExample.Text)!=0)
     {
         Response.Write("<script language='javascript'>alert('���޸ĵ��ֶ����ظ���');</script>");
     }
     Bangding();
 }
예제 #50
0
 private void cmdCancel_Click(object sender, System.EventArgs e)
 {
     //ɾ������
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     if(df.DeleteFlow(FlowID)==0)
     {
         Server.Transfer("Listview.aspx");
     }
     else
     {
         Server.Transfer("../../Error.aspx");
     }
 }
예제 #51
0
        private void cmdDelete_Click(object sender, System.EventArgs e)
        {
            //ɾ���˲�
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
            df.DeleteStep(FlowID,StepID);
            df = null;

            if(StepID>1)
            {
                StepID -=1;
                Server.Transfer("EditTache.aspx?FlowID=" + FlowID.ToString() + "&StepID=" + StepID.ToString());
            }
            else
            {
                Server.Transfer("EditFlow.aspx?FlowID=" + FlowID.ToString());
            }
        }
예제 #52
0
        private void cmdNext_Click(object sender, System.EventArgs e)
        {
            String UserName					= Server.UrlDecode(Request.Cookies["UserName"].Value);
            UDS.Components.DocumentFlow df	= new UDS.Components.DocumentFlow();
            int iPassNum;
            if(radPassNumNo.Checked ==true)
            {
                iPassNum = 0;
            }
            else
            {
                iPassNum = Int32.Parse(txtPassNum.Text);
            }
            int iBaseHour;
            int iCycTimes;
            int iPeriod;

            if(chkUrgencyAlert.Checked ==true)
            {
                iBaseHour	= Int32.Parse(txtBaseHour.Text);
                iCycTimes	= Int32.Parse(txtCycTimes.Text);
                iPeriod		= Int32.Parse(txtPeriod.Text);

            }
            else
            {
                iBaseHour	= 0;
                iCycTimes	= 0;
                iPeriod		= 0;
            }

            //�жϴ����̵IJ����Ƿ����
            if(StepID>df.GetMaxStep(FlowID))
            {

                if(df.AddStep(FlowID,txtTacheName.Text,txtRemark.Text,chkFinishYes.Checked?1:0,Int32.Parse(cboFlowRule.SelectedItem.Value),iPassNum,chkLocalAlert.Checked?1:0,iBaseHour,iCycTimes,iPeriod)>0)
                {
                    StepID +=1;
                    Server.Transfer("EditTache.aspx?FlowID=" + FlowID.ToString() + "&StepID=" + StepID.ToString());
                }
                else
                {
                    Server.Transfer("../../Error.aspx");
                }
            }
            else
            {
                if(df.UpdateStep(FlowID,StepID,txtTacheName.Text,txtRemark.Text,chkFinishYes.Checked?1:0,Int32.Parse(cboFlowRule.SelectedItem.Value),iPassNum,chkLocalAlert.Checked?1:0,iBaseHour,iCycTimes,iPeriod)==0)
                {
                    StepID +=1;
                    Server.Transfer("EditTache.aspx?FlowID=" + FlowID.ToString() + "&StepID=" + StepID.ToString());
                }
                else
                {
                    Server.Transfer("../../Error.aspx");
                }
            }
        }
예제 #53
0
        private void Bangding()
        {
            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            bIsExistStep = StepID>df.GetMaxStep(FlowID)?false:true;
            labStep.Text = "����:��" + StepID.ToString() + "��";
            labFlowName.Text = df.GetFlowTitle(FlowID);

            if(bIsExistStep==true)
            {
                DataTable dt;
                df.GetStep(FlowID,StepID,out dt);
                if(dt.Rows.Count >0)
                {
                    txtTacheName.Text = dt.Rows[0]["Step_Name"].ToString();
                    txtRemark.Text	  = dt.Rows[0]["Step_Remark"].ToString();

                    if(dt.Rows[0]["RightToFinish"].ToString()=="True")
                    {
                        chkFinishYes.Checked = true;
                        chkFinishNO.Checked  = false;
                    }
                    else
                    {
                        chkFinishYes.Checked = false;
                        chkFinishNO.Checked  = true;
                    }
                    txtPassNum.Text = dt.Rows[0]["PassNum"].ToString();
                    if(Int32.Parse(txtPassNum.Text)==0)
                    {
                        radPassNumYes.Checked = false;
                        radPassNumNo.Checked = true;
                        PassNum.Style["display"] = "none";
                    }
                    else
                    {
                        radPassNumNo.Checked = false;
                        radPassNumYes.Checked = true;
                        PassNum.Style["display"] = "";
                        if(Int32.Parse(txtPassNum.Text)==-1)
                        {
                            chkAllPass.Checked = true;
                        }
                        else
                        {
                            chkAllPass.Checked = false;
                        }

                    }
                    for(int i=0;i<cboFlowRule.Items.Count;i++)
                    {
                        if(cboFlowRule.Items[i].Value.ToString()==dt.Rows [0]["Flow_Rule"].ToString() )
                            cboFlowRule.SelectedIndex = i;
                    }
                    if(dt.Rows[0]["localalert"].ToString()=="True")
                        chkLocalAlert.Checked = true;
                    else
                        chkLocalAlert.Checked = false;

                    if(Int32.Parse(dt.Rows[0]["cycTimes"].ToString())>0)
                    {
                        chkUrgencyAlert.Checked		= true;
                        spanAlert.Style["display"]	= "";
                        txtBaseHour.Text			= dt.Rows[0]["BaseHour"].ToString();
                        txtCycTimes.Text			= dt.Rows[0]["CycTimes"].ToString();
                        txtPeriod.Text				= dt.Rows[0]["Period"].ToString();
                    }
                    else
                    {
                        chkUrgencyAlert.Checked		= false;
                        spanAlert.Style["display"]	= "none";
                        txtBaseHour.Text			= "0";
                        txtCycTimes.Text			= "0";
                        txtPeriod.Text				= "0";
                    }

                }
                df = null;
                cmdDelete.Enabled =true;
            }
            else
            {
                spanAlert.Style["display"]	= "none";
                txtBaseHour.Text			= "0";
                txtCycTimes.Text			= "0";
                txtPeriod.Text				= "0";
                cmdDelete.Enabled = false;
            }

            cmdCancel.Attributes.Add("onclick","return confirm('�Ƿ�ɾ�������̣�');");
        }
예제 #54
0
 private void cmdOK_Click(object sender, System.EventArgs e)
 {
     string FileName;
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     try
     {
         FileName = UploadFile();
         if(StyleID==0)
             StyleID = df.AddStyle(txtStyleName.Text,txtStyleRemark.Text,FileName);
         else
         {
             df.UpdateStyle(StyleID,txtStyleName.Text,txtStyleRemark.Text,FileName,Server.MapPath(".")+@"\Template");
         }
     }
     finally
     {
         if(df!=null)
             df = null;
     }
     //Server.Transfer("ManageStyle.aspx");
     Server.Transfer("DefineStyle.aspx?StyleID=" + StyleID.ToString());
 }
예제 #55
0
 private void InitHeadLine()
 {
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     labTitle.Text = df.GetFlowTitle(FlowID) + "->" +  df.GetStepTitle(FlowID,StepID);
     df = null;
 }
예제 #56
0
        private void cmdDeleteFlow_Click(object sender, System.EventArgs e)
        {
            long FlowID;
            UDS.Components.DocumentFlow df	= new UDS.Components.DocumentFlow();
            string IDstr					= this.GetSelectedItemID(dgFlowList,"FlowID");

            if(IDstr.Length >0)
            {
                if(IDstr.IndexOf(",")>0)
                    Response.Write("<script lanauage='javascript'>alert('����ͬʱɾ��������̣�');</script>");
                else
                {
                    FlowID = Int32.Parse(IDstr);
                    if(df.DeleteFlow(FlowID)!=0)
                        Response.Write("<script lanauage='javascript'>alert('����ɾ��ʧ�ܣ����������ڱ�һ���ĵ�ʹ�ã�');</script>");
                    else
                        Response.Write("<script lanauage='javascript'>alert('����ɾ���ɹ���');</script>");
                }
            }
            else
                Response.Write("<script lanauage='javascript'>alert('��ѡ�����̣�');</script>");

            Bangding();

            //Response.AddHeader("Refresh","1");
        }
예제 #57
0
파일: EditJump.aspx.cs 프로젝트: hoku85/UDS
 private void cmdInsert_Click(object sender, System.EventArgs e)
 {
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.AddJump(FlowID,StepID,ddFieldName.Items[ddFieldName.SelectedIndex].Value.ToString(),ddCompare.Items[ddCompare.SelectedIndex].Text ,Double.Parse(txtContant.Text),Int32.Parse(ddStep.Items[ddStep.SelectedIndex].Value),Int32.Parse(ddlFlowRule.SelectedItem.Value));
     df = null;
     Bind();
 }
예제 #58
0
        private void GetValue(long DescriptionID)
        {
            SqlDataReader dr;

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            df.GetDescription(DescriptionID,out dr);

            if(dr.Read())
            {
                for(int i=0;i<ddlFieldName.Items.Count;i++)
                {
                    if(ddlFieldName.Items[i].Value  == dr["Field_Name"].ToString())
                        ddlFieldName.SelectedIndex = i;
                }

                tbFieldDescription.Text = dr["Field_Description"].ToString();
                if(dr["judged"].ToString() =="True")
                    JudgedYes.Checked = true;
                else
                    JudgedNo.Checked = true;
                if(dr["multiline"].ToString() =="True")
                    MultiLineYes.Checked = true;
                else
                    MultiLineNo.Checked = true;

                tbWidth.Text	= dr["Width"].ToString();
                tbHeight.Text	= dr["Height"].ToString();
                tbPosition.Text = dr["Position"].ToString();
                tbExample.Text	= dr["Example"].ToString();

            }
            dr.Close();
            dr = null;
        }
예제 #59
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            // �ڴ˴������û������Գ�ʼ��ҳ��

            //�õ��û���
            UserName = Request.Cookies["UserName"].Value.ToString().ToLower();
            if(!Page.IsPostBack)
                Bangding();

            UDS.Components.DocumentFlow df =new UDS.Components.DocumentFlow();
            bManageFlow = df.GetAccessPermission(Request.Cookies["ActiveNodeID"]!=null?Int32.Parse(Request.Cookies["ActiveNodeID"].Value):0,UserName,4);
            df = null;
        }
예제 #60
0
 private void cmdDelete_Click(object sender, System.EventArgs e)
 {
     UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();
     df.DeleteStyleDescription(DescriptionID);
     tbFieldDescription.Text ="";
     tbWidth.Text = "450";
     tbHeight.Text = "20";
     tbPosition.Text  = "1";
     Bangding();
 }