Example #1
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");
                }
            }
        }
Example #2
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");
                }
            }
        }