public static int WMChangeStatus(string SelectedRec) { int Result = 0; BrilliantWMS.WMSOutbound.iOutboundClient Outbound = new WMSOutbound.iOutboundClient(); try { CustomProfile profile = CustomProfile.GetProfile(); Result = Outbound.ChangeStatusToMarkForReturn(SelectedRec, profile.Personal.UserID, profile.DBConnection._constr); BrilliantWMS.WMSOutbound.tReturnHead rtrn = new WMSOutbound.tReturnHead(); string[] OrdrCnt = SelectedRec.Split(','); int TotOrdres = OrdrCnt.Count(); for (int i = 0; i <= TotOrdres - 1; i++) { rtrn.SONo = long.Parse(OrdrCnt[i].ToString()); rtrn.ReturnBy = profile.Personal.UserID; rtrn.ReturnDate = DateTime.Now; rtrn.CreatedBy = profile.Personal.UserID; rtrn.CreationDate = DateTime.Now; rtrn.Status = 49; long rtrnID = Outbound.SaveReturnHead(rtrn, profile.DBConnection._constr); } } catch { } finally { Outbound.Close(); } return(Result); }