Ejemplo n.º 1
0
        public static List <BrilliantWMS.WMSInbound.mStatu> WMFillStatus()
        {
            string state = HttpContext.Current.Session["TRstate"].ToString();

            BrilliantWMS.WMSInbound.iInboundClient Inbound    = new WMSInbound.iInboundClient();
            List <BrilliantWMS.WMSInbound.mStatu>  StatusList = new List <BrilliantWMS.WMSInbound.mStatu>();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                if (HttpContext.Current.Session["TRID"].ToString() == "0" && state == "Add")
                {
                    StatusList = Inbound.GetStatusListForInbound(ObjectName, "", state, profile.Personal.UserID, profile.DBConnection._constr).ToList();
                }
                else if (HttpContext.Current.Session["TRID"].ToString() != "0" && state == "View")
                {
                    StatusList = Inbound.GetStatusListForInbound("", "Transfer", state, profile.Personal.UserID, profile.DBConnection._constr).ToList();
                }
                BrilliantWMS.WMSInbound.mStatu select = new BrilliantWMS.WMSInbound.mStatu()
                {
                    ID = 0, Status = "-Select-"
                };
                StatusList.Insert(0, select);
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, "WToWTransferDetail.aspx", "WMFillStatus");
            }
            finally { Inbound.Close(); }
            return(StatusList);
        }
        public static List <BrilliantWMS.WMSInbound.mStatu> WMFillStatus()
        {
            string orderstate = state;

            BrilliantWMS.WMSInbound.iInboundClient Inbound    = new WMSInbound.iInboundClient();
            List <BrilliantWMS.WMSInbound.mStatu>  StatusList = new List <BrilliantWMS.WMSInbound.mStatu>();

            try
            {
                CustomProfile profile = CustomProfile.GetProfile();
                if (orderstate != "View")
                {
                    if (HttpContext.Current.Session["TRID"] != null)
                    {
                        StatusList = Inbound.GetStatusListForInbound("TransferDispatch", "", orderstate, profile.Personal.UserID, profile.DBConnection._constr).ToList();
                    }
                    else
                    {
                        StatusList = Inbound.GetStatusListForInbound(ObjectName, "", orderstate, profile.Personal.UserID, profile.DBConnection._constr).ToList();
                    }
                }
                else
                {
                    StatusList = Inbound.GetStatusListForInbound("", "SalesOrder,POSO", orderstate, profile.Personal.UserID, profile.DBConnection._constr).ToList();
                }

                BrilliantWMS.WMSInbound.mStatu select = new BrilliantWMS.WMSInbound.mStatu()
                {
                    ID = 0, Status = "-Select-"
                };
                StatusList.Insert(0, select);
            }
            catch (System.Exception ex)
            {
                Login.Profile.ErrorHandling(ex, "DispatchDetails.aspx", "WMFillStatus");
            }
            finally { Inbound.Close(); }
            return(StatusList);
        }