Пример #1
0
 public int DeleteById(int ID)
 {
     int nResult = 0;
     cProductCategory objDAL = new cProductCategory();
     try
     {
         objDAL.LoadByPrimaryKey(ID);
         objDAL.MarkAsDeleted();
         objDAL.Save();
         nResult = ID;
     }
     catch
     {
         nResult = 0;
     }
     return nResult;
 }
Пример #2
0
 public int Insert()
 {
     int nResult = 0;
     cProductCategory objInfor = new cProductCategory();
     try
     {
         objInfor.AddNew();
         this.MappingData(objInfor);
         objInfor.Save();
         nResult = objInfor.ProductCategoryID ;
     }
     catch
     {
         nResult = 0;
     }
     return nResult;
 }
Пример #3
0
 public int Update(int ID)
 {
     int nResult = 0;
     cProductCategory objInfor = new cProductCategory();
     try
     {
         objInfor.LoadByPrimaryKey(ID);
         this.MappingData(objInfor);
         objInfor.Save();
         nResult = ID;
     }
     catch
     {
         nResult = 0;
     }
     return nResult;
 }