示例#1
0
 public int DeleteById(int ID)
 {
     int nResult = 0;
        cNewsCategory objDAL = new cNewsCategory();
     try
     {
         objDAL.LoadByPrimaryKey(ID);
         objDAL.MarkAsDeleted();
         objDAL.Save();
         nResult = ID;
     }
     catch
     {
         nResult = 0;
     }
     return nResult;
 }
示例#2
0
 public int Update(int ID)
 {
     int nResult = 0;
        cNewsCategory objInfor = new cNewsCategory();
     try
     {
         objInfor.LoadByPrimaryKey(ID);
         this.MappingData(objInfor);
         objInfor.Save();
         nResult = ID;
     }
     catch
     {
         nResult = 0;
     }
     return nResult;
 }
示例#3
0
 public void LoadById(int ID)
 {
     cNewsCategory objDAL = new cNewsCategory();
     objDAL.LoadByPrimaryKey(ID);
     ConvertData(objDAL);
 }