예제 #1
0
 private void UpdateSeedBase()
 {
     int id = 1;
     ISeedBaseService cs = new SeedBaseService();
     var data            = cs.GetSeedBaseById(id);
     var result          = cs.UpdateSingleSeedBase(data);
 }
        public void LoadUserControl(PlansBatchEditView view)
        {
            ILandBlockService iLandBlockService = new LandBlockService();
            var landBlocks = iLandBlockService.GetPagerLandBlock(string.Empty, 1, 10);

            view.lbLand.SelectedValuePath = "BlockID";
            view.lbLand.DisplayMemberPath = "BlockName";
            view.lbLand.ItemsSource       = landBlocks;

            ISeedBaseService iISeedBaseService = new SeedBaseService();
            var seeds = iISeedBaseService.GetPagerSeedBase(string.Empty, 1, 10);

            view.lbSeed.SelectedValuePath = "SeedID";
            view.lbSeed.DisplayMemberPath = "SeedName";
            view.lbSeed.ItemsSource       = seeds;

            if (Mode == EditMode.CREATE)
            {
                EpcGotFocus();
            }
        }
예제 #3
0
        private void AddSeedBase()
        {
            SeedBaseModel data = new SeedBaseModel();

            data.SeedCode    = "test";
            data.SeedNO      = "test";
            data.SeedName    = "test";
            data.BatchNO     = "test";
            data.Place       = "test";
            data.Supplier    = "test";
            data.PurchPerson = "test";
            data.BuyTime     = DateTime.Now;
            data.BuyCount    = 10;
            data.Units       = "test";
            data.Remark      = "test";
            data.IsLocked    = false;
            data.IsShow      = true;

            ISeedBaseService cs = new SeedBaseService();
            var result          = cs.InsertSingleSeedBase(data);
        }
예제 #4
0
 private void DeleteSeedBase()
 {
     int id = 1;
     ISeedBaseService cs = new SeedBaseService();
     var result          = cs.DeleteSingleSeedBase(id);
 }