Example #1
0
        // 修改
        public ResultContent UpdateSMSQuery(SmsQueryVehicleParam para)
        {
            ResultContent rc = new ResultContent();
            // 要校验
            try
            {
                ISMSQueryVehicleService sqv = new SMSQueryVehicleService();
                IdentityNoService identity = new IdentityNoService();
                EMSMSQueryVehicle entity = sqv.GetSMSQuery(para.smsid);

                //entity.CreateDate = DateTime.Now;
                entity.TenantCode = para.TenantCode;
                entity.CustomerName = para.CustomerName;
                entity.CustomerTelephone = para.Telphone;
                entity.IsProfessional = false;
                entity.SMSVehicle.Clear();
                if (!para.vehicleCodelist.IsNullOrEmpty())
                {
                    for (int i = 0; i < para.vehicleCodelist.Count; i++)
                    {
                        EMSMSVehicle vehicle = new EMSMSVehicle()
                        {
                            smsvehicle_id = identity.GetSMSVehicleID(),
                            VehicleCode = para.vehicleCodelist[i],
                            TenantCode = para.TenantCode,
                            LicenseNumber = para.LicenceNumberlist[i]
                        };
                        entity.SMSVehicle.Add(vehicle);
                    }
                }
                sqv.Modify(entity);
                rc.Result = true;
                rc.Message = "修改成功!";
            }
            catch (Exception ex)
            {
                rc.Result = false;
                rc.Message = ex.Message;
                Logger.Error(ex.Message, ex);
            }
            return rc;
        }
Example #2
0
 /// <summary>
 /// 获取短信查询设置
 /// </summary>
 /// <param name="smsid"></param>
 /// <returns></returns>
 public EMSMSQueryVehicle GetSMSQuery(ulong smsid)
 {
     SMSQueryVehicleService service = new SMSQueryVehicleService();
     EMSMSQueryVehicle entity = service.GetSMSQuery(smsid);
     return entity;
 }