示例#1
0
 /// <summary>
 /// 更新设备
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public static bool Modify(Dt_equpment obj)
 {
     try
     {
         obj.Update();
         return(true);
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
         return(false);
     }
 }
示例#2
0
 /// <summary>
 /// 根据设备号查询
 /// </summary>
 /// <param name="cusId"></param>
 /// <returns></returns>
 public static Dt_equpment queryByEqNo(string Equpmentno)
 {
     try
     {
         if (true) //(Global.g_usergroupid == (int)EnmUserRole.销售总监)
         {
             Dt_equpment c = Dt_equpmentDao.FindFirst(new Order("Createtime", false), new EqExpression("Equpmentno", Equpmentno), new EqExpression("Isdeleted", (int)EnmIsdeleted.使用中));
             return(c);
         }
         return(null);
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
         MessageHelper.ShowMessage("E999", ex.Message);
         return(null);
     }
 }
示例#3
0
 /// <summary>
 /// 根据设备号查询
 /// </summary>
 /// <param name="cusId"></param>
 /// <returns></returns>
 public static Dt_equpment queryByEqID(int eqId)
 {
     try
     {
         if (true) //(Global.g_usergroupid == (int)EnmUserRole.销售总监)
         {
             Dt_equpment c = Dt_equpmentDao.FindFirst(new EqExpression("Id", eqId));
             return(c);
         }
         return(null);
     }
     catch (Exception ex)
     {
         Log.Error(ex.Message);
         MessageHelper.ShowMessage("E999", ex.Message);
         return(null);
     }
 }