public static DataTable GetAll() { string sql = @"select * from QLCV_WebPage"; DataTable dtTable = ServerProvider.ExecuteToDataTable(sql); return(dtTable); }
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); }
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); } }
public static bool Delete(long ID) { try { string sql = "delete from QLCV_WebPage where ID=" + ID + ""; ServerProvider.ExecuteNonQuery(sql); return(true); } catch { return(false); } }
public static bool Delete(int ID) { try { string sql = "delete from QLCV_FieldSetting where ID=" + ID + ""; ServerProvider.ExecuteNonQuery(sql); return(true); } catch { return(false); } }
public static void Update(WebPage cus) { string sql = @"UPDATE [QLCV_WebPage] SET [Page] = '" + cus.Page + @"' ,[Active] = " + cus.Active + @" ,[Type] = '" + cus.Type + @"' WHERE ID=" + cus.ID; ServerProvider.ExecuteNonQuery(sql); }
public static void Update(WebStep cus) { string sql = @"UPDATE [QLCV_WebStep] SET [IDWeb] = " + cus.IDWeb + @" ,[Step] = " + cus.Step + @" ,[Action] = N'" + cus.Action + @"' ,[Message] = N'" + cus.Message + @"' WHERE IDWeb=" + cus.IDWeb + " and Step=" + cus.Step; ServerProvider.ExecuteNonQuery(sql); }
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); }
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); } }
public static DataTable GetFieldForum() { try { string strSQL = "Select * From QLCV_FieldForum"; return(ServerProvider.ExecuteToDataTable(strSQL)); } catch (Exception ex) { return(null); } }
public static void Update(FieldSetting cus) { string sql = @"UPDATE [QLCV_FieldSetting] SET [Control] = N'" + cus.Control + @"' ,[Attribute] = N'" + cus.Attribute + @"' ,[Value] = N'" + cus.Value + @"' ,[Field] = N'" + cus.Field + @"' ,[Type] = '" + cus.Type + @"' WHERE ID=" + cus.ID; ServerProvider.ExecuteNonQuery(sql); }
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); }
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); }
public static long Insert(WebPage cus) { string sql = @"INSERT INTO QLCV_WebPage ([Page] ,[Active] ,[Type]) VALUES (" + cus.Page + @" ," + cus.Active + @" ,'" + cus.Type + @"')"; ServerProvider.ExecuteNonQuery(sql); return(long.Parse(ServerProvider.ExecuteScalar("Select @@IDENTITY").ToString())); }
public static long Insert(WebStep cus) { string sql = @"INSERT INTO QLCV_WebStep ([IDWeb] ,[Step] ,[Action] ,[Message]) VALUES (" + cus.IDWeb + @" ," + cus.Step + @" ,N'" + cus.Action + @"' ,N'" + cus.Message + @"')"; ServerProvider.ExecuteNonQuery(sql); return(1); //return long.Parse(ServerProvider.ExecuteScalar("Select @@IDENTITY").ToString()); }
public static int Insert(FieldSetting cus) { string sql = @"INSERT INTO QLCV_FieldSetting ([Control] ,[Attribute] ,[Value] ,[Field],[Type]) VALUES (N'" + cus.Control + @"' ,N'" + cus.Attribute + @"' ,N'" + cus.Value + @"' ,N'" + cus.Field + @"' ,N'" + cus.Type + @"')"; ServerProvider.ExecuteNonQuery(sql); return(int.Parse(ServerProvider.ExecuteScalar("Select @@IDENTITY").ToString())); }
public static DataTable GetByIDWeb(long _ID) { try { ArrayList arrayValue = new ArrayList(); arrayValue.Add(Const.RegisterKey); arrayValue.Add(_ID); ArrayList arrayPara = new ArrayList(); arrayPara.Add("@RegKey"); arrayPara.Add("@IDWeb"); return(ServerProvider.ExecuteStore("QLCV_Webstep_GetByIDWeb", arrayPara, arrayValue)); } catch (Exception ex) { return(null); } }
//public static DataTable GetAll() //{ // string sql = "select * from WebStep "; // return Provider.ExecuteToDataTable(sql); //} public static void DeleteByID(long ID) { string sql = "delete from QLCV_WebStep where IDWeb=" + ID + ""; ServerProvider.ExecuteNonQuery(sql); }