/// <summary> /// /// </summary> public string GetVipCardInfoData() { var service = new VipCardBLL(CurrentUserInfo); string content = string.Empty; string key = string.Empty; if (Request("VipCardID") != null && Request("VipCardID") != string.Empty) { key = Request("VipCardID").ToString().Trim(); } VipCardEntity data = new VipCardEntity(); data = service.SearchTopVipCard(new VipCardEntity() { VipCardID = key }); string Lock = string.Empty; if (Request("Lock") != null && Request("Lock") != string.Empty) { Lock = Request("Lock").ToString().Trim(); if (Lock == "1") { LockVipCardInfoData(); } } content = data.ToJSON(); return(content); }
/// <summary> /// /// </summary> public string LockVipCardInfoData() { var service = new VipCardBLL(CurrentUserInfo); var vipCardStatusChangeLogBLL = new VipCardStatusChangeLogBLL(CurrentUserInfo); string content = string.Empty; string key = string.Empty; if (Request("VipCardID") != null && Request("VipCardID") != string.Empty) { key = Request("VipCardID").ToString().Trim(); } string Lock = string.Empty; if (Request("Lock") != null && Request("Lock") != string.Empty) { Lock = Request("Lock").ToString().Trim(); } string UnitID = string.Empty; if (Request("UnitID") != null && Request("UnitID") != string.Empty) { UnitID = Request("UnitID").ToString().Trim(); } string VipCardStatusId = string.Empty; if (Request("VipCardStatusId") != null && Request("VipCardStatusId") != string.Empty) { VipCardStatusId = Request("VipCardStatusId").ToString().Trim(); } VipCardEntity data = service.GetByID(key); int? vipCardStatusId = data.VipCardStatusId; if (Lock == "1") { vipCardStatusId = 5; if (VipCardStatusId.Length > 0) { vipCardStatusId = int.Parse(VipCardStatusId); } } service.Update(new VipCardEntity() { VipCardID = key, VipCardStatusId = vipCardStatusId }, null); vipCardStatusChangeLogBLL.Create(new VipCardStatusChangeLogEntity() { LogID = Utils.NewGuid(), VipCardID = key, VipCardStatusID = vipCardStatusId, OldStatusID = data.VipCardStatusId, UnitID = UnitID }); content = data.ToJSON(); return(content); }