예제 #1
0
        public DataSet ToDataSet()
        {
            //Return a dataset containing values for this object
            ZoneDS ds = null;

            try {
                ds = new ZoneDS();
                ZoneDS.ZoneTableRow zone = ds.ZoneTable.NewZoneTableRow();
                zone.CODE             = this._code;
                zone.TYPE             = this._type;
                zone.TRAILER_LOAD_NUM = this._trailer_load_num;
                zone.LABEL_TYPE       = this._label_type;
                zone.LANE             = this._lane;
                zone.STATUS           = this._status;
                zone.RB_TL_NUMBER     = this._rb_tl_number;
                zone.AgentID          = this._agentid;
                zone.AGENT_NUMBER     = this._agent_number;
                zone.DESCRIPTION      = this._description;
                zone.LOCATION         = this._location;
                zone.SortCenterID     = this._sortcenterid;
                zone.SHIP_DATE        = this._ship_date;
                zone.CAN_BE_CLOSED    = this._can_be_closed;
                zone.OSDStatus        = this._osdstatus;
                zone.LABELTYPE        = this._labeltype;
                zone.LANE_SMALL_SORT  = this._lane_small_sort;
                zone.IsMain           = this._ismain;
                zone.ShipScdeToClose  = this._shipscdetoclose;
                zone.LastUpdated      = this._lastupdated;
                zone.UserID           = this._userid;
                ds.ZoneTable.AddZoneTableRow(zone);
            }
            catch (Exception) { }
            return(ds);
        }
예제 #2
0
        public ZoneDS GetZones()
        {
            //Get a list of zones
            ZoneDS zones = null;

            try {
                zones = new ZoneDS();
                DataSet ds = FillDataset(USP_ZONES, TBL_ZONES, new object[] { });
                if (ds.Tables[TBL_ZONES].Rows.Count != 0)
                {
                    zones.Merge(ds);
                }
            }
            catch (ApplicationException ex) { throw ex; }
            catch (Exception ex) { throw new ApplicationException("Unexpected exception creating zone list.", ex); }
            return(zones);
        }
예제 #3
0
        public static Zone GetZone(string code, string type)
        {
            //Create a zone
            ZoneDS zone = null;

            try {
                zone = new ZoneDS();
                DataSet ds = App.Mediator.FillDataset(USP_ZONE_DETAIL, TBL_ZONE_DETAIL, new object[] { code, type });
                if (ds.Tables[TBL_ZONE_DETAIL].Rows.Count == 0)
                {
                    throw new Exception("Zone  " + code + " not found.");
                }
                else
                {
                    zone.Merge(ds);
                }
            }
            catch (Exception ex) { throw ex; }
            return(new Zone(zone.ZoneDetailTable[0]));
        }
예제 #4
0
 //Interface
 static FreightFactory()
 {
     //Constructor
     _Zones = new ZoneDS();
     _TLs   = new ZoneDS();
 }