public Tb_Wx_Entrustinfo(IdoDataSource dataSource, long PrimaryID)
     : this()
 {
     this.EB_connection   = dataSource;
     this.PrimaryKeyValue = PrimaryID;
     this.Load();
 }
예제 #2
0
 public Tb_Wx_Ticket(IdoDataSource dataSource, object PrimaryID)
     : this()
 {
     this.EB_connection    = dataSource;
     this.OPrimaryKeyValue = PrimaryID;
     this.Load();
 }
예제 #3
0
 public Tb_Wx_Ucard(IdoDataSource dataSource, object PrimaryID)
     : this()
 {
     this.EB_connection   = dataSource;
     this.PrimaryKeyValue = Convert.ToInt32(PrimaryID.ToString());
     this.Load();
 }
예제 #4
0
        public string GetAccessToken(string appid, string secret, IdoDataSource DataSource)
        {
            string result = string.Empty;
            var    db     = new Tb_Wx_Ticket(DataSource);
            var    t      = db.FindFirst <Tb_Wx_Ticket>(string.Format("appid='{0}_tic'", appid));

            if (t == null || t != null && t.OperateTime.AddSeconds(t.ExpiresIn).CompareTo(DateTime.Now) < 0)
            {
                result = inGetAccessToken(appid, secret);
                if (t == null)
                {
                    t    = new Tb_Wx_Ticket(DataSource);
                    t.Id = t.Create();
                }
                t.OperateTime = DateTime.Now;
                t.Ticket      = result;
                t.ExpiresIn   = 7200;
                t.Store();
            }
            else
            {
                result = t.Ticket;
            }
            return(result);
        }
예제 #5
0
 public Tb_Wx_Mobilecode(IdoDataSource dataSource, object PrimaryID)
     : this()
 {
     this.EB_connection    = dataSource;
     this.OPrimaryKeyValue = PrimaryID;
     this.PrimaryKeyValue  = PrimaryID.ToString().Vlong();
     this.Load();
 }
예제 #6
0
 protected override void OnActionExecuted(ActionExecutedContext filterContext)
 {
     if (m_Frame_dataSource != null)
     {
         m_Frame_dataSource.Close();
         m_Frame_dataSource.Dispose();
         m_Frame_dataSource = null;
     }
     if (m_crm_dataSource != null)
     {
         m_crm_dataSource.Close();
         m_crm_dataSource.Dispose();
         m_crm_dataSource = null;
     }
     base.OnActionExecuted(filterContext);
 }
예제 #7
0
 public Bus(IdoDataSource DataSource)
 {
     this.DataSource = DataSource;
 }
예제 #8
0
 public Tb_Wx_Mobilecode(IdoDataSource dataSource)
     : this()
 {
     this.EB_connection = dataSource;
 }
예제 #9
0
 public Tb_Wx_Ticket(IdoDataSource dataSource)
     : this()
 {
     this.EB_connection = dataSource;
 }
예제 #10
0
 public Tb_Wx_Ucard(IdoDataSource dataSource)
     : this()
 {
     this.EB_connection = dataSource;
 }
예제 #11
0
 public Tb_Wx_Pappay(IdoDataSource dataSource)
     : this()
 {
     this.EB_connection = dataSource;
 }
 public Tb_Wx_Entrustinfo(IdoDataSource dataSource)
     : this()
 {
     this.EB_connection = dataSource;
 }
예제 #13
0
 public Tb_Wx_Userinfo(IdoDataSource dataSource)
     : this()
 {
     this.EB_connection = dataSource;
 }