Пример #1
0
        public JsonResult New(AD_UserEquipment ue)
        {
            Response res = new Response();

            try
            {
                AD_UserEquipmentsBL ueb = new AD_UserEquipmentsBL();
                ue.IsActive = true;
                if (ue.UEId > 0)
                {
                    ueb.Manage("Update", ue);
                }
                else
                {
                    ueb.Manage("Insert", ue);
                }
                res.Status  = "success";
                res.Message = "save successfully";
            }
            catch (Exception ex)
            {
                res.Status  = "danger";
                res.Message = ex.Message;
            }
            return(Json(res, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public Response SetDeviceNumber(string IMEI, string DeviceNumber)
        {
            Response r = new Response();

            try
            {
                AD_UserEquipmentsBL ueb = new AD_UserEquipmentsBL();
                AD_UserEquipment    ue  = new AD_UserEquipment();
                ue.SerialNo = IMEI;
                ue.UENumber = DeviceNumber.Trim();
                ueb.Manage("Set_DeviceNumber", ue);

                r.Status  = "success";
                r.Message = "success";
            }
            catch (Exception ex)
            {
                r.Status  = "error";
                r.Message = ex.Message;
            }
            return(r);
        }
Пример #3
0
        public Response ChangeToken(string IMEI, string Token)
        {
            Response r = new Response();

            try
            {
                AD_UserEquipmentsBL ueb = new AD_UserEquipmentsBL();
                AD_UserEquipment    ue  = new AD_UserEquipment();
                ue.SerialNo = IMEI;
                ue.Token    = Token;

                ueb.Manage("Set_Token", ue);

                r.Status  = "success";
                r.Message = "success";
            }
            catch (Exception ex)
            {
                r.Status  = "error";
                r.Message = ex.Message;
            }

            return(r);
        }