Пример #1
0
 public SysDMType toSysDMType()
 {
     SysDMType result = new SysDMType();
     //result.Id = string.IsNullOrEmpty(this.Id.ToString()) ? Int32.Parse(Guid.NewGuid().ToString()) : this.Id;
     result.Id = this.Id;
     result.Name = this.Name;
     result.Description = this.Description;
     return result;
 }
Пример #2
0
 /// <summary>
 /// Thêm mơi SysDMType vào database
 /// </summary>
 /// <param name="SysDMType"></param>
 /// <returns></returns>
 /// <modify>
 /// Author  date    comment
 /// Anhhn   10/6/15 create
 /// </modify>
 public int Add(SysDMType SysDMType)
 {
     db.SysDMTypes.Add(SysDMType);
     return db.SaveChanges();
 }
Пример #3
0
 /// <summary>
 /// Cập nhập SysDMType vào database
 /// </summary>
 /// <param name="SysDMType"></param>
 /// <returns></returns>
 /// <modify>
 /// Author  date    comment
 /// Anhhn   10/6/15 create
 /// </modify>
 public int Update(SysDMType SysDMType)
 {
     db.Entry(SysDMType).State = EntityState.Modified;
     return db.SaveChanges();
 }
Пример #4
0
 public SysDMTypeModel(SysDMType SysDMType)
 {
     this.Id = SysDMType.Id;
     this.Name = SysDMType.Name;
     this.Description = SysDMType.Description;
 }