public string finishedTask(string workflowID, string projectID, string finishedTaskID, string finishedFlag, string userID) { SqlConnection conn = new SqlConnection(strConn); conn.Open(); SqlTransaction trans = conn.BeginTransaction(); try { WorkFlow WorkFlow = new WorkFlow(conn, ref trans); WorkFlow.finishedTask(workflowID, projectID, finishedTaskID, finishedFlag, userID); trans.Commit(); return "1"; } catch (WorkFlowErr errWf) { trans.Rollback(); return errWf.ErrMessage.ToString(); } catch (Exception e) { trans.Rollback(); return e.Message; } finally { conn.Close(); conn.Dispose(); } }
public override object Run(WorkFlowContext context, SearchMode mode, WorkFlow.Visitors.IVisitor visitor = null) { if (visitor == null) visitor = new DefaultVisitor(); Queue<string> fila = new Queue<string>(); List<string> mark = new List<string>(); fila.Enqueue(context.SourceState); mark.Add(context.SourceState); while (fila.Count != 0) { string statusfila = fila.Dequeue(); context.SourceState = statusfila; foreach (var item in this.GetActivities(context).OrderBy(x => x.Operation)) { context.Operation = item.Operation; string newstatus = this.GetNextStatus(context); visitor.Visit(statusfila, new Activity { Operation = item.Operation, Description = item.Description }, newstatus); if (!mark.Contains(newstatus)) { fila.Enqueue(newstatus); mark.Add(newstatus); } } } return visitor.EndVisit(); }
/// <summary> /// 新增 /// </summary> /// <returns>影响的行数</returns> public int Add(WorkFlow index) { return(dLWorkFlow.Add(index)); }
protected void Page_Load(object sender, EventArgs e) { switch (this.DoType) { case "DeleteFlow": string fk_flow = this.Request.QueryString["FK_Flow"]; Int64 workid = Int64.Parse(this.Request.QueryString["WorkID"]); try { WorkFlow wf = new WorkFlow(new Flow(fk_flow), workid); wf.DoDeleteWorkFlowByReal(true); } catch { } this.Session["info"] = "流程删除成功"; break; case "UnShift": try { WorkFlow mwf = new WorkFlow(this.FK_Flow, this.WorkID); string str = mwf.DoUnShift(); this.Session["info"] = str; } catch (Exception ex) { this.Session["info"] = "@执行撤消失败。@失败信息" + ex.Message; } break; case "UnSend": try { string str = BP.WF.Dev2Interface.Flow_DoUnSend(this.FK_Flow, this.WorkID); this.Session["info"] = str; } catch (Exception ex) { this.Session["info"] = "@执行撤消失败。@失败信息" + ex.Message; } break; default: break; } string s = this.Session["info"] as string; this.Session["info"] = null; if (s == null) { s = this.Application["info" + WebUser.No] as string; } if (s == null) { s = Glo.SessionMsg; } if (s != null) { if (this.PageID.Contains("Small")) { this.Add("<br/>"); this.Add("<br/>"); } s = s.Replace("@@", "@"); s = s.Replace("@", "<BR>@"); this.Add("<div style='width:500px;text-align:center'>"); if (WebUser.IsWap) { this.AddFieldSet("<a href=Home.aspx ><img src='/WF/Img/Home.gif' border=0/>Home</a> - 操作提示", s); } else { this.AddFieldSet("操作提示", s); } this.Add("<br><br></div>"); return; } // string sql = "SELECT * FROM WF_EmpWorks WHERE FK_Emp='" + BP.Web.WebUser.No + "' AND FK_Flow='" + this.FK_Flow + "' ORDER BY WorkID "; DataTable dt = BP.WF.Dev2Interface.DB_GenerEmpWorksOfDataTable();// BP.DA.DBAccess.RunSQLReturnTable(sql); int colspan = 9; this.AddTable(" style='border=1px;align=center;width=80%;height:450px;"); this.AddCaption("待办工作"); this.AddTR(); this.AddTDTitle("ID"); this.AddTDTitle("流程"); this.AddTDTitle("节点"); this.AddTDTitle("标题"); this.AddTDTitle("发起"); this.AddTDTitle("发起日期"); this.AddTDTitle("接受日期"); this.AddTDTitle("期限"); this.AddTDTitle("状态"); this.AddTREnd(); int i = 0; bool is1 = false; DateTime cdt = DateTime.Now; foreach (DataRow dr in dt.Rows) { string sdt = dr["SDT"] as string; is1 = this.AddTR(is1); // ("onmouseover='TROver(this)' onmouseout='TROut(this)' onclick=\"\" "); i++; this.AddTDIdx(i); this.AddTD(dr["FlowName"].ToString()); this.AddTD(dr["NodeName"].ToString()); this.AddTD("<a href=\"MyFlow.aspx?FK_Flow=" + dr["FK_Flow"] + "&FID=" + dr["FID"] + "&WorkID=" + dr["WorkID"] + "\" >" + dr["Title"].ToString()); this.AddTD(dr["Starter"].ToString()); this.AddTD(dr["RDT"].ToString()); this.AddTD(dr["ADT"].ToString()); this.AddTD(dr["SDT"].ToString()); DateTime mysdt = DataType.ParseSysDate2DateTime(sdt); if (cdt >= mysdt) { this.AddTD("<font color=red>逾期</font>"); } else { this.AddTD("正常"); } this.AddTREnd(); } this.AddTRSum(); this.AddTD("colspan=" + colspan, " "); this.AddTREnd(); this.AddTableEnd(); }
/// <summary> /// Fetch PreOrder Data based on the dropdown selection /// </summary> private void GetDatabyDate_Project_Buyer_PMDL() { objWorkFlow = new WorkFlow(); DataTable dt = new DataTable(); DataTable dtAllReceiptStatus = new DataTable(); if (ddlProjectFrom.SelectedValue != "Select" && ddlProjectTo.SelectedValue != "Select") { objWorkFlow.ProjectFrom = ddlProjectFrom.SelectedValue; objWorkFlow.ProjectTo = ddlProjectTo.SelectedValue; } else { objWorkFlow.ProjectFrom = ""; objWorkFlow.ProjectTo = "ZZZZZZ"; } if (ddlBuyerFrom.SelectedValue != "Select" && ddlBuyerTo.SelectedValue != "Select") { objWorkFlow.BuyerFrom = ddlBuyerFrom.SelectedValue; objWorkFlow.BuyerTo = ddlBuyerTo.SelectedValue; } else { objWorkFlow.BuyerFrom = "00000"; objWorkFlow.BuyerTo = "99999"; } if (ddlPMDLDocFrom.SelectedValue != "Select" && ddlPMDLDocTo.SelectedValue != "Select") { if (ddlPMDLDocFrom.SelectedValue.Contains(",") || ddlPMDLDocTo.SelectedValue.Contains(",")) { if (ddlPMDLDocFrom.SelectedValue.Contains(",")) { string[] PMDLFrom = ddlPMDLDocFrom.SelectedValue.Split('\''); objWorkFlow.PMDLFrom = PMDLFrom[0]; } else { objWorkFlow.PMDLFrom = ddlPMDLDocFrom.SelectedValue; } if (ddlPMDLDocFrom.SelectedValue.Contains(",")) { string[] PMDLTo1 = ddlPMDLDocTo.SelectedValue.Split(','); string[] PMDLTo = PMDLTo1[PMDLTo1.Length - 1].Split('\''); objWorkFlow.PMDLTo = PMDLTo[1]; } else { objWorkFlow.PMDLTo = ddlPMDLDocFrom.SelectedValue; } } else { objWorkFlow.PMDLFrom = ddlPMDLDocFrom.SelectedValue; objWorkFlow.PMDLTo = ddlPMDLDocTo.SelectedValue; } } else { objWorkFlow.PMDLFrom = ""; objWorkFlow.PMDLTo = "ZZZZZZ"; } if (txtDateFrom.Text != "" && txtDateTo.Text != "") { objWorkFlow.DateFrom = txtDateFrom.Text; objWorkFlow.DateTo = txtDateTo.Text; dt = objWorkFlow.GetPreOrderDocumentTracking_byProject_Buyer_Date_PMDL(); } else { dt = objWorkFlow.GetPreOrderDocumentTracking_byProject_Buyer_PMDL(); } foreach (DataRow dr in dt.Rows) { if (dr["ReceiptNo"].ToString() != null && dr["ReceiptNo"].ToString() != "") { string sReceiptNumber = dr["ReceiptNo"].ToString(); string ReceiptStatus = objWorkFlow.GetReceiptStatus(sReceiptNumber); dr["ReceiptStatus"] = ReceiptStatus; } } if (dt.Rows.Count > 0) { gvData.Visible = true; lblChild.Visible = true; lblParent.Visible = true; lblNoRecord.Visible = false; gvData.DataSource = dt; gvData.RowDataBound += new GridViewRowEventHandler(gvData_RowDataBound); gvData.DataBind(); } else { gvData.Visible = false; lblChild.Visible = false; lblParent.Visible = false; lblNoRecord.Visible = true; } }
private void StepInit(string stepID) { XPathNavigator mainSourceNav = this.MainDataSource.CreateNavigator(); WorkFlow wf = new WorkFlow(); string currUser = System.Environment.UserName.ToLower(); string parammsStr = String.Format("<Parametrs><Param Name='CurrentUser'>{0}</Param></Parametrs>", currUser); XmlNode stepNode = wf.GetSteps( _xmlFileConfigUrl, parammsStr, "1", "1", stepID ); DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/ReadAccess").SetValue("0"); if (stepNode.SelectSingleNode("CurrentStep/Read/Users").InnerText.Contains(currUser)) { DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/ReadAccess").SetValue("1"); } if (stepNode.SelectSingleNode("CurrentStep/Save/Users").InnerText.Contains(currUser)) { DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/ReadAccess").SetValue("0"); } }
public void Initialize() { Instance = new WorkFlow<object>(State); }
public void Create(WorkFlow workflow) { _workFlowRepository.Add(workflow); _unitOfWork.Commit(); }
protected void btnSendEnquiry_Click(object sender, EventArgs e) { WorkFlow objWorkFlow = new WorkFlow(); objWorkFlow.WFID = Convert.ToInt32(Request.QueryString["WFID"]); DataTable dt1 = objWorkFlow.GetWFById(); objWorkFlow.Parent_WFID = Convert.ToInt32(dt1.Rows[0]["Parent_WFID"]); objWorkFlow.WF_Status = "Enquiry For Techno Commercial Negotiation Completed"; objWorkFlow.Project = dt1.Rows[0]["Project"].ToString().Substring(0, 6); //int res = objWorkFlow.UpdateEnquiryRaised(); int res = objWorkFlow.UpdateTechnoCommercialNegotiationCompleted(); objWorkFlow.UpdateWF_StatusInBAANTable();// Dump Preorder Data TO BAAN table change 25/08/2018 sagar if (res > 0) { InsertPreHistory(Convert.ToInt32(Request.QueryString["WFID"]), "Enquiry For Techno Commercial Negotiation Completed"); } #region ERP Transaction Update for Control Tower //if (Request.QueryString["Status"] == "Enquiry Raised" || Request.QueryString["Status"] == "Technical offer Received") // { objWorkFlow.TransactionDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); objWorkFlow.BusinessObjectHandle = "CT_RFQCOMMERCIALFINALISED"; objWorkFlow.IndexValue = (Request.QueryString["WFID"]).ToString(); int SerialNoCount = objWorkFlow.GetSerialNumber(); SerialNoCount++; objWorkFlow.SLNO_WFID = SerialNoCount; string[] Project = txtProject.Text.Split('-'); objWorkFlow.Project = Project[0]; string[] Element = txtElement.Text.Split('-'); objWorkFlow.Element = Element[0]; objWorkFlow.UserId = Request.QueryString["u"]; int nRecordInserted = objWorkFlow.InsertPreOrderDatatoControlTower(); if (nRecordInserted > 0) { // for each PMDL doc insert a new record ( Sagar new change 11-July-2018) // 2 ways- comma seperated substring or select PMDLDoc for given WFID from WF1_PreOrderPMDL table //and loop through each PMDL doc. int DetailSerialNoCount = 0; DataTable dtPMDL = objWorkFlow.GetMultiPMDL(hdfParentWFID.Value); if (dtPMDL.Rows.Count > 0) { foreach (DataRow dr in dtPMDL.Rows) { DetailSerialNoCount = objWorkFlow.GetDetailSerialNumber(); DetailSerialNoCount++; objWorkFlow.DetailSerialCount = DetailSerialNoCount; objWorkFlow.PMDLdocDesc = dr["PMDLDocNo"].ToString(); DataTable dt = objWorkFlow.GetPartItemCount_Weight(); if (dt.Rows.Count > 0) { if (dt.Rows[0]["PartItemCount"].ToString() != "") { objWorkFlow.PartItemCount = (int)dt.Rows[0]["PartItemCount"]; } else { objWorkFlow.PartItemCount = 0; } if (dt.Rows[0]["PartItenWeight"].ToString() != "") { objWorkFlow.PartItemWeight = (double)dt.Rows[0]["PartItenWeight"]; } else { objWorkFlow.PartItemWeight = 0; } } else { objWorkFlow.PartItemCount = 0; objWorkFlow.PartItemWeight = 0; } objWorkFlow.InsertPreOrderDatatoControlTowerChildTable(); //if (Request.QueryString["Status"] == "Technical offer Received") //{ double nTechnoComNegotiationrawingCount = 0; double nTotalDrawingCount = 0; double nTotalChildRecordCount = 0; double nTechnoCommNegotiationWeight = 0; double nTotalWeight = 0; double nQualifiedforTechnoCommercial = 0; double nTechnoCommercialChildRecordCount = 0; string PMDLDocs = ""; string PMDLDocuments = ""; string PMDLDocNo = ""; double percentageTechnoCommercial_byCount; double percentageTechnoCommercial_byWeight; DataTable dataTable1 = objWorkFlow.GetTechnoCommercialItemReference(); objWorkFlow.ItemReference = (string)dataTable1.Rows[0]["t_iref"]; string Itemref_Typ = objWorkFlow.GetItemRefType(); if (dataTable1.Rows[0]["TechnoCommercialDate"].ToString() == "01-01-1970" || dataTable1.Rows[0]["TechnoCommercialDate"].ToString() == "01-01-1900") { string CurrentDate = DateTime.Now.ToString("yyyy-MM-dd"); // objWorkFlow.UpdateTechnoCommercialDate(CurrentDate); objWorkFlow.UpdateTechnoCommercialNegotiationDate(CurrentDate); } DataTable dtPMDLDoc = objWorkFlow.GetPMDLFromItemRef(); if (dtPMDLDoc.Rows.Count > 0) { for (int i = 0; i < dtPMDLDoc.Rows.Count; i++) { if (i == 0) { PMDLDocs = "'" + dtPMDLDoc.Rows[0]["t_docn"].ToString() + "'"; } else { PMDLDocs += ",'" + dtPMDLDoc.Rows[i]["t_docn"].ToString() + "'"; } } } DataTable dtPMDLDocForTechnoCommNegotiation = objWorkFlow.GetPMDLDocForTechnoCommNegotiation(); if (dtPMDLDocForTechnoCommNegotiation.Rows.Count > 0) { for (int i = 0; i < dtPMDLDocForTechnoCommNegotiation.Rows.Count; i++) { if (i == 0) { PMDLDocuments = "'" + dtPMDLDocForTechnoCommNegotiation.Rows[0]["t_docn"].ToString() + "'"; } else { PMDLDocuments += ",'" + dtPMDLDocForTechnoCommNegotiation.Rows[i]["t_docn"].ToString() + "'"; } } } int nWFID = objWorkFlow.WFID; objWorkFlow.WFID = objWorkFlow.Parent_WFID; DataTable dtStatus = objWorkFlow.GetWFById(); string sCurrentWFID_Status = dtStatus.Rows[0]["WF_Status"].ToString(); DataTable dtPMDLbyWFID = objWorkFlow.GetPMDLbyWFID(); objWorkFlow.WFID = nWFID; if (dtPMDLbyWFID.Rows.Count > 0) { for (int i = 0; i < dtPMDLbyWFID.Rows.Count; i++) { if (i == 0) { PMDLDocNo = "'" + dtPMDLbyWFID.Rows[0]["PMDLDocNo"].ToString() + "'"; } else { PMDLDocNo += ",'" + dtPMDLbyWFID.Rows[i]["PMDLDocNo"].ToString() + "'"; } } } nTechnoCommNegotiationWeight = objWorkFlow.GetTotalWeight(PMDLDocNo); nTotalWeight = objWorkFlow.GetTotalWeight(); nTechnoComNegotiationrawingCount += objWorkFlow.GetTechnoComNegotiationrawingCount(PMDLDocNo); nTotalDrawingCount = objWorkFlow.GeTotalDrawingCount(); // nQualifiedforTechnoCommercial += objWorkFlow.GetQualifiedforTechnoCommercialCount(); if (sCurrentWFID_Status == "All Offer Received") { nTotalChildRecordCount = objWorkFlow.GetTotalChildRecordCount_AllOfferReceived(PMDLDocNo); } else { nTotalChildRecordCount = objWorkFlow.GetTotalChildRecordCount(PMDLDocNo); } //3 nTechnoCommercialChildRecordCount += objWorkFlow.GetTechnoCommercialChildRecordCount(PMDLDocs); //4 objWorkFlow.UpdateTechnoCommercialCount(nTechnoCommercialChildRecordCount); double Technicalvettingpercentage = objWorkFlow.GetTechnicalvettingpercentage(); if (nTotalChildRecordCount != 0 && nTotalDrawingCount != 0) { percentageTechnoCommercial_byCount = Math.Round((nTechnoCommercialChildRecordCount / nTotalChildRecordCount) * (nTechnoComNegotiationrawingCount / nTotalDrawingCount) * 100, 2); } else { percentageTechnoCommercial_byCount = 0; } //percentageTechnoCommercial_byWeight if (nTotalWeight != 0 && nTotalDrawingCount != 0) { // percentageTechnoCommercial_byWeight = Math.Round((nTechnoCommNegotiationWeight / nTotalWeight) * (nTechnoComNegotiationrawingCount / nTotalDrawingCount)*100, 2); percentageTechnoCommercial_byWeight = Math.Round((nTechnoCommNegotiationWeight / nTotalWeight) * (nTechnoCommercialChildRecordCount / nTotalChildRecordCount) * 100, 2); } else { percentageTechnoCommercial_byWeight = 0; } objWorkFlow.InsertIntoItemReferencewiseProgressTable(percentageTechnoCommercial_byWeight, percentageTechnoCommercial_byCount); //DataTable dtPercentage = objWorkFlow.GetTechnoComNegotiationPercentagebyCount_Weight(); DataTable dtPercentage = new DataTable(); if (sCurrentWFID_Status == "All Offer Received") { dtPercentage = objWorkFlow.GetPercentagebyCount_Weight_AllOfferReceievd(); } else { dtPercentage = objWorkFlow.GetPercentagebyCount_Weight(); } double percentage_byCount = 0; double percentage_byWeight = 0; if (dtPercentage.Rows.Count > 0) { foreach (DataRow dr2 in dtPercentage.Rows) { objWorkFlow.Project = dr2["Project"].ToString(); objWorkFlow.ItemReference = dr2["ItemReference"].ToString(); //double percentage_byCount = Convert.ToDouble(dr2["CountPercentage"]); //double percentage_byWeight = Convert.ToDouble(dr2["WeightPercentage"]); percentage_byCount += Convert.ToDouble(dr2["CountPercentage"]); percentage_byWeight += Convert.ToDouble(dr2["WeightPercentage"]); } } if (percentage_byCount < 100.00 && percentage_byWeight < 100.00) { if ((percentage_byCount >= percentage_byWeight)) { objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount); } else { if (Itemref_Typ == "4") // when item reference typ=="Self Engineered" { objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byWeight); } else { objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount); } } } else { if (percentage_byCount >= 100) { objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(100); } else { objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount); } } // } //} //if (percentageTechnoCommercial_byCount>= 100.00 || percentageTechnoCommercial_byWeight>=100.00) //{ // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(100); //} //else if ((percentageTechnoCommercial_byCount >= percentageTechnoCommercial_byWeight)) //{ // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentageTechnoCommercial_byCount); //} //else //{ // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentageTechnoCommercial_byWeight); //} // objWorkFlow.UpdateTechnoCommercialpercentage(percentageTechnoCommercial_byCount); DateTime MinTechnoCommecrialDate = objWorkFlow.GetMinTechnoCommecrialDate(); if (MinTechnoCommecrialDate != default(DateTime)) { string OfferReceieveDate = MinTechnoCommecrialDate.ToString("yyyy-MM-dd hh:mm:ss"); objWorkFlow.UpdateTechnoCommercialDate(OfferReceieveDate); } } } else { Response.Redirect("RaisedEnquiry.aspx?u=" + Request.QueryString["u"] + "&WFPID=" + hdfParentWFID.Value); } #endregion //if (Request.QueryString["Status"] == "Enquiry Raised") //{ // Response.Redirect("EnquiryInProcess.aspx?u=" + Request.QueryString["u"]); //} //if (Request.QueryString["Status"] == "Technical offer Received" || Request.QueryString["Status"] == "Commercial offer Received") //{ // Response.Redirect("RaisedEnquiry.aspx?u=" + Request.QueryString["u"] + "&WFPID=" + Request.QueryString["WFPID"]); //} //if (Request.QueryString["Status"] == "Isgec Comment Submitted") //{ // Response.Redirect("ReleaseComments.aspx?u=" + Request.QueryString["u"]); //} // ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('" + Request.QueryString["Status"] + "');", true); } Response.Redirect("RaisedEnquiry.aspx?u=" + Request.QueryString["u"] + "&WFPID=" + hdfParentWFID.Value); }
public void ScanBarcode(Sender sender, string Barcode, Guid WorkShiftID, Guid WorkFlowID) { try { using (ObjectProxy op = new ObjectProxy(true)) { WorkFlow wf = new WorkFlow(); wf.WorkFlowID = WorkFlowID; //if (op.LoadWorkFlowByWorkFlowID(wf) == 0) //{ // throw new PException("工序代码【{0}】无效或不存在", WorkFlowID); //} OrderDetail orderDetail = new OrderDetail(); orderDetail.BarcodeNo = Barcode; if (op.LoadOrderDetailByBarcodeNo(orderDetail) == 0) { throw new PException("板件条码【{0}】无效", Barcode); } Order order = new Order(); order.OrderID = orderDetail.OrderID; if (op.LoadOrder(order) == 0) { throw new PException("板件条码【{0}】无效", Barcode); } //if (order.ManufactureDate == DateTime.MinValue) //{ // order.ManufactureDate = DateTime.Now; // order.Status = "P"; // op.UpdateOrderByOrderID(order); //订单开始生产日期 //} //判断当前板件是否需要经过当前工序 OrderWorkFlow ow = new OrderWorkFlow(); ow.ItemID = orderDetail.ItemID; ow.SourceWorkFlowID = WorkFlowID; if (op.LoadOrderWorkFlowByItemID_SourceWorkFlowID(ow) == 0) { throw new PException("板件条码【{0}】不需要经过此生产工序", Barcode); } //判断是否已经全部扫描 int Qty = op.CountOrderMadeStatesByBarcode_WorkFlowID(Barcode, WorkFlowID); if (Qty >= ow.TotalQty) { throw new PException("板件条码【{0}】在此工序中已经全部扫描,请检查是否重复扫描。", Barcode); } OrderMadeState orderMS = new OrderMadeState(); orderMS.DetailID = Guid.NewGuid(); orderMS.OrderID = orderDetail.OrderID; orderMS.ItemID = orderDetail.ItemID; orderMS.Barcode = orderDetail.BarcodeNo; orderMS.CabinetID = orderDetail.CabinetID; orderMS.MadeHeight = orderDetail.MadeHeight; orderMS.MadeLength = orderDetail.MadeLength; orderMS.MadeWidth = orderDetail.MadeHeight; //orderMS.PaymentType = wf.PaymentType; //orderMS.Price = wf.Price; orderMS.Qty = 1; orderMS.WorkFlowID = wf.WorkFlowID; orderMS.WorkShiftID = WorkShiftID; orderMS.Processed = DateTime.Now; orderMS.ProcessedBy = sender.UserCode; op.InsertOrderMadeState(orderMS); OrderWorkFlow owf = new OrderWorkFlow(); owf.ItemID = orderDetail.ItemID; owf.SourceWorkFlowID = WorkFlowID; if (op.LoadOrderWorkFlowByItemID_SourceWorkFlowID(owf) != 0) { owf.MadeQty += 1; op.UpdateOrderWorkFlowByItemID_SourceWorkFlowID(owf); } OrderScheduling os = new OrderScheduling(); os.CabinetID = orderDetail.CabinetID; os.WorkFlowID = WorkFlowID; if (op.LoadOrderSchedulingByCabinetID_WorkFlowID(os) != 0) { if (os.MadeStarted == DateTime.MinValue) { //生产开始时间 os.MadeStarted = DateTime.Now; } os.MadeTotalQty += 1; os.MadeTotalAreal += orderDetail.MadeLength * orderDetail.MadeWidth * 0.000001M; os.MadeTotalLength += (orderDetail.MadeLength + orderDetail.MadeWidth) * 2 * 0.001M; if (os.MadeTotalQty == os.TotalQty) { //生产结束时间 os.MadeEnded = DateTime.Now; } op.UpdateOrderSchedulingByMadeID(os); } op.CommitTransaction(); } } catch (Exception ex) { PLogger.LogError(ex); throw ex; } }
public void UpdateWorkFlow(WorkFlow workflow) { workflow.Updated = DateTime.Now; projectRepository.UpdateWorkFlow(workflow); UpdateTrackingSequence(workflow); }
public CadastroDeFornecedor(Fornecedor fornecedor, Solicitacao solicitacao, WorkFlow fluxo) { Fornecedor = fornecedor; Solicitacao = solicitacao; Fluxo = fluxo; }
public UnitTest1() { var 立项申请 = new DataReport(Guid.Parse("3C50B6B4-5F15-4F76-A63C-1C3505286F61"), "立项申请", "表单" , "立项申请预览视图", "立项申请主界面", DataReportStatus.UnCommit); var 项目开发通知书 = new DataReport(Guid.Parse("0824D4E9-2508-40EE-AE3D-B554DF8531AF"), "项目开发通知书", "表单" , "项目开发通知书预览视图", "项目开发通知书主界面", DataReportStatus.UnCommit); var 开发任务书 = new DataReport(Guid.Parse("B9EC8360-1A27-41C0-98FA-97AD4B9E11FA"), "开发任务书", "表单" , "开发任务书预览视图", "开发任务书主界面", DataReportStatus.UnCommit); var 草案设计 = new DataReport(Guid.Parse("DB3964BA-C8B0-420E-BA66-CD202D673EAF"), "草案设计", "表单" , "草案设计预览视图", "草案设计主界面", DataReportStatus.UnCommit); var 寿命模拟 = new DataReport(Guid.Parse("6205156A-082B-4B8E-B117-659DD052C275"), "寿命模拟", "表单" , "寿命模拟预览视图", "寿命模拟主界面", DataReportStatus.UnCommit); var 测试任务 = new DataReport(Guid.Parse("FDF72E38-903B-46DE-A7EA-A54A9E54E036"), "测试任务", "表单" , "测试任务预览视图", "测试任务主界面", DataReportStatus.UnCommit); var 外观确认报表 = new DataReport(Guid.Parse("45F89F96-84C5-4F4B-99C0-6E52D6DDD877"), "外观确认报表", "表单" , "外观确认报表预览视图", "外观确认报表主界面", DataReportStatus.UnCommit); var 光电参数报告 = new DataReport(Guid.Parse("136005C9-ECAF-4A35-9D75-9DCDA67DD7C4"), "光电参数报告", "表单" , "光电参数报告预览视图", "光电参数报告主界面", DataReportStatus.UnCommit); var T25温升测试报告 = new DataReport(Guid.Parse("019E4970-B7A2-4E8F-8EE0-009B1CA0B78B"), "T25温升测试报告", "表单" , "T25温升测试报告预览视图", "T25温升测试报告主界面", DataReportStatus.UnCommit); var TIS温度测试报告 = new DataReport(Guid.Parse("DBC04FF4-74EC-4425-9897-77F811819E8D"), "TIS温度测试报告", "表单" , "TIS温度测试报告预览视图", "TIS温度测试报告主界面", DataReportStatus.UnCommit); var H100稳态测试报告 = new DataReport(Guid.Parse("3835C5E2-5BFC-4FC9-8AEC-0CC2EC5B4193"), "H100稳态测试报告", "表单" , "H100稳态测试报告预览视图", "H100稳态测试报告主界面", DataReportStatus.UnCommit); var 样品破坏新能测试报告 = new DataReport(Guid.Parse("7DCB762F-A1D7-4AAD-BCFA-C41A89DED261"), "样品破坏新能测试报告", "表单" , "样品破坏新能测试报告预览视图", "样品破坏新能测试报告主界面", DataReportStatus.UnCommit); var T40W6光衰测试报告 = new DataReport(Guid.Parse("5D106D28-CDDC-4091-816B-67F356B2CF66"), "T40W6光衰测试报告", "表单" , "T40W6光衰测试报告预览视图", "T40W6光衰测试报告主界面", DataReportStatus.UnCommit); var T40W12光衰测试报告 = new DataReport(Guid.Parse("3EF548AF-AF6E-411E-A4C5-15ED6DDE1416"), "T40W12光衰测试报告", "表单" , "T40W12光衰测试报告预览视图", "T40W12光衰测试报告主界面", DataReportStatus.UnCommit); var 商品命名 = new DataReport(Guid.Parse("541332A9-6C2E-46C6-AA61-B899FF95BCC2"), "商品命名", "表单" , "商品命名预览视图", "商品命名主界面", DataReportStatus.UnCommit); var 物料清单编制 = new DataReport(Guid.Parse("2A90394C-E1D6-4177-B196-DB88671F131A"), "物料清单编制", "表单" , "物料清单编制预览视图", "物料清单编制主界面", DataReportStatus.UnCommit); var 零部件图片上传 = new DataReport(Guid.Parse("B3BD4021-738A-45E2-A910-B6248AF174DF"), "零部件图片上传", "表单" , "零部件图片上传预览视图", "零部件图片上传主界面", DataReportStatus.UnCommit); var 来料及成品检验上传 = new DataReport(Guid.Parse("BF5D0D23-D2E2-4BA9-B251-8F067F4193EB"), "来料及成品检验上传", "表单" , "来料及成品检验上传预览视图", "来料及成品检验上传主界面", DataReportStatus.UnCommit); var 销售资料上传 = new DataReport(Guid.Parse("9030CC6A-DE11-4994-9F69-9E039CA7FBFB"), "销售资料上传", "表单" , "销售资料上传预览视图", "销售资料上传主界面", DataReportStatus.UnCommit); var 产品规格书 = new DataReport(Guid.Parse("113901D3-AFF4-430F-A1A3-F5C40515FA24"), "产品规格书", "表单" , "产品规格书预览视图", "产品规格书主界面", DataReportStatus.UnCommit); dataReports.AddRange(new DataReport[] { 立项申请, 项目开发通知书, 开发任务书, 草案设计, 寿命模拟, 测试任务, 外观确认报表, 光电参数报告, T25温升测试报告, TIS温度测试报告, H100稳态测试报告, 样品破坏新能测试报告, T40W6光衰测试报告, T40W12光衰测试报告, 商品命名, 物料清单编制, 零部件图片上传, 来料及成品检验上传, 销售资料上传, 产品规格书, }); var 项目可行性论证报告 = new ReviewReport(Guid.Parse("EC3F742D-AFA6-420C-9180-2785BA0A823A"), "项目可行性论证报告", "评审" , "项目可行性论证报告预览视图", "项目可行性论证报告主界面", DataReportType.Serial, ReviewReportStatus.Pending, false, dataReports.Where(p => p.Name.Equals("立项申请")).ToList()); var 技术方案论证报告 = new ReviewReport(Guid.Parse("90EC9D9C-7C70-4650-87B3-5A6319A56452"), "技术方案论证报告", "评审" , "技术方案论证报告预览视图", "技术方案论证报告主界面", DataReportType.Serial, ReviewReportStatus.Pending, false, dataReports.Where(p => p.Name.Equals("寿命模拟")).ToList()); var 产品性能及定性评审 = new ReviewReport(Guid.Parse("86B8FCD0-DA9E-41FD-AAA8-C8E9F16DE73A"), "产品性能及定性评审", "评审" , "产品性能及定性评审预览视图", "产品性能及定性评审主界面", DataReportType.Parallel, ReviewReportStatus.Pending, true, dataReports.Where(p => p.Name.Equals("外观确认报表") || p.Name.Equals("光电参数报告") || p.Name.Equals("T25温升测试报告") || p.Name.Equals("TIS温度测试报告")).ToList()); var 一阶段性能评审 = new ReviewReport(Guid.Parse("90EC9D9C-7C70-4650-87B3-5A6319A56452"), "一阶段性能评审", "评审" , "一阶段性能评审预览视图", "一阶段性能评审主界面", DataReportType.Parallel, ReviewReportStatus.Pending, false, dataReports.Where(p => p.Name.Equals("H100稳态测试报告") || p.Name.Equals("样品破坏新能测试报告")).ToList()); var 二阶段性能评审 = new ReviewReport(Guid.Parse("6DCE7736-70A2-4848-ACF7-388F2F49732C"), "二阶段性能评审", "评审" , "二阶段性能评审预览视图", "二阶段性能评审主界面", DataReportType.Parallel, ReviewReportStatus.Pending, false, dataReports.Where(p => p.Name.Equals("T40W6光衰测试报告")).ToList()); var 综合性能评审 = new ReviewReport(Guid.Parse("11C27E8F-C3B5-4F6F-8915-DF31C2AA13D7"), "综合性能评审", "评审" , "综合性能评审预览视图", "综合性能评审主界面", DataReportType.Parallel, ReviewReportStatus.Pending, false, dataReports.Where(p => p.Name.Equals("T40W12光衰测试报告")).ToList()); var 资料评审 = new ReviewReport(Guid.Parse("FAD8FA27-3F9B-4643-9B09-271B476296CE"), "资料评审", "评审" , "资料评审预览视图", "资料评审主界面", DataReportType.Parallel, ReviewReportStatus.Pending, false, dataReports.Where(p => p.Name.Equals("零部件图片上传") || p.Name.Equals("来料及成品检验上传") || p.Name.Equals("销售资料上传") || p.Name.Equals("产品规格书")) .ToList()); reviewReports.AddRange(new ReviewReport[] { 项目可行性论证报告, 技术方案论证报告, 产品性能及定性评审, 一阶段性能评审, 二阶段性能评审, 综合性能评审, 资料评审 }); var 决策 = new WorkFlow(Guid.Parse("5EAE9517-12AC-474D-81AB-401B78A24101") , "决策", Guid.Parse("0A9DEBFE-CFEF-43A5-9C21-E263BA682126") , new List <IWorkTask> { 立项申请, 项目可行性论证报告 }); var 设计前准备 = new WorkFlow(Guid.Parse("DC65EFB1-D802-4E5E-951D-3F340044608D") , "设计前准备", Guid.Parse("A963D7E8-3A1C-4192-8914-D36950AF5043") , new List <IWorkTask> { 项目开发通知书, 开发任务书 }); var 方案设计 = new WorkFlow(Guid.Parse("9A3827EA-0A70-492C-A27F-5DAAEC74256C") , "方案设计", Guid.Parse("41467A9D-331D-4815-81F8-68492CBF9057") , new List <IWorkTask> { 草案设计, 技术方案论证报告 }); var 方案验证 = new WorkFlow(Guid.Parse("4B28A1C5-150D-4C4D-AB60-6967BBEE025C") , "方案验证", Guid.Parse("CCFE6FE2-D7BF-4D25-9E86-77328E12B6C4") , new List <IWorkTask> { 测试任务, 产品性能及定性评审, 一阶段性能评审, 二阶段性能评审, 综合性能评审 }); var 资料设计 = new WorkFlow(Guid.Parse("71D09EFC-F2A7-4C9D-AC7A-AC097704F8C1") , "资料设计", Guid.Parse("F1465D41-AD74-4AE4-89DC-A3E8FA656DE3") , new List <IWorkTask> { 商品命名, 资料评审 }); projectFlow = new ProjectFlow(Guid.Parse("C0A00706-E619-4F71-A8A2-77D3F7478F62"), "项目管理流程" , Guid.Parse("A19300A7-8D7F-4571-895B-A0DD1B035ED7"), new List <IWorkFlow> { 设计前准备, 方案设计, 方案验证, 资料设计 }); }
private void SetState() { try { this.Btn_ComeBackFlow.Enabled = false; this.Btn_DeleteFlowByFlag.Enabled = false; this.Btn_DeleteWFByRealReal.Enabled = false; this.Btn_StopWorkFlow.Enabled = false; Int64 workId = Int64.Parse(this.Request.QueryString["WorkID"]); //int nodeId=int.Parse(this.Request.QueryString["WorkID"]); string flowNo = this.Request.QueryString["FK_Flow"]; if (workId == 0) { this.Alert("@您没有选择流程,操作无效。", false); this.WinClose(); return; } WorkFlow wf = new WorkFlow(new Flow(flowNo), workId); if (wf.IsComplete) { this.Alert("@流程已经完成,操作无效。", false); this.WinClose(); return; } GenerWorkFlow gwf = new GenerWorkFlow(); //workId,flowNo gwf.WorkID = workId; gwf.FK_Flow = flowNo; if (gwf.IsExits == false) { wf.DoDeleteWorkFlowByReal(true); throw new Exception("系统出现错误,请与管理员联系:错误原因是当前的流程[" + flowNo + " id=" + workId + "],没有完成,但是流程表里已经不存在这此信息,此流程已经成为无效的流程,可能是测试信息,系统已经删除它。"); } else { gwf.Retrieve(); } if (gwf.WFState == WFState.Complete) { this.Alert("@流程已经完成,不能够对此操作.", false); this.WinClose(); return; } else if (gwf.WFState == 0) { this.Btn_DeleteFlowByFlag.Enabled = true; this.Btn_StopWorkFlow.Enabled = true; } else { throw new Exception("error "); } this.Label1.Text = "当前流程状态:" + gwf.WFState; Flow fl = new Flow(gwf.FK_Flow); //显示日志信息 StartWork sw = (StartWork)fl.HisStartNode.HisWork; sw.OID = workId; if (sw.IsExits == false) { gwf.Delete(); throw new Exception("@开始节点已经物理删除.流程出现错误, 此条流程已经失效, 请你关闭窗口返回系统,刷新记录."); } sw.Retrieve(); // 判断流程能不能够删除的权限. /* * 如果是 4 涉税审批流程. * 就让征收科室来处理, * 否则让mdg 处理. * */ if (fl.FK_FlowSort == "4") { /* 法征科 */ if (WebUser.FK_Dept == "000003") { this.Btn_DeleteWFByRealReal.Enabled = true; } } else { if (WebUser.FK_Dept == "000001") { this.Btn_DeleteWFByRealReal.Enabled = true; } } //this.UCWFRpt1.BindDataV2(wf); } catch (Exception ex) { this.Alert(ex); this.WinClose(); } }
private void Btn_Click_Click(object sender, System.EventArgs e) { string msg = ""; try { Int64 workId = Int64.Parse(this.Request.QueryString["WorkID"]); GenerWorkFlow gwf = new GenerWorkFlow(workId); WorkFlow wf = new WorkFlow(new Flow(gwf.FK_Flow), workId); BP.Web.Controls.ToolbarBtn btn = (BP.Web.Controls.ToolbarBtn)sender; string title, docs; switch (btn.ID) { case "Btn_StopWorkFlow": msg = "@终止流程出现错误.:"; // wf.DoStopWorkFlow(this.TB1.Text); // 发送消息到相关人员。 title = "强制终止[" + gwf.Title + "]流程通知"; docs = this.TB1.Text; //WFPubClass.SendMsg( new WorkNodes(gwf.HisFlow,workId),title,docs); this.ResponseWriteBlueMsg("@强制终止流程成功.并发送系统消息到流程上的相关人员。"); break; case "Btn_DeleteFlowByFlag": msg = "@逻辑删除流程出现错误.:"; // wf.DoDeleteWorkFlowByFlag(this.TB1.Text); // 发送消息到相关人员。 title = "逻辑删除[" + gwf.Title + "]流程通知"; docs = this.TB1.Text; // WFPubClass.SendMsg( new WorkNodes(gwf.HisFlow,workId),title,docs); this.ResponseWriteBlueMsg("@逻辑删除流程成功,并发送系统消息到流程上的相关人员."); break; case "Btn_ComeBackFlow": msg = "@恢复使用流程出现错误.:"; wf.DoComeBackWrokFlow(this.TB1.Text); // 发送消息到相关人员。 title = "恢复使用流程[" + gwf.Title + "]流程通知"; docs = this.TB1.Text; //WFPubClass.SendMsg( new WorkNodes(gwf.HisFlow,workId),title,docs); this.ResponseWriteBlueMsg("@恢复使用流程成功,并发送系统消息到流程上的相关人员"); break; case "Btn_DeleteWFByRealReal": msg = "@物理删除流程出现错误.:"; wf.DoDeleteWorkFlowByReal(true); // 发送消息到相关人员。 title = "物理删除[" + gwf.Title + "]流程通知"; docs = this.TB1.Text; this.ResponseWriteBlueMsg("@物理删除流程成功..."); this.WinClose(); break; case "Btn_Close": this.WinClose(); return; default: break; } this.SetState(); } catch (Exception ex) { BP.DA.Log.DefaultLogWriteLine(BP.DA.LogType.Error, msg + ex.Message); this.ResponseWriteRedMsg(msg + ex.Message); } }
/// <summary> /// 修改 /// </summary> /// <returns>影响的行数</returns> public int Update(WorkFlow index) { return(dLWorkFlow.Update(index)); }
private void InitOffice(bool isMenu) { bool isCompleate = false; BP.WF.Node node = new BP.WF.Node(); node.NodeID = int.Parse(this.FK_Node); node.RetrieveFromDBSources(); try { WorkFlow workFlow = new WorkFlow(node.FK_Flow, Int64.Parse(PKVal)); isCompleate = workFlow.IsComplete; } catch (Exception) { try { Flow fl = new Flow(node.FK_Flow); GERpt rpt = fl.HisGERpt; rpt.OID = Int64.Parse(PKVal); rpt.Retrieve(); if (rpt != null) { if (rpt.WFState == WFState.Complete) { isCompleate = true; } } } catch { } } if (!isCompleate) { try { isCompleate = !BP.WF.Dev2Interface.Flow_IsCanDoCurrentWork(node.FK_Flow, node.NodeID, Int64.Parse(PKVal), WebUser.No); //WorkFlow workFlow = new WorkFlow(node.FK_Flow, Int64.Parse(PKVal)); //isCompleate = !workFlow.IsCanDoCurrentWork(WebUser.No); } catch { } } FrmAttachment attachment = new FrmAttachment(); int result = 0; //表单编号与节点不为空 if (this.FK_MapData != null && this.FK_Node != null) { BP.En.QueryObject objInfo = new BP.En.QueryObject(attachment); objInfo.AddWhere(FrmAttachmentAttr.FK_MapData, this.FK_MapData); objInfo.addAnd(); objInfo.AddWhere(FrmAttachmentAttr.FK_Node, this.FK_Node); objInfo.addAnd(); objInfo.AddWhere(FrmAttachmentAttr.NoOfObj, this.NoOfObj); result = objInfo.DoQuery(); //result = attachment.Retrieve(FrmAttachmentAttr.FK_MapData, this.FK_MapData, // FrmAttachmentAttr.FK_Node, this.FK_Node, FrmAttachmentAttr.NoOfObj, this.DelPKVal); } if (result == 0) /*如果没有定义,就获取默认的.*/ { attachment.MyPK = this.FK_FrmAttachment; attachment.Retrieve(); } if (!isCompleate) { if (attachment.IsWoEnableReadonly) { ReadOnly = true; } if (attachment.IsWoEnableCheck) { IsCheck = true; } IsMarks = attachment.IsWoEnableMarks; } else { if (attachment.IsWoEnableReadonly) { ReadOnly = true; } } if (isMenu && !isCompleate) { #region 初始化按钮 if (attachment.IsWoEnableViewKeepMark) { divMenu.InnerHtml = "<select id='marks' onchange='ShowUserName()' style='width: 100px'><option value='1'>显示留痕</option><option value='2'>隐藏留痕</option><select>"; } if (attachment.IsWoEnableTemplete) { AddBtn("openTempLate", "打开模板", "OpenTempLate"); } if (attachment.IsWoEnableSave) { AddBtn("saveFile", "保存", "saveOffice"); } if (attachment.IsWoEnableRevise) { AddBtn("accept", "接受修订", "acceptOffice"); AddBtn("refuse", "拒绝修订", "refuseOffice"); } if (attachment.IsWoEnableOver) { AddBtn("over", "套红文件", "overOffice"); } if (attachment.IsWoEnableSeal) { AddBtn("seal", "签章", "sealOffice"); } if (attachment.IsWoEnableInsertFlow) { AddBtn("flow", "插入流程图", "InsertFlow"); } if (attachment.IsWoEnableInsertFlow) { AddBtn("fegnxian", "插入风险点", "InsertFengXian"); } #endregion } #region 初始化文件 FrmAttachmentDB downDB = new FrmAttachmentDB(); downDB.MyPK = this.DelPKVal; downDB.Retrieve(); fileName.Text = downDB.FileName; fileType.Text = downDB.FileExts; RealFileName = downDB.FileName; FileFullName = downDB.FileFullName; FileSavePath = attachment.SaveTo; #endregion }
protected void SaveNewRecord(object sender, DirectEventArgs e) { //Getting the id to check if it is an Add or an edit as they are managed within the same form. string count = e.ExtraParams["count"]; string obj = e.ExtraParams["values"]; WorkFlow b = JsonConvert.DeserializeObject <WorkFlow>(obj); string id = e.ExtraParams["id"]; // Define the object to add or edit as null if (string.IsNullOrEmpty(currentWorkFlowId.Text)) { try { //New Mode //Step 1 : Fill The object and insert in the store PostRequest <WorkFlow> request = new PostRequest <WorkFlow>(); request.entity = b; PostResponse <WorkFlow> r = _companyStructureRepository.ChildAddOrUpdate <WorkFlow>(request); //check if the insert failed if (!r.Success)//it maybe be another condition { //Show an error saving... X.MessageBox.ButtonText.Ok = Resources.Common.Ok; Common.errorMessage(r); return; } else { b.recordId = r.recordId; currentWorkFlowId.Text = r.recordId; //Add this record to the store this.Store1.Insert(0, b); //Display successful notification Notification.Show(new NotificationConfig { Title = Resources.Common.Notification, Icon = Icon.Information, Html = Resources.Common.RecordSavingSucc }); workSequenceStore.DataSource = new List <WorkSequence>(); workSequenceStore.DataBind(); workSequenceGrid.Disabled = false; } } catch (Exception ex) { //Error exception displaying a messsage box X.MessageBox.ButtonText.Ok = Resources.Common.Ok; X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorSavingRecord).Show(); } } else { //Update Mode try { //getting the id of the record PostRequest <WorkFlow> request = new PostRequest <WorkFlow>(); request.entity = b; request.entity.recordId = currentWorkFlowId.Text; PostResponse <WorkFlow> r = _companyStructureRepository.ChildAddOrUpdate <WorkFlow>(request); //Step 1 Selecting the object or building up the object for update purpose //Step 2 : saving to store //Step 3 : Check if request fails if (!r.Success)//it maybe another check { X.MessageBox.ButtonText.Ok = Resources.Common.Ok; Common.errorMessage(r); return; } else { Store1.Reload(); recordId.Text = currentWorkFlowId.Text; Notification.Show(new NotificationConfig { Title = Resources.Common.Notification, Icon = Icon.Information, Html = Resources.Common.RecordUpdatedSucc }); this.EditRecordWindow.Close(); } } catch (Exception ex) { X.MessageBox.ButtonText.Ok = Resources.Common.Ok; X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorUpdatingRecord).Show(); } } }
public void Visit(string status, WorkFlow.Entities.Activity activity, string newstatus) { string transition = string.Format("{0}--[{1}]-->{2} ", status, activity.Description, newstatus); transitions.Add(transition); }
public IHttpActionResult Add(WorkFlow Work) { AdbContext.WorkFlows.Add(Work); AdbContext.SaveChanges(); return(Ok()); }
//protected void OnRowCommand(object sender, GridViewCommandEventArgs e) //{ // //Get the Command Name. // string commandName = e.CommandName; // //Get the Row Index. // int rowIndex = Convert.ToInt32(e.CommandArgument); // //Get the Row reference in which Button was clicked. // GridViewRow row = gvData.Rows[rowIndex]; //} protected void btnClosed_Click(object sender, EventArgs e) { LinkButton btn = (LinkButton)sender; objWorkFlow = new WorkFlow(); objWorkFlow.WFID = Convert.ToInt32(btn.CommandArgument); objWorkFlow.UserId = Request.QueryString["u"]; objWorkFlow.WF_Status = "Commercial offer Finalized"; string PMDLDocNo = ""; int res = objWorkFlow.UpdateWF_Status(); objWorkFlow.UpdateWF_StatusInBAANTable(); // Dump Preorder Data TO BAAN table change 25/08/2018 sagar if (res > 0) { InsertPreHistory(Convert.ToInt32(btn.CommandArgument), "Commercial offer Finalized"); GetData(); // ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Commercial offer Finalized');", true); GridViewRow row = (btn.NamingContainer as GridViewRow); //Get the Row Index. int rowIndex = row.RowIndex; Label lProject = row.FindControl("Project") as Label; Label lElement = row.FindControl("Element") as Label; Label lPMDLDoc = row.FindControl("PMDLDocNo") as Label; string Project = ""; string Element = ""; string PMDLDoc = ""; double percentageTechOfferReceivedDrawing_byWeight = 0; double percentageTechOfferReceivedDrawing_byCount = 0; if (lProject != null) { Project = lProject.Text; } else { Project = ""; } if (lElement != null) { Element = lElement.Text; } else { Element = ""; } if (lPMDLDoc != null) { PMDLDoc = lPMDLDoc.Text; } else { PMDLDoc = ""; } // Convert.ToString(gvData.DataKeys[rowIndex].Values[2] // string Project = (gvData.Rows[rowIndex].Cells[2].Text).ToString(); //string Element = (gvData.Rows[rowIndex].Cells[3].Text).ToString(); //string PMDLDoc =(gvData.Rows[rowIndex].Cells[5].Text).ToString(); #region ERP Transaction Update for Control Tower // Change - 26 June 2018 -- ERP Transaction Update for Control Tower // Insert data into ttpisg229200 objWorkFlow.TransactionDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); objWorkFlow.BusinessObjectHandle = "CT_RFQCOMMERCIALFINALISED"; objWorkFlow.IndexValue = objWorkFlow.WFID.ToString(); //(Request.QueryString["WFID"]).ToString(); int SerialNoCount = objWorkFlow.GetSerialNumber(); SerialNoCount++; objWorkFlow.SLNO_WFID = SerialNoCount; string[] sProject = Project.Split('-'); objWorkFlow.Project = sProject[0]; string[] sElement = Element.Split('-'); objWorkFlow.Element = sElement[0]; objWorkFlow.UserId = Request.QueryString["u"]; int nRecordInserted = objWorkFlow.InsertPreOrderDatatoControlTower(); if (nRecordInserted > 0) { objWorkFlow.WFID = Convert.ToInt32(btn.CommandArgument); DataTable dt2 = objWorkFlow.GetWFById(); //objWorkFlow.Parent_WFID = Convert.ToInt32(dt2.Rows[0]["Parent_WFID"]); DataTable dtPMDL1 = objWorkFlow.GetMultiPMDL(objWorkFlow.WFID.ToString()); if (dtPMDL1.Rows.Count > 0) { foreach (DataRow dr2 in dtPMDL1.Rows) { long DetailSerialNoCount = objWorkFlow.GetDetailSerialNumber(); DetailSerialNoCount++; objWorkFlow.DetailSerialCount = DetailSerialNoCount; objWorkFlow.PMDLdocDesc = dr2["PMDLDocNo"].ToString(); //PMDLDoc.ToString(); DataTable dt = objWorkFlow.GetPartItemCount_Weight(); if (dt.Rows.Count > 0) { if (dt.Rows[0]["PartItemCount"].ToString() != "") { objWorkFlow.PartItemCount = (int)dt.Rows[0]["PartItemCount"]; } else { objWorkFlow.PartItemCount = 0; } if (dt.Rows[0]["PartItenWeight"].ToString() != "") { objWorkFlow.PartItemWeight = (double)dt.Rows[0]["PartItenWeight"]; } else { objWorkFlow.PartItemWeight = 0; } } else { objWorkFlow.PartItemCount = 0; objWorkFlow.PartItemWeight = 0; } objWorkFlow.InsertPreOrderDatatoControlTowerChildTable(); } } DataTable dtPMDL = objWorkFlow.GetMultiPMDL(Convert.ToInt32(btn.CommandArgument).ToString()); if (dtPMDL.Rows.Count > 0) { foreach (DataRow dr in dtPMDL.Rows) { objWorkFlow.PMDLdocDesc = dr["PMDLDocNo"].ToString(); DataTable dataTable = objWorkFlow.GetRaisedEnquiryDate(); objWorkFlow.ItemReference = (string)dataTable.Rows[0]["t_iref"]; // objWorkFlow.UpdateTechCommercialNegotiaitionpercentage();// Change in the logic date-14-09-2018 sagar objWorkFlow.WFID = Convert.ToInt32(btn.CommandArgument); DataTable dtPMDLbyWFID = objWorkFlow.GetPMDLbyWFID(); if (dtPMDLbyWFID.Rows.Count > 0) { for (int i = 0; i < dtPMDLbyWFID.Rows.Count; i++) { if (i == 0) { PMDLDocNo = "'" + dtPMDLbyWFID.Rows[0]["PMDLDocNo"].ToString() + "'"; } else { PMDLDocNo += ",'" + dtPMDLbyWFID.Rows[i]["PMDLDocNo"].ToString() + "'"; } } } double nTechnoComNegotiationrawingCount = objWorkFlow.GetTechnoComNegotiationrawingCount(PMDLDocNo); // double nTotalDrawingCount = objWorkFlow.GeTotalDrawingCount(); double nTotalDrawingCount = objWorkFlow.TechnoComNegotiation_ChildRecordCount(PMDLDocNo); double nTechnoComNegotiationDrawing_Weight = objWorkFlow.GetTechnoComNegotiationWeight(PMDLDocNo); double nTotalTechnoComNegotiation_Weight = objWorkFlow.GetTotalWeight(); if (nTotalDrawingCount != 0) { percentageTechOfferReceivedDrawing_byCount = Math.Round((nTechnoComNegotiationrawingCount / nTotalDrawingCount) * 100, 4); } if (nTotalTechnoComNegotiation_Weight != 0) { percentageTechOfferReceivedDrawing_byWeight = Math.Round((nTechnoComNegotiationDrawing_Weight / nTotalTechnoComNegotiation_Weight) * 100, 4); } objWorkFlow.BusinessObjectHandle = "CT_RFQCOMMERCIALFINALISED"; objWorkFlow.WF_Status = "Commercial offer Finalized"; objWorkFlow.Parent_WFID = objWorkFlow.WFID; objWorkFlow.InsertIntoItemReferencewiseProgressTable(percentageTechOfferReceivedDrawing_byWeight, percentageTechOfferReceivedDrawing_byCount); //DataTable dtPercentage = objWorkFlow.GetTechnoComNegotiationPercentagebyCount_Weight(); DataTable dtPercentage1 = objWorkFlow.GetPercentagebyCount_Weight(); objWorkFlow.BusinessObjectHandle = "CT_RFQOFFERECEIVED"; objWorkFlow.WF_Status = "Commercial offer Finalized"; objWorkFlow.Parent_WFID = objWorkFlow.WFID; objWorkFlow.InsertIntoItemReferencewiseProgressTable(percentageTechOfferReceivedDrawing_byWeight, percentageTechOfferReceivedDrawing_byCount); //DataTable dtPercentage = objWorkFlow.GetTechnoComNegotiationPercentagebyCount_Weight(); DataTable dtPercentage2 = objWorkFlow.GetPercentagebyCount_Weight(); double percentage_byCount_ComFinalized = 0; double percentage_byWeight_ComFinalized = 0; double percentage_byCount_OfferReceieved = 0; double percentage_byWeight_OfferReceieved = 0; string Itemref_Typ = objWorkFlow.GetItemRefType(); if (dtPercentage1.Rows.Count > 0) { foreach (DataRow dr1 in dtPercentage1.Rows) { objWorkFlow.Project = dr1["Project"].ToString(); objWorkFlow.ItemReference = dr1["ItemReference"].ToString(); //double percentage_byCount = Convert.ToDouble(dr1["CountPercentage"]); //double percentage_byWeight = Convert.ToDouble(dr1["WeightPercentage"]); percentage_byCount_ComFinalized += Convert.ToDouble(dr1["CountPercentage"]); percentage_byWeight_ComFinalized += Convert.ToDouble(dr1["WeightPercentage"]); } } if (dtPercentage2.Rows.Count > 0) { foreach (DataRow dr2 in dtPercentage2.Rows) { objWorkFlow.Project = dr2["Project"].ToString(); objWorkFlow.ItemReference = dr2["ItemReference"].ToString(); //double percentage_byCount = Convert.ToDouble(dr1["CountPercentage"]); //double percentage_byWeight = Convert.ToDouble(dr1["WeightPercentage"]); percentage_byCount_OfferReceieved += Convert.ToDouble(dr2["CountPercentage"]); percentage_byWeight_OfferReceieved += Convert.ToDouble(dr2["WeightPercentage"]); } } // since it is now being globally updated now commenting out local update. if (percentage_byCount_OfferReceieved < 100.00 && percentage_byWeight_ComFinalized < 100.00) { if ((percentage_byCount_OfferReceieved >= percentage_byWeight_OfferReceieved)) { objWorkFlow.BusinessObjectHandle = "CT_RFQOFFERECEIVED"; // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount_OfferReceieved); } else { if (Itemref_Typ == "4")// when item reference typ=="Self Engineered" { objWorkFlow.BusinessObjectHandle = "CT_RFQOFFERECEIVED"; //objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byWeight_OfferReceieved); } else { objWorkFlow.BusinessObjectHandle = "CT_RFQOFFERECEIVED"; // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount_OfferReceieved); } } } else { if (percentage_byCount_OfferReceieved >= 100) { objWorkFlow.BusinessObjectHandle = "CT_RFQOFFERECEIVED"; // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(100); } else { objWorkFlow.BusinessObjectHandle = "CT_RFQOFFERECEIVED"; // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount_OfferReceieved); } } if (percentage_byCount_ComFinalized < 100.00 && percentage_byWeight_ComFinalized < 100.00) { if ((percentage_byCount_ComFinalized >= percentage_byWeight_ComFinalized)) { objWorkFlow.BusinessObjectHandle = "CT_RFQCOMMERCIALFINALISED"; //objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount_ComFinalized); } else { if (Itemref_Typ == "4")// when item reference typ=="Self Engineered" { objWorkFlow.BusinessObjectHandle = "CT_RFQCOMMERCIALFINALISED"; // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byWeight_ComFinalized); } else { objWorkFlow.BusinessObjectHandle = "CT_RFQCOMMERCIALFINALISED"; //objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount_ComFinalized); } } } else { if (percentage_byCount_ComFinalized >= 100) { objWorkFlow.BusinessObjectHandle = "CT_RFQCOMMERCIALFINALISED"; // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(100); } else { objWorkFlow.BusinessObjectHandle = "CT_RFQCOMMERCIALFINALISED"; //objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount_ComFinalized); } } // } //objWorkFlow.UpdateTechnicalClearancepercentage(); // } } } else { } #endregion } else { ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Some technical issue');", true); } } }
protected void btnAllOfferReceieved_Click(object sender, EventArgs e) { LinkButton btn = (LinkButton)sender; objWorkFlow = new WorkFlow(); objWorkFlow.WFID = Convert.ToInt32(btn.CommandArgument); objWorkFlow.UserId = Request.QueryString["u"]; objWorkFlow.WF_Status = "All Offer Received"; int res = objWorkFlow.UpdateWF_Status(); objWorkFlow.UpdateWF_StatusInBAANTable(); // Dump Preorder Data TO BAAN table change 25/08/2018 sagar if (res > 0) { InsertPreHistory(Convert.ToInt32(btn.CommandArgument), "All Offer Received"); // GetData(); //ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Status Changed to All Offer Received');", true); } else { ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Some technical issue');", true); } DataTable dt12 = objWorkFlow.GetWFById(); if (dt12.Rows.Count > 0) { foreach (DataRow dr12 in dt12.Rows) { objWorkFlow.Project = dr12["Project"].ToString().Substring(0, 6); } } string WFID = objWorkFlow.WFID.ToString(); string PMDLDocNo = ""; string PMDLDocs = ""; DataTable dtPMDL = objWorkFlow.GetMultiPMDL(WFID); if (dtPMDL.Rows.Count > 0) { foreach (DataRow dr in dtPMDL.Rows) { objWorkFlow.PMDLdocDesc = dr["PMDLDocNo"].ToString(); DataTable dataTable = objWorkFlow.GetRaisedEnquiryDate(); if (dataTable.Rows.Count > 0) { objWorkFlow.ItemReference = (string)dataTable.Rows[0]["t_iref"]; string Itemref_Typ = objWorkFlow.GetItemRefType(); DataTable dtPMDLbyWFID = objWorkFlow.GetPMDLbyWFID(); if (dtPMDLbyWFID.Rows.Count > 0) { for (int i = 0; i < dtPMDLbyWFID.Rows.Count; i++) { if (i == 0) { PMDLDocNo = "'" + dtPMDLbyWFID.Rows[0]["PMDLDocNo"].ToString() + "'"; } else { PMDLDocNo += ",'" + dtPMDLbyWFID.Rows[i]["PMDLDocNo"].ToString() + "'"; } } } // objWorkFlow.UpdateAllTechOfferReceived(); //earlier TechOfferReceieved percentage is to be set to 100 now logic change- //change date - 14-09-2018 #region Progress Update of Offer Received Percentage on All Offer Received button click double nOfferReceiveDrawing_Count = 0; double nOfferReceivedDrawing_Weight = 0; double nTotalOfferReceived_Count = 0; double nToatlOfferReceived_Weight = 0; double percentageTechOfferReceivedDrawing_byCount = 0; double percentageTechOfferReceivedDrawing_byWeight = 0; nTotalOfferReceived_Count = objWorkFlow.GetTotalInquirySentCount(); nOfferReceiveDrawing_Count = objWorkFlow.GeTechOfferReceievedDrawingCount(PMDLDocNo); nOfferReceivedDrawing_Weight = objWorkFlow.GetCuurentRFQ_OfferReceivedDrawingWeight(PMDLDocNo); //objWorkFlow.GetTechOfferReceivedDrawingWeight(); nToatlOfferReceived_Weight = objWorkFlow.GetTotalDrawingWeight(); //objWorkFlow.GetTotalDrawingWeight(); if (nTotalOfferReceived_Count != 0) { percentageTechOfferReceivedDrawing_byCount = Math.Round((nOfferReceiveDrawing_Count / nTotalOfferReceived_Count) * 100, 4); } if (nToatlOfferReceived_Weight != 0) { percentageTechOfferReceivedDrawing_byWeight = Math.Round((nOfferReceivedDrawing_Weight / nToatlOfferReceived_Weight) * 100, 4); } objWorkFlow.WF_Status = "All Offer Received"; objWorkFlow.BusinessObjectHandle = "CT_RFQOFFERECEIVED"; objWorkFlow.Parent_WFID = objWorkFlow.WFID; double percentage_byCount = 0; double percentage_byWeight = 0; objWorkFlow.InsertIntoItemReferencewiseProgressTable(percentageTechOfferReceivedDrawing_byWeight, percentageTechOfferReceivedDrawing_byCount); //DataTable dtPercentage = objWorkFlow.GetTechnoComNegotiationPercentagebyCount_Weight(); DataTable dtPercentage1 = objWorkFlow.GetPercentagebyCount_Weight(); if (dtPercentage1.Rows.Count > 0) { foreach (DataRow dr1 in dtPercentage1.Rows) { objWorkFlow.Project = dr1["Project"].ToString(); objWorkFlow.ItemReference = dr1["ItemReference"].ToString(); //double percentage_byCount = Convert.ToDouble(dr1["CountPercentage"]); //double percentage_byWeight = Convert.ToDouble(dr1["WeightPercentage"]); percentage_byCount += Convert.ToDouble(dr1["CountPercentage"]); percentage_byWeight += Convert.ToDouble(dr1["WeightPercentage"]); } } if (percentage_byCount < 100.00 && percentage_byWeight < 100.00) { if ((percentage_byCount >= percentage_byWeight)) { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount); } else { if (Itemref_Typ == "4")// when item reference typ=="Self Engineered" { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byWeight); } else { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount); } } } else { if (percentage_byCount >= 100) { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(100); } else { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount); } } #endregion #region Progress Update for Tecno Comm. Negotiation on All Offer Received Button Click DataTable dtPMDLDoc = objWorkFlow.GetPMDLFromItemRef(); if (dtPMDLDoc.Rows.Count > 0) { for (int i = 0; i < dtPMDLDoc.Rows.Count; i++) { if (i == 0) { PMDLDocs = "'" + dtPMDLDoc.Rows[0]["t_docn"].ToString() + "'"; } else { PMDLDocs += ",'" + dtPMDLDoc.Rows[i]["t_docn"].ToString() + "'"; } } } double nTechnoComNegotiationDrawing_Count = 0; double nTechnoComNegotiationDrawing_Weight = 0; double nTotalTechnoComNegotiation_Count = 0; double nTotalTechnoComNegotiation_Weight = 0; double percentageTechnoComNegotiation_byCount = 0; double percentageTechnoComNegotiatio_byWeight = 0; // nTotalTechnoComNegotiation_Count = objWorkFlow.GetTotalChildRecordCount(PMDLDocNo); nTotalTechnoComNegotiation_Count = objWorkFlow.AllOfferReceieved_ChildRecordCount(PMDLDocNo); //3 nTechnoComNegotiationDrawing_Count = objWorkFlow.GetTechnoCommercialChildRecordCount(PMDLDocNo); //objWorkFlow.GetCuurentRFQ_OfferReceivedDrawingWeight nTechnoComNegotiationDrawing_Weight = objWorkFlow.GetCuurentRFQComNegotiation_OfferReceivedDrawingWeight(PMDLDocNo); nTotalTechnoComNegotiation_Weight = objWorkFlow.GetTotalDrawingWeight(); if (nTotalTechnoComNegotiation_Count != 0 && nTotalOfferReceived_Count != 0) { percentageTechnoComNegotiation_byCount = Math.Round((nTechnoComNegotiationDrawing_Count / nTotalTechnoComNegotiation_Count) * (nOfferReceiveDrawing_Count / nTotalOfferReceived_Count) * 100, 4); } if (nToatlOfferReceived_Weight != 0 && nTotalTechnoComNegotiation_Weight != 0) { // percentageTechnoComNegotiatio_byWeight = Math.Round((nTechnoComNegotiationDrawing_Weight / nTotalTechnoComNegotiation_Weight) * (nOfferReceivedDrawing_Weight / nToatlOfferReceived_Weight) * 100, 4); percentageTechnoComNegotiatio_byWeight = Math.Round((nTechnoComNegotiationDrawing_Weight / nTotalTechnoComNegotiation_Weight) * (nTechnoComNegotiationDrawing_Count / nTotalTechnoComNegotiation_Count) * 100, 4); } objWorkFlow.Parent_WFID = objWorkFlow.WFID; objWorkFlow.BusinessObjectHandle = "CT_RFQCOMMERCIALFINALISED"; objWorkFlow.WF_Status = "All Offer Received"; objWorkFlow.InsertIntoItemReferencewiseProgressTable(percentageTechnoComNegotiatio_byWeight, percentageTechnoComNegotiation_byCount); //DataTable dtPercentage = objWorkFlow.GetTechnoComNegotiationPercentagebyCount_Weight(); DataTable dtPercentage = objWorkFlow.GetPercentagebyCount_Weight(); double percentage_byCount1 = 0; double percentage_byWeight1 = 0; if (dtPercentage.Rows.Count > 0) { foreach (DataRow dr2 in dtPercentage.Rows) { objWorkFlow.Project = dr2["Project"].ToString(); objWorkFlow.ItemReference = dr2["ItemReference"].ToString(); //double percentage_byCount1 = Convert.ToDouble(dr2["CountPercentage"]); //double percentage_byWeight1 = Convert.ToDouble(dr2["WeightPercentage"]); percentage_byCount1 += Convert.ToDouble(dr2["CountPercentage"]); percentage_byWeight1 += Convert.ToDouble(dr2["WeightPercentage"]); } } if (percentage_byCount1 < 100.00 && percentage_byWeight1 < 100.00) { if ((percentage_byCount1 >= percentage_byWeight1)) { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount1); } else { if (Itemref_Typ == "4")// when item reference typ=="Self Engineered" { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byWeight1); } else { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount1); } } } else { if (percentage_byCount1 >= 100) { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(100); } else { // objWorkFlow.UpdateTechOfferReceivedDrawingpercentage(percentage_byCount1); } } // } //} #endregion // } // } } } } else { } GetData(); ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Status Changed to All Offer Received');", true); }
private void StepInit(string stepID) { XPathNavigator mainSourceNav = this.MainDataSource.CreateNavigator(); GetUnits(); WorkFlow wf = new WorkFlow(); string parammsStr = String.Format("<Parametrs><Param Name='CurrentUser'>{0}</Param></Parametrs>", System.Environment.UserName.ToLower() ); XmlNode stepNode = wf.GetSteps( _xmlFileConfigUrl, parammsStr, "1", "1", stepID ); mainSourceNav.SelectSingleNode("/my:myFields/my:Functionality/my:StepID", NamespaceManager).SetValue(stepID); mainSourceNav.SelectSingleNode("/my:myFields/my:Functionality/my:StepName", NamespaceManager).SetValue(stepNode.SelectSingleNode("CurrentStep").Attributes["Name"].Value); _prevStepID = stepNode.SelectSingleNode("PrevStep").Attributes["Id"].Value; _nextStepID = stepNode.SelectSingleNode("NextStep").Attributes["Id"].Value; string currUser = System.Environment.UserName.ToLower(); DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/ReadAccess").SetValue("0"); DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/BtnSaveAccess").SetValue("0"); DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/BtnProcessingAccess").SetValue("0"); DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/GeneralFieldAccess").SetValue("0"); if (stepNode.SelectSingleNode("CurrentStep/Read/Users").InnerText.Contains(currUser)) { DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/ReadAccess").SetValue("1"); if (_isNewItem) { DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/BtnProcessingAccess").SetValue("1"); } } if (stepNode.SelectSingleNode("CurrentStep/Save/Users").InnerText.Contains(currUser)) { DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/ReadAccess").SetValue("0"); DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/BtnSaveAccess").SetValue("1"); if (_isNewItem) { DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/BtnProcessingAccess").SetValue("1"); } else { DataSources["Vars"].CreateNavigator().SelectSingleNode("/Root/GeneralFieldAccess").SetValue("1"); } } }
protected override void AssignRollBackData(WorkFlow.ObjectHistory RollBackTo) { throw new NotImplementedException(); }