public static string GetContent(string Field, int idx) { DBAccess db = new DBAccess(); db.AddParameter("@Field", Field); db.AddParameter("@Idx", idx); string res = Funktioner.ToDbString(db.ExecuteScalar(_SQLSelectGetContent)); //"Co2Db_Combobox_GetContent" if (res.Trim().Length < 1) { res = " "; } return(res); }
public static string GetValueByTitle(string Field, string Title) { DBAccess db = new DBAccess(); db.AddParameter("@Field", Field); db.AddParameter("@Title", Title); string res = Funktioner.ToDbString(db.ExecuteScalar(_SQLSelectGetValueByTitle)); //"Co2Db_Combobox_GetValueByTitle" if (res.Trim().Length < 1) { res = " "; } return(res); }
public static Combobox GetCombobox(string Field, int idx) { int ID = -1; DBAccess db = new DBAccess(); db.AddParameter("@Field", Field); db.AddParameter("@Idx", idx); string res = Funktioner.ToDbString(db.ExecuteScalar(_SQLSelectOne)); //"Co2Db_Combobox_SelectOne" if (Information.IsNumeric(res)) { ID = Funktioner.ToInt(res); } return(GetCombobox(ID)); }
public static string get_PageAccess(string PageUrl, string ApplicationName) { string res = ""; DBAccess db = new DBAccess(); db.AddNVarChar("ApplicationName", ApplicationName, 256); db.AddNVarChar("Page", PageUrl, 250); //db.addGetString("Value") SqlParameter value = new SqlParameter("@Access", 0); value.Direction = ParameterDirection.Output; value.SqlDbType = SqlDbType.NVarChar; value.Size = 250; db.AddParameter(value); db.ExecuteNonQuery(_SQLGetOut); res = Funktioner.ToDbString(value.Value); return(res.Trim()); }
public static string get_SysParm(string Param) { DBAccess db = new DBAccess(); SqlParameter value = new SqlParameter("@Value", 0); string res = ""; value.Direction = ParameterDirection.Output; value.SqlDbType = SqlDbType.NVarChar; value.Size = 250; db.AddParameter("@ApplicationName", SQLfunctions.SQLstr(Roles.ApplicationName)); db.AddParameter("@Title", SQLfunctions.SQLstr(Param)); db.AddParameter(value); db.ExecuteNonQuery("Co2Db_Sysparm_GetOut"); res = Funktioner.ToDbString(value.Value); return(res.Trim()); //If Not (res.Trim = "") Then // Return res 'ToDbString(value.Value) //Else // Return "" 'Nothing //End If }