public static String GetServerName_RedReport() { DataTable DT = SqlFunctions_RedReport.GetData("select serverproperty('MachineName') "); String servername = DT.Rows[0][0].ToString(); return(servername); }
public static String GetStoreName(String StoreID) { String Name = ""; DataTable DT = SqlFunctions_RedReport.GetData("select store from redmarketstore where storeid=" + StoreID); if (DT.Rows.Count != 0) { return(DT.Rows[0][0].ToString()); } return(Name); }
public static String GetTotalDepartmentSales(String Storeid, String ID_Day) { String Value = "0"; DataTable DT = SqlFunctions_RedReport.GetData("select sum(sales) from reddepartmentsales where storeid=" + Storeid + " and id_day =" + ID_Day); if (DT.Rows.Count != 0) { Value = DT.Rows[0][0].ToString(); } return(Value); }
public static String GetPurchasesSales(String Storeid, String ID_Day) { String Value = "0"; DataTable DT = SqlFunctions_RedReport.GetData("select salesactual from redpurchasessales where storeid=" + Storeid + " and id_day =" + ID_Day); if (DT.Rows.Count != 0) { Value = DT.Rows[0][0].ToString(); } return(Value); }
public static DataTable GetRomFullName(String RegionID, String Discontinued) { DataTable DT = SqlFunctions_RedReport.GetData("Select RomID,Firstname,surname from redmarketroms where regionid=" + RegionID + " and discontinued=" + Discontinued + " order by firstname"); DataTable DTConcatinated = new DataTable(); DTConcatinated.Columns.Add("RomID"); DTConcatinated.Columns.Add("FullName"); foreach (DataRow row in DT.Rows) { DTConcatinated.Rows.Add(row["RomID"].ToString(), row["firstname"].ToString() + " " + row["surname"].ToString()); } return(DTConcatinated); }
public static DataTable GetSalesByStoreIDDate(String StoreID, String ID_Day) { DataTable DT = SqlFunctions_RedReport.GetData("Select * from redpurchasesSales where storeid=" + StoreID + " and ID_DAY=" + ID_Day); return(DT); }
public static DataTable GetStoreList(String regionid, String discontinued) { DataTable DT = SqlFunctions_RedReport.GetData("Select * from redmarketStore where regionid=" + regionid.ToString() + " and discontinued=" + discontinued.ToString() + " order by Store"); return(DT); }
public static DataTable GetFormats() { DataTable DT = SqlFunctions_RedReport.GetData("select * from redmarketformat"); return(DT); }
public static DataTable GetDepartmentStoreTypes() { DataTable DT = SqlFunctions_RedReport.GetData("Select DepartmentStoreTypeID,DepartmentStoreType from redDepartmentStoreType"); return(DT); }
public static DataTable GetRomDetails(String Romid) { DataTable DT = SqlFunctions_RedReport.GetData("select * from vRoms where romid=" + Romid); return(DT); }
public static DataTable GetcurrentDates() { DataTable DT = SqlFunctions_RedReport.GetData("select distinct(id_day) from reddepartmentsales order by id_day"); return(DT); }
public static DataTable GetRegion(String RegionID) { DataTable DT = SqlFunctions_RedReport.GetData("Select RegionID,Region from redMarketRegions where regionid=" + RegionID); return(DT); }
public static DataTable GetRomDetails(String RomID) { DataTable DT = SqlFunctions_RedReport.GetData("Select firstname,surname,contactnumber,regionid,discontinued from redMarketroms where romid=" + RomID); return(DT); }
public static DataTable GetStoreList() { DataTable DT = SqlFunctions_RedReport.GetData("Select * from redmarketStore order by Store"); return(DT); }
public static DataTable GetCategory(String CategoryID) { DataTable DT = SqlFunctions_RedReport.GetData("select category from redmarketcategories where categoryid=" + CategoryID); return(DT); }
public static DataTable GetRomID(String StoreID) { DataTable DT = SqlFunctions_RedReport.GetData("Select romid from redmarketstore where StoreID=" + StoreID); return(DT); }
public static DataTable GetCategoryID(String StoreID) { DataTable DT = SqlFunctions_RedReport.GetData("Select categoryID from redmarketstore where storeid=" + StoreID); return(DT); }
public static DataTable GetDepartmentsByDepartmentStoreTypes(String DepartmentStoreTypes) { DataTable DT = SqlFunctions_RedReport.GetData("Select Departmentid,Department from reddepartments where DepartmentStoretypeid in(" + DepartmentStoreTypes + ")"); return(DT); }
public static DataTable GetDepartments() { DataTable DT = SqlFunctions_RedReport.GetData("Select * from reddepartments"); return(DT); }
public static DataTable GetStoreDetails() { DataTable DT = SqlFunctions_RedReport.GetData("Select Storeid,Store,Region,Format,Category,Rom,Squaremetres,Creationdate,Discontinued,Merged from vStore"); return(DT); }
public static DataTable GetCategories() { DataTable DT = SqlFunctions_RedReport.GetData("select * from redmarketcategories"); return(DT); }
public static DataTable Get_StoreIDStore(String regionid, String discontinued, String Formatid) { DataTable DT = SqlFunctions_RedReport.GetData("Select StoreID,Store from redmarketStore where regionid=" + regionid.ToString() + " and discontinued=" + discontinued.ToString() + " and formatid=" + Formatid + " order by Store"); return(DT); }
public static DataTable GetRegion() { DataTable DT = SqlFunctions_RedReport.GetData("Select * from redMarketRegions"); return(DT); }
public static DataTable Get_StoreIDStore(String regionid) { DataTable DT = SqlFunctions_RedReport.GetData("Select StoreID,Store from redmarketStore where regionid=" + regionid.ToString() + " order by Store"); return(DT); }
public static DataTable Get_AllStoreID() { DataTable DT = SqlFunctions_RedReport.GetData("Select StoreID from redmarketstore"); return(DT); }
public static DataTable GetStoreDetails(String StoreID) { DataTable DT = SqlFunctions_RedReport.GetData("Select Store,region,format,category,rom,squaremetres,creationdate,discontinued,merged,mergedstoreid from vStore where storeid=" + StoreID); return(DT); }
public static DataTable GetDepartmentSalesByStoreidIddayDepartmentID(String Storeid, String ID_DAY, String Departmentid) { DataTable DT = SqlFunctions_RedReport.GetData("select * from reddepartmentsales where storeid=" + Storeid + " and ID_day=" + ID_DAY + " and departmentID=" + Departmentid); return(DT); }
public static DataTable GetDepartmentSalesOverView() { DataTable DT = SqlFunctions_RedReport.GetData("Select * from vDepartmentSalesOverView"); return(DT); }
public static DataTable GetFormatandCategoryByStoreID(String StoreID) { DataTable DT = SqlFunctions_RedReport.GetData("Select Category,Format from vStore where storeid=" + StoreID); return(DT); }
public static DataTable GetFormat(String FormatID) { DataTable DT = SqlFunctions_RedReport.GetData("select format from redmarketformat where formatID=" + FormatID); return(DT); }