Exemplo n.º 1
0
 /// <summary>
 /// 更新设备型号信息
 /// </summary>
 /// <param name="obj"></param>
 protected void Update(TB_EquipmentModel obj)
 {
     ModelInstance.Update(f => f.id == obj.id, act => {
         act.Code = obj.Code;
         act.Name = obj.Name;
         act.Type = obj.Type;
     });
 }
Exemplo n.º 2
0
 private void BuildModel(TB_EquipmentModel obj)
 {
     obj.Code = txtCode.Value.Trim();
     obj.Name = txtName.Value.Trim();
     obj.Type = ParseInt(ddlType.SelectedValue);
     if (obj.Type <= 0)
     {
         obj.Type = (int?)null;
     }
 }