public static void update(int id, string businessname)
        {
            Businesstype bs = getById(id);

            bs.Businessname = businessname;
            bs.Update();
        }
Example #2
0
 public static bool delCableRatio(int id)
 {
     try
     {
         Businesstype type = BusinessTypeBusiness.getById(id);
         if (type != null)
         {
             type.Isdeleted = (int)EnmIsdeleted.已删除;
             type.Update();
             return(true);
         }
         else
         {
             return(false);
         }
     }
     catch
     {
         MessageHelper.ShowMessage("E999", "保存结算比例发生错误!");
         return(false);
     }
 }
        public static int getIdByName(int businessclass, string businessname)
        {
            Businesstype bt = BusinesstypeDao.FindFirst(new EqExpression("Businessclass", businessclass), new EqExpression("Businessname", businessname), new EqExpression("Isdeleted", (int)EnmIsdeleted.使用中));

            return(bt.Id);
        }
 public static void save(Businesstype bt)
 {
     bt.Save();
 }
        public static Businesstype getById(int id)
        {
            Businesstype bs = BusinesstypeDao.FindFirst(new EqExpression("Id", id), new EqExpression("Isdeleted", (int)EnmIsdeleted.使用中));

            return(bs);
        }