Exemplo n.º 1
0
        public bool Exists(string keyValue)
        {
            WxPropertyInfoEntity entity = service.FindEntity(t => t.WxId == keyValue);

            if (entity != null)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
 public void SubmitForm(WxPropertyInfoEntity mEntity, string keyValue)
 {
     if (string.IsNullOrEmpty(keyValue) == false)
     {
         service.Update(mEntity);
     }
     else
     {
         mEntity.Create();
         service.Insert(mEntity);
     }
 }
Exemplo n.º 3
0
 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);
     }
 }