Exemplo n.º 1
0
 public ActionResult AddShipVia(CMS_ShipVia_Model shipViaModel, User_Profile_Model userModel)
 {
     try
     {
         string msg          = string.Empty;
         var    isSucceesfue = new ShipViaServices().AddShipVia(shipViaModel, userModel, out msg);
         if (isSucceesfue)
         {
             return(Json(new NBCMSResultJson
             {
                 Status = StatusType.OK,
                 Data = "OK"
             }));
         }
         else
         {
             return(Json(new NBCMSResultJson
             {
                 Status = StatusType.Error,
                 Data = msg == string.Empty ? "Fail to add new ship via" : msg
             }));
         }
     }
     catch (Exception ex)
     {
         NBCMSLoggerManager.Error(ex.Message);
         NBCMSLoggerManager.Error(ex.Source);
         return(Json(new NBCMSResultJson
         {
             Status = StatusType.Exception,
             Data = ex.Message
         }));
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// CMS只需要知道SHIPVIAType(物流or快递)就足够了,但是同步到eCom需要确切知道type下面的子类型.2014年5月12日10:07:32
 /// </summary>
 /// <param name="sModel"></param>
 /// <returns></returns>
 public ActionResult UpdateDefaultShipVia(CMS_ShipVia_Model sModel, User_Profile_Model userModel)
 {
     try
     {
         var isSucceesfue = new ShipViaServices().UpdateDefaultShipVia(sModel, userModel);
         return(Json(new NBCMSResultJson
         {
             Status = isSucceesfue == true ? StatusType.OK : StatusType.Error,
             Data = isSucceesfue == true ? "OK" : "Fail to set default shipvia for current item."
         }));
     }
     catch (Exception ex)
     {
         NBCMSLoggerManager.Error(ex.Message);
         NBCMSLoggerManager.Error(ex.Source);
         return(Json(new NBCMSResultJson
         {
             Status = StatusType.Exception,
             Data = ex.Message
         }));
     }
 }