コード例 #1
0
 private warehouse getItemFromFields()
 {
     warehouse item = new warehouse();
     item.id = this._id;
     item.name = edtName.Text;
     item.description = edtDescr.Text;
     return item;
 }
コード例 #2
0
 private void LoadWarehouses()
 {
     DataAccess da = new DataAccess();
     List<warehouse> l = da.GetWarehouses();
     warehouse w = new warehouse();
     w.name = "Все склады";
     l.Add(w);
     edtWarehouse.DataContext = l;
     edtWarehouse.SelectedItem = w;
 }
コード例 #3
0
 /// <summary>
 /// Create a new warehouse object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 /// <param name="name">Initial value of the name property.</param>
 public static warehouse Createwarehouse(global::System.Int32 id, global::System.String name)
 {
     warehouse warehouse = new warehouse();
     warehouse.id = id;
     warehouse.name = name;
     return warehouse;
 }
コード例 #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the warehouses EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTowarehouses(warehouse warehouse)
 {
     base.AddObject("warehouses", warehouse);
 }
コード例 #5
0
ファイル: DataAccess.cs プロジェクト: bashlykevich/Bycar
        public void WarehouseEdit(warehouse item)
        {
            warehouse original = objDataContext.warehouses.FirstOrDefault(b => b.id == item.id);
            if (original != null)
            {
                original.name = item.name;
                original.description = item.description;

                //if (original.created_on == null)
                //    original.created_on = DateTime.Now;
                objDataContext.SaveChanges();
            }
        }
コード例 #6
0
ファイル: DataAccess.cs プロジェクト: bashlykevich/Bycar
 public void WarehouseCreate(warehouse _obj)
 {
     //_obj.created_on = DateTime.Now;
     objDataContext.AddTowarehouses(_obj);
     objDataContext.SaveChanges();
 }