/// <summary> /// 增加运营商 /// </summary> /// <returns></returns> public JsonResult CreateOperatingMerchant(string UserName, string Password, string ExpireTime, string ContactName, string TenantName, string PhoneNumber, string QQ, string Email, string TenantLogoImgURl) { JsonResult json = new JsonResult(); //OperatingMerchantViewModel omv = new OperatingMerchantViewModel(); //omv.UserName = UserName; //omv.Password = MD5Core.Encrypt(Password); //omv.ExpireTime = Convert.ToDateTime(ExpireTime); //omv.ContactName = ContactName; //omv.TenantName = TenantName; //omv.PhoneNumber = PhoneNumber; //omv.QQ = QQ; //omv.Email = Email; //omv.SuperTenantID = SessionUserInfo.TenantCode; //omv.OperatorLevel = SessionUserInfo.OperatorLevel + 1; //omv.TenantLogoImgURl = TenantLogoImgURl; //if (string.IsNullOrEmpty(omv.TenantLogoImgURl) || omv.TenantLogoImgURl == UploadImageHelper.TenantImgUrl) //{ // omv.TenantLogoImgURl = UploadImageHelper.TenantImgUrl; //} //else //{ // omv.TenantLogoImgURl = BaseController.UploadImgPath + @"/" + omv.TenantLogoImgURl; //} //DBProcessResult result = _IPlatManagerWCFService.AddOperatingMerchant(omv); #region chenh 2013-3-12 VOperatingMerchant operatingMerchant = new VOperatingMerchant(); operatingMerchant.UserName = UserName; operatingMerchant.Password = MD5Core.Encrypt(Password); operatingMerchant.ExpireTime = Convert.ToDateTime(ExpireTime); operatingMerchant.ContactName = ContactName; operatingMerchant.TenantName = TenantName; operatingMerchant.PhoneNumber = PhoneNumber; operatingMerchant.QQ = QQ; operatingMerchant.Email = Email; operatingMerchant.SuperTenantID = SessionUserInfo.TenantCode; operatingMerchant.OperatorLevel = SessionUserInfo.OperatorLevel + 1; operatingMerchant.TenantLogoImgURl = TenantLogoImgURl; if (string.IsNullOrEmpty(operatingMerchant.TenantLogoImgURl) || operatingMerchant.TenantLogoImgURl == UploadImageHelper.TenantImgUrl) { operatingMerchant.TenantLogoImgURl = UploadImageHelper.TenantImgUrl; } else { operatingMerchant.TenantLogoImgURl = BaseController.UploadImgPath + @"/" + operatingMerchant.TenantLogoImgURl; } string msg = string.Empty; bool isSuccess = ModelFacade.Movo.TenantModel.AddOperatingMerchant(operatingMerchant, out msg); #endregion if (isSuccess) { json.Data = new { res = true }; } else { json.Data = new { res = false, message = msg }; } return json; }
/// <summary> /// 修改运营商 /// </summary> /// <returns></returns> public JsonResult UpdateOperatingMerchant(string UserName, string Password, string ExpireTime, string ContactName, string TenantName, string PhoneNumber, string QQ, string Email, string TenantCode, string UserCode, string TenantLogoImgURl) { JsonResult json = new JsonResult(); //OperatingMerchantViewModel omv = new OperatingMerchantViewModel(); //omv.UserName = UserName; ////omv.Password = MD5Core.Encrypt(Password); //omv.ExpireTime = Convert.ToDateTime(ExpireTime); //omv.ContactName = ContactName; //omv.TenantName = TenantName; //omv.PhoneNumber = PhoneNumber; //omv.QQ = QQ; //omv.Email = Email; //omv.TenantCode = TenantCode; //omv.UserCode = UserCode; //omv.SuperTenantID = SessionUserInfo.TenantCode; //omv.TenantLogoImgURl = TenantLogoImgURl; ////omv.UserCode = SessionUserInfo.UserCode; //DBProcessResult result = _IPlatManagerWCFService.ModifyOperatingMerchant(omv); #region chenh 2013-3-12 VOperatingMerchant operatingMerchant = new VOperatingMerchant(); operatingMerchant.UserName = UserName; operatingMerchant.ExpireTime = Convert.ToDateTime(ExpireTime); operatingMerchant.ContactName = ContactName; operatingMerchant.TenantName = TenantName; operatingMerchant.PhoneNumber = PhoneNumber; operatingMerchant.QQ = QQ; operatingMerchant.Email = Email; operatingMerchant.TenantCode = TenantCode; operatingMerchant.UserCode = UserCode; operatingMerchant.SuperTenantID = SessionUserInfo.TenantCode; operatingMerchant.TenantLogoImgURl = TenantLogoImgURl; string msg = string.Empty; bool isSuccess = ModelFacade.Movo.TenantModel.UpdateOperatingMerchant(operatingMerchant, out msg); #endregion if (isSuccess) { json.Data = new { res = true }; } else { json.Data = new { res = false, message = msg }; } return json; }