Пример #1
0
 /// <summary>
 /// Add a new DM_DichVu within DM_DichVu database table
 /// </summary>
 /// <param name="obj">DM_DichVu</param>
 /// <returns>key of table</returns>
 public int Add(DM_DichVu obj)
 {
     DbParameter parameterItemID = Data.CreateParameter("MaDichVu", obj.MaDichVu);
     parameterItemID.Direction = ParameterDirection.Output;
     SqlHelper.ExecuteNonQuery(Data.ConnectionString, CommandType.StoredProcedure,"sproc_DM_DichVu_Add"
                     ,parameterItemID
                     ,Data.CreateParameter("TenDichVu", obj.TenDichVu)
     );
     return 0;
 }
Пример #2
0
 /// <summary>
 /// Add a new DM_DichVu within DM_DichVu database table
 /// </summary>
 /// <param name="obj_dm_dichvu">DM_DichVu</param>
 /// <returns>key of table</returns>
 public int Add(DM_DichVu obj_dm_dichvu)
 {
     ServerCache.Remove("DM_DichVu", true);
     return objDM_DichVuDA.Add(obj_dm_dichvu);
 }
Пример #3
0
 /// <summary>
 /// updates the specified DM_DichVu
 /// </summary>
 /// <param name="obj_dm_dichvu">DM_DichVu</param>
 /// <returns></returns>
 public void Update(DM_DichVu obj_dm_dichvu)
 {
     ServerCache.Remove("DM_DichVu", true);
     objDM_DichVuDA.Update(obj_dm_dichvu);
 }
Пример #4
0
 /// <summary>
 /// updates the specified DM_DichVu
 /// </summary>
 /// <param name="obj">DM_DichVu</param>
 /// <returns></returns>
 public void Update(DM_DichVu obj)
 {
     SqlHelper.ExecuteNonQuery(Data.ConnectionString, CommandType.StoredProcedure,"sproc_DM_DichVu_Update"
                     ,Data.CreateParameter("MaDichVu", obj.MaDichVu)
                     ,Data.CreateParameter("TenDichVu", obj.TenDichVu)
     );
 }
Пример #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 public DM_DichVu Populate(IDataReader myReader)
 {
     DM_DichVu obj = new DM_DichVu();
     obj.MaDichVu = (Byte) myReader["MaDichVu"];
     obj.TenDichVu = (string) myReader["TenDichVu"];
     return obj;
 }