Esempio n. 1
0
 public static bool delSaler(int cableid, int salerid, DateTime endDate)
 {
     try
     {
         Commission c = CommissionDao.FindFirst(new EqExpression("Userid", salerid), new EqExpression("Cableid", cableid), new EqExpression("Isdeleted", (int)EnmIsdeleted.使用中));
         if (c != null)
         {
             c.Endtime   = endDate;
             c.Isdeleted = (int)EnmIsdeleted.已删除;
             c.Update();
         }
         return(true);
     }
     catch (Exception ex)
     {
         MessageHelper.ShowMessage("E999", "删除渠道比例失败!");
         return(false);
     }
 }
Esempio n. 2
0
 public static bool UpdataCommission(int cableId, int userId, decimal ratio, decimal tax, DateTime end, DateTime start)
 {
     try
     {
         Commission c = CommissionDao.FindFirst(new EqExpression("Cableid", cableId), new EqExpression("Userid", userId), new EqExpression("Isdeleted", (int)EnmIsdeleted.使用中));
         if (c != null)
         {
             c.Endtime   = end;
             c.Isdeleted = (int)EnmIsdeleted.已删除;
             c.Update();
             if (!saveCommission(cableId, userId, ratio, tax, start, c.Usertype))
             {
                 return(false);
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         MessageHelper.ShowMessage("E999", ex.Message);
         return(false);
     }
 }