Ejemplo n.º 1
0
        private void FrmChooseAcrossLocation_Load(object sender, EventArgs e)
        {
            LocationDal           locDal    = new LocationDal();
            List <LocationEntity> locations = locDal.GetStockLocationByWarehouse(GlobeSettings.LoginedUser.WarehouseCode, SysCodeConstant.ZONE_TYPE_TEMP);

            lookUpEdit1.Properties.DataSource = locations;

            //默认选中第一行
            if (locations.Count > 0)
            {
                lookUpEdit1.EditValue = locations[0].LocationCode;
            }
        }
Ejemplo n.º 2
0
 public static HttpResponseMessage UpdateLocation(LocationInfo location)
 {
     try
     {
         int val = LocationDal.UpdateLocation(location);
         return(new HttpResponseMessage(HttpStatusCode.OK));
     }
     catch (Exception ex)
     {
         Console.WriteLine("EXCEPTION: " + ex);
         return(new HttpResponseMessage(HttpStatusCode.BadRequest));
     }
 }
Ejemplo n.º 3
0
 public static HttpResponseMessage SoftDeleteLocation(int locationId, bool isOpen)
 {
     try
     {
         int val = LocationDal.SoftDeleteLocation(locationId, isOpen);
         return(new HttpResponseMessage(HttpStatusCode.OK));
     }
     catch (Exception ex)
     {
         Console.WriteLine("EXCEPTION: " + ex);
         return(new HttpResponseMessage(HttpStatusCode.BadRequest));
     }
 }
Ejemplo n.º 4
0
        private void OnFormLoad(object sender, EventArgs e)
        {
            ImageCollection ic = AppResource.LoadToolImages();

            barManager1.Images     = ic;
            toolAdd.ImageIndex     = (int)AppResource.EIcons.add;
            toolEdit.ImageIndex    = (int)AppResource.EIcons.edit;
            toolDel.ImageIndex     = (int)AppResource.EIcons.delete;
            toolRefresh.ImageIndex = (int)AppResource.EIcons.refresh;
            toolSearch.ImageIndex  = (int)AppResource.EIcons.search;
            toolPrint.ImageIndex   = (int)AppResource.EIcons.print;
            toolDesign.ImageIndex  = (int)AppResource.EIcons.tree;

            locationDal = new LocationDal();
            LoadDataAndBindGrid();
        }
Ejemplo n.º 5
0
 private void OnFormLoad(object sender, EventArgs e)
 {
     locationDal = new LocationDal();
     zoneDal     = new ZoneDal();
     //channelDal = new ChannelDal();
     BindingCombox();
     BindChannel(locationEntity);
     if (locationEntity != null)
     {
         this.Text       = "货位-修改";
         txtCode.Enabled = false;
         layoutControlItem3.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
         ShowEditInfo(locationEntity);
         isNew = false;
     }
 }
Ejemplo n.º 6
0
        private void OnFormLoad(object sender, EventArgs e)
        {
            ImageCollection ic = IconHelper.LoadToolImages();

            barManager1.Images     = ic;
            toolConfirm.ImageIndex = (int)IconHelper.Images.add;
            toolRefresh.ImageIndex = (int)IconHelper.Images.refresh;

            warehouseCode = GlobeSettings.LoginedUser.WarehouseCode;
            LocationDal           locDal    = new LocationDal();
            List <LocationEntity> locations = locDal.GetStockLocationByWarehouse(warehouseCode, SysCodeConstant.ZONE_TYPE_TEMP);

            listLocations.Properties.DataSource = locations;

            //默认选中第一行
            if (locations.Count > 0)
            {
                listLocations.EditValue = locations[0].LocationCode;
            }

            BindQueryResult();
        }
Ejemplo n.º 7
0
 public LocationBusinessAccess()
 {
     myDataBase  = DatabaseFactory.CreateDatabase(C_ConnectionString);
     locationdal = new LocationDal(myDataBase);
 }
Ejemplo n.º 8
0
        private List<SelectListItem> GetCities(string proId)
        {
            List<SelectListItem> lst = new List<SelectListItem>();
            var items = new LocationDal().GetCitiesByProvince(proId);
            foreach (var item in items)
            {
                SelectListItem i = new SelectListItem
                {
                    Text = item.CityName,
                    Value = item.CityID.ToString()
                };

                lst.Add(i);
            }
            return lst;
        }
Ejemplo n.º 9
0
        private List<SelectListItem> GetProvince()
        {
            List<SelectListItem> lst = new List<SelectListItem>();
            var items = new LocationDal().GetProvinces();
            foreach (var item in items)
            {
                SelectListItem i = new SelectListItem
                {
                    Text = item.ProName,
                    Value = item.ProID.ToString()
                };

                lst.Add(i);
            }
            return lst;
        }
Ejemplo n.º 10
0
        private List<SelectListItem> GetDistricts(string cityId)
        {
            List<SelectListItem> lst = new List<SelectListItem>();
            var items = new LocationDal().GetDistrictByCityId(cityId);
            foreach (var item in items)
            {
                SelectListItem i = new SelectListItem
                {
                    Text = item.DisName,
                    Value = item.Id.ToString()
                };

                lst.Add(i);
            }
            return lst;
        }
Ejemplo n.º 11
0
 public static LocationInfo GetLocationById(int LocationId)
 {
     return(LocationDal.GetLocationById(LocationId));
 }
Ejemplo n.º 12
0
 public static int AddNewLocation(LocationInfo location)
 {
     return(LocationDal.AddNewLocation(location));
 }
Ejemplo n.º 13
0
 public static LocationInfo[] GetAllLocations()
 {
     LocationInfo[] locationInfo = LocationDal.GetAllLocations();
     return(locationInfo);
 }
Ejemplo n.º 14
0
 public AddLocationBal()
 {
     myDataBase     = DatabaseFactory.CreateDatabase(C_ConnectionString);
     addlocationbal = new LocationDal(myDataBase);
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LocationLogic"/> class.
 /// </summary>
 public LocationLogic()
 {
     this.dal = new LocationDal();
 }