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); }
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"); }