コード例 #1
0
        public static List <HControl> GetByField(string Field, string Type)
        {
            try
            {
                List <HControl> fields = new List <HControl>();
                string          sql    = @"select * from QLCV_FieldSetting where Field='" + Field + "' and Type='" + Type + "'";
                DataTable       table  = ServerProvider.ExecuteToDataTable(sql);
                if (table != null && table.Rows.Count > 0)
                {
                    foreach (DataRow row in table.Rows)
                    {
                        HControl ctr = new HControl();
                        ctr.Control   = row["Control"].ToString();
                        ctr.Attribute = row["Attribute"].ToString();
                        ctr.Value     = row["Value"].ToString();

                        fields.Add(ctr);
                    }
                }

                return(fields);
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
コード例 #2
0
ファイル: WebPage.cs プロジェクト: thachgiasoft/qlcongviec
        public static DataTable GetActive(string Type)
        {
            string    sql     = @"select * from QLCV_WebPage where Active=1 and Type='" + NumCode.UPWEB + "'";
            DataTable dtTable = ServerProvider.ExecuteToDataTable(sql);

            return(dtTable);
        }
コード例 #3
0
ファイル: WebPage.cs プロジェクト: thachgiasoft/qlcongviec
        public static DataTable GetAll()
        {
            string    sql     = @"select * from QLCV_WebPage";
            DataTable dtTable = ServerProvider.ExecuteToDataTable(sql);

            return(dtTable);
        }
コード例 #4
0
 public static DataTable GetByFieldDataTable(string Field, string Type)
 {
     try
     {
         string sql = @"select * from QLCV_FieldSetting where Field='" + Field + "' and Type='" + Type + "'";
         return(ServerProvider.ExecuteToDataTable(sql));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
コード例 #5
0
 public static DataTable GetFieldForum()
 {
     try
     {
         string strSQL = "Select * From QLCV_FieldForum";
         return(ServerProvider.ExecuteToDataTable(strSQL));
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
コード例 #6
0
ファイル: WebPage.cs プロジェクト: thachgiasoft/qlcongviec
        public static WebPage GetByPage(string page)
        {
            string    sql     = @"select * from QLCV_WebPage where Page='" + page + "' and Type='" + NumCode.UPWEB + "'";
            DataTable dtTable = ServerProvider.ExecuteToDataTable(sql);

            if (dtTable.Rows.Count > 0)
            {
                WebPage cus = new WebPage();
                return((WebPage)RootLibrary.GetObjectValue(dtTable.Rows[0], cus));
            }
            return(null);
        }
コード例 #7
0
ファイル: WebPage.cs プロジェクト: thachgiasoft/qlcongviec
        public static WebPage Get(long ID)
        {
            string    sql     = @"select * from QLCV_WebPage where ID=" + ID;
            DataTable dtTable = ServerProvider.ExecuteToDataTable(sql);

            if (dtTable.Rows.Count > 0)
            {
                WebPage cus = new WebPage();
                return((WebPage)RootLibrary.GetObjectValue(dtTable.Rows[0], cus));
            }
            return(null);
        }
コード例 #8
0
        public static FieldSetting Get(long ID)
        {
            Type      type    = typeof(FieldSetting);
            string    sql     = @"select * from QLCV_FieldSetting where ID=" + ID;
            DataTable dtTable = ServerProvider.ExecuteToDataTable(sql);

            if (dtTable.Rows.Count > 0)
            {
                FieldSetting cus = new FieldSetting();
                return((FieldSetting)Common.GetObjectValue(dtTable.Rows[0], type, cus));
            }
            return(null);
        }