public static ECXWF.CMessage Request(string transactionNo) { transactionNo = transactionNo.Trim(); ECXWF.ECXEngine eng = new WarehouseApplication.ECXWF.ECXEngine(); ECXWF.CMessage[] mess = null; try { mess = eng.Request(transactionNo, UserBLL.GetCurrentUser(), new string[] { WarehouseBLL.CurrentWarehouse.Location }); if (mess != null) { if (mess.Length > 0) { return(mess[0]); } else { return(null); } } return(null); } catch (Exception ex) { throw ex; } }
public static string GetMessage(string transactionNo) { transactionNo = transactionNo.Trim(); ECXWF.ECXEngine eng = new WarehouseApplication.ECXWF.ECXEngine(); ECXWF.CMessage[] mess = null; try { mess = eng.Request(transactionNo, UserBLL.GetCurrentUser(), new string[] { WarehouseBLL.CurrentWarehouse.Location }); } catch (Exception ex) { throw ex; } if (mess == null) { return(""); } if (mess.Length > 1) { throw new Exception("Inappropriate Message exception"); } else if (mess.Length == 1) { return(mess[0].Name.ToString()); } return(""); }
protected void Page_Load(object sender, EventArgs e) { string transactionNo = Request.QueryString["TranNo"]; string taskName = Request.QueryString["Task"]; if (transactionNo == null) { return; } if (taskName.Trim().ToUpper() == "Full Arrival".ToUpper()) { Response.Redirect("AddArrival.aspx"); return; } else if (transactionNo == "ConfirmTrucksForSamp") { Response.Redirect("ConfirmTrucksForSampling.aspx"); return; } else if (transactionNo == "GetSampleTicket") { Response.Redirect("GetSampleTicket.aspx"); return; } ECXWF.ECXEngine eng = new WarehouseApplication.ECXWF.ECXEngine(); ECXWF.CMessage[] mess = null; try { //eng.UnlockMessageByUser(Request.QueryString["TranNo"], "AddVoucherInformation", UserBLL.GetCurrentUser()); //eng.RemoveTransactionFromStack(Request.QueryString["TranNo"]); mess = eng.Request(Request.QueryString["TranNo"], UserBLL.GetCurrentUser(), new string[] { WarehouseBLL.CurrentWarehouse.Location }); } catch (Exception ex) { throw ex; } if (mess == null) { return; } if (mess.Length > 1) { this.lstPages.DataValueField = "Name"; this.lstPages.DataTextField = "Name"; this.lstPages.DataSource = mess; } else if (mess.Length == 1) { this.Session["msg"] = mess[0]; this.Response.Redirect(this.PageFactory(mess[0], Request.QueryString["TranNo"], new object[] { Request.QueryString["Id"] })); return; } btnOpen.Enabled = (lstPages.SelectedIndex >= 0); }
private void WFM(string stTran) { string TransactionNo = ""; if (stTran == "") { TransactionNo = Request.QueryString["TranNo"]; } else { TransactionNo = stTran; } ECXWF.ECXEngine eng = new WarehouseApplication.ECXWF.ECXEngine(); ECXWF.CMessage[] mess = eng.Request(TransactionNo, UserBLL.GetCurrentUser(), new string[] { "" }); mess[0].IsCompleted = true; eng.Response(TransactionNo, mess[0]); //Response.Redirect("~/PageSwicther.aspx?TranNo=" + TransactionNo); }
protected void btnSearch_Click(object sender, EventArgs e) { #region co //string taskNo = txtTaskNo.Text.Trim(); //if (taskNo != string.Empty) //{ // XMLHelper objHelper = new XMLHelper(Session["Inboxpath"].ToString()); // InboxItems item = objHelper.SearchByInboxItemName(Session["WarehouseInboxItemName"].ToString()); // List<TransactionDetail> listDisplay = item.GetTransactions().Where(t => t.TrackNo == taskNo).ToList(); // if ("Select Trucks For Sampling" == Session["WarehouseInboxItemName"].ToString()) // { // TransactionDetail obj = new TransactionDetail("", ""); // obj.DisplayName = "Select Trucks for Sampling"; // obj.TrackNo = "GetTrucksReadyForSam"; // listDisplay.RemoveAll(RemovePredicate); // listDisplay.Add(obj); // } // else if ("Confirm Trucks For Sampling" == Session["WarehouseInboxItemName"].ToString()) // { // TransactionDetail obj = new TransactionDetail("", ""); // obj.DisplayName = "Confirm Truks For Sampling"; // obj.TrackNo = "ConfirmTrucksForSamp"; // listDisplay.RemoveAll(RemovePredicate); // listDisplay.Add(obj); // } // else if ("Assign Sampler".Trim() == Session["WarehouseInboxItemName"].ToString().Trim()) // { // TransactionDetail obj = new TransactionDetail("", ""); // obj.DisplayName = "Assign Sampler"; // obj.TrackNo = "GetSampleTicket"; // listDisplay.RemoveAll(RemovePredicate); // listDisplay.Add(obj); // } // this.gvDetail.DataSource = listDisplay; // this.gvDetail.DataBind(); //} #endregion if (string.IsNullOrEmpty(txtTaskNo.Text)) { msg.Text = "Please Provide Tracking No."; return; } string strTR = txtTaskNo.Text.Trim(); ECXWF.ECXEngine eng = new WarehouseApplication.ECXWF.ECXEngine(); ECXWF.CMessage[] mess = null; try { //eng.UnlockMessageByUser(Request.QueryString["TranNo"], "AddVoucherInformation", UserBLL.GetCurrentUser()); //eng.RemoveTransactionFromStack(Request.QueryString["TranNo"]); mess = eng.Request(strTR, UserBLL.GetCurrentUser(), new string[] { WarehouseBLL.CurrentWarehouse.Location }); if (mess != null) { WFTransaction.UnlockTask(strTR); List <TransactionDetail> lst = new List <TransactionDetail>(new TransactionDetail[] { new TransactionDetail(strTR, strTR) }); this.gvDetail.DataSource = lst; this.gvDetail.DataBind(); } else { msg.Text = "No Tracking number matchs the supplied criteria"; } } catch (Exception ex) { txtTaskNo.Text = ""; msg.Text = "Re-enter the Tracking No and Try Again"; //throw ex; } }