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"); } } }
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('�Ƿ�ɾ�������̣�');"); }
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"); } } }
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('是否删除此流程?');"); }