public bool Exists(string keyValue) { WxPropertyInfoEntity entity = service.FindEntity(t => t.WxId == keyValue); if (entity != null) { return(true); } return(false); }
public void SubmitForm(WxPropertyInfoEntity mEntity, string keyValue) { if (string.IsNullOrEmpty(keyValue) == false) { service.Update(mEntity); } else { mEntity.Create(); service.Insert(mEntity); } }
public void AddAccessToken(string apiid, string access_token) { try { WxPropertyInfoEntity wxProperty = new WxPropertyInfoEntity(); wxProperty.IName = "access_token"; wxProperty.TypeId = 1; wxProperty.TypeName = "base"; wxProperty.IContent = access_token; wxProperty.ExpiresIn = 1200; wxProperty.Count = 1; wxProperty.WxId = apiid; wxProperty.Status = true; wxProperty.Create(); service.Insert(wxProperty); } catch (Exception ex) { throw new Exception(ex.Message); } }