Exemplo n.º 1
0
        public bool CancelGRN(Guid GRNId, string TrackingNo, RequestforApprovedGRNCancelationStatus status)
        {
            bool   isSaved = false;
            GRNBLL objGRN  = new GRNBLL();

            objGRN = objGRN.GetbyGRN_Number(GRNId);
            GRNStatus GRNstatus = (GRNStatus)objGRN.Status;

            if (status == RequestforApprovedGRNCancelationStatus.Cancelled)
            {
                GRNstatus = GRNStatus.Cancelled;
            }
            if (objGRN != null)
            {
                if (GRNstatus == GRNStatus.Cancelled)
                {
                    isSaved = objGRN.Update(objGRN.GRN_Number, GRNstatus, objGRN, TrackingNo, DateTime.Now);
                }
                if (isSaved == true)
                {
                    ECXWF.CMessage mess = WFTransaction.Request(TrackingNo);
                    WFTransaction.WorkFlowManager(TrackingNo, mess);
                    isSaved = true;
                }
            }
            else
            {
                throw new Exception("Unable to find GRN");
            }
            return(isSaved);
        }
Exemplo n.º 2
0
 protected void btnNext_Click(object sender, EventArgs e)
 {
     if (ViewState["vsTranNo"] != null)
     {
         ECXWF.CMessage msg = WFTransaction.Request(ViewState["vsTranNo"].ToString().Trim());
         if (msg != null)
         {
             if (msg.Name == "AddVoucherInfo")
             {
                 WFTransaction.WorkFlowManager(ViewState["vsTranNo"].ToString().Trim(), msg);
             }
         }
     }
     Response.Redirect("ListInbox.aspx");
 }
Exemplo n.º 3
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     WFTransaction.WorkFlowManager(this.hfTrackingNo.Value.ToString());
 }
Exemplo n.º 4
0
        protected void btnComplete_Click(object sender, EventArgs e)
        {
            this.lblMessage.Text = "";
            Nullable <Guid> Id            = null;
            string          TransactionNo = "";

            TransactionNo = Request.QueryString["TranNo"];
            if (string.IsNullOrEmpty(TransactionNo))
            {
                return;
            }

            if (Session["CommodityRequestId"] == null)
            {
                CommodityDepositeRequestBLL objCDR = new CommodityDepositeRequestBLL();
                objCDR = objCDR.GetCommodityDepositeDetailByTrackingNo(TransactionNo);
                Id     = objCDR.Id;
                Session["CommodityRequestId"] = Id.ToString();
            }
            else
            {
                Id = new Guid(Session["CommodityRequestId"].ToString());
            }
            // if the Step is in Driver Info.
            //if (WFTransaction.GetMessage(TransactionNo) == "AddDriverInformation")
            //{
            //    WFTransaction.WorkFlowManager(TransactionNo);
            //}
            //Check if Driver Information is Added.
            List <DriverInformationBLL> listDriverInfo = null;
            DriverInformationBLL        objDriverInfo  = new DriverInformationBLL();

            if (Session["CommodityRequestId"] != null)
            {
                Guid CdrId = new Guid(Session["CommodityRequestId"].ToString());
                listDriverInfo = objDriverInfo.GetActiveDriverInformationByReceivigRequestId(CdrId);
                if (listDriverInfo == null)
                {
                    this.btnComplete.Enabled = false;
                }
                else
                {
                    if (listDriverInfo.Count <= 0)
                    {
                        this.btnComplete.Enabled = false;
                    }
                    else
                    {
                        if (Id != null)
                        {
                            ECXWF.CMessage msg = (ECXWF.CMessage)HttpContext.Current.Session["msg"];
                            if (msg != null)
                            {
                                if (msg.Name == "AddDriverInformation")
                                {
                                    WFTransaction.WorkFlowManager(TransactionNo);
                                    Response.Redirect("ListInbox.aspx");
                                }
                            }
                        }
                    }
                }
            }
        }