Esempio n. 1
0
        public static object CreateDataAccess(Provider provider)
        {
            Type   type = BuildManager.GetType(provider.ProviderType, true);
            object obj  = Activator.CreateInstance(type, AppEnv.GetConnectionString(provider.ConnectionString));

            return(obj);
        }
Esempio n. 2
0
        public static DataTable Vnm_Confirm_Link_Getall()
        {
            DataSet ds = SqlHelper.ExecuteDataset(AppEnv.GetConnectionString("ConnectionString_TTND_Services")
                                                  , "Vnm_Confirm_Link_Getall");

            if (ds != null && ds.Tables.Count > 0)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 3
0
        //public static DataTable S2_TTKD_ServiceConfig_GetInfo(int Service_Id)
        //{
        //    DataSet ds = SqlHelper.ExecuteDataset(AppEnv.GetConnectionString("ConnectionString_TTND_Services"), CommandType.Text,
        //                String.Format("Select Link_Detail_Smartphone,Link_Default_Smartphone,Link_Detail,Link_Default from S294x_ServiceConfig where Service_Id = " + Service_Id + ""));
        //    if (ds != null && ds.Tables.Count > 0)
        //        return ds.Tables[0];
        //    return null;
        //}
        public static DataTable S2_TTKD_ServiceConfig_GetInfo(int Service_Id)
        {
            DataSet ds = SqlHelper.ExecuteDataset(AppEnv.GetConnectionString("ConnectionString_TTND_Services")
                                                  , "S294x_ServiceConfig_GetInfo", Service_Id);

            if (ds != null && ds.Tables.Count > 0)
            {
                return(ds.Tables[0]);
            }
            return(null);
        }
Esempio n. 4
0
        public static DataAccessProvider CreateDataAccess(DataAccessProviderConfiguration objConfig)
        {
            if (objProvider != null)
            {
                return(objProvider);
            }
            Type type = Type.GetType(((Provider)objConfig.Providers[objConfig.DefaultProvider]).ProviderType);

            objProvider = (DataAccessProvider)Activator.CreateInstance(type, AppEnv.GetConnectionString(((Provider)objConfig.Providers[objConfig.DefaultProvider]).ConnectionString));
            return(objProvider);
        }
Esempio n. 5
0
        public static bool S2_TTKD_GetUserInfo(string Msisdn)
        {
            DataSet ds = SqlHelper.ExecuteDataset(AppEnv.GetConnectionString("ConnectionString_TTND_Services"), CommandType.Text,
                                                  String.Format("Select count(1) as count from S2_TTND_Registered_Users where User_id = '" + Msisdn + "' and status = 1"));

            if (ds != null && ds.Tables.Count > 0)
            {
                if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
                {
                    if (ConvertUtility.ToInt32(ds.Tables[0].Rows[0]["count"]) > 0)
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }