Exemplo n.º 1
0
 public bool SaveCategory(DsMaster itemCat)
 {
     bool saved = false;
    if (itemCat.HasChanges() && !itemCat.CATEGORY.HasErrors)
    {
        var manager = new DsMasterTableAdapters.TableAdapterManager  
                          {
                              Connection = {ConnectionString = _constr},
                              BackupDataSetBeforeUpdate = true,
                              CATEGORYTableAdapter = new CATEGORYTableAdapter()
                          };
     saved = manager.UpdateAll(itemCat) > 0;
     }
     return saved;
 }
Exemplo n.º 2
0
 public bool SaveItemGenric(DsMaster genric)
 {
     bool saved = false;
     if (genric.HasChanges() && !genric.CATEGORY.HasErrors)
     {
         var manager = new DsMasterTableAdapters.TableAdapterManager
                           {
                               Connection = {ConnectionString = _constr},
                               GENERICMASTTableAdapter = new GENERICMASTTableAdapter(),
                               BackupDataSetBeforeUpdate = true
                           };
         saved = manager.UpdateAll(genric) > 0;
     }
     return saved;
 }
Exemplo n.º 3
0
 public bool SaveUom(DsMaster uom)
 {
     bool saved = false;
     if (uom.HasChanges() && !uom.CATEGORY.HasErrors)
     {
         var manager = new DsMasterTableAdapters.TableAdapterManager
                           {   Connection = {ConnectionString = _constr},
                               UOMMASTTableAdapter = new UOMMASTTableAdapter(), BackupDataSetBeforeUpdate = true
                           };
         saved = manager.UpdateAll(uom) > 0;
     }
     return saved;
 }
Exemplo n.º 4
0
  public bool SaveItemGroup(DsMaster itemgrp) 
 {
      bool saved = false;
   if (itemgrp.HasChanges() && !itemgrp.CATEGORY.HasErrors)
      {
          var manager = new DsMasterTableAdapters.TableAdapterManager
                            {   Connection = {ConnectionString = _constr},
                                ITEMGROUPTableAdapter = new ITEMGROUPTableAdapter(),
                                BackupDataSetBeforeUpdate = true
                            };
          saved = manager.UpdateAll(itemgrp) > 0;
      }
      return saved;
 }