Beispiel #1
0
        public static String GetServerName_RedReport()
        {
            DataTable DT         = SqlFunctions_RedReport.GetData("select serverproperty('MachineName') ");
            String    servername = DT.Rows[0][0].ToString();

            return(servername);
        }
Beispiel #2
0
        public static void InsertDefaultStore(String StoreName, String RegionID)
        {
            System.Data.SqlTypes.SqlInt32 x = System.Data.SqlTypes.SqlInt32.Null;
            DbParameter p = new SqlParameter();

            p.DbType = DbType.Int32;
            p.Value  = x;
            SqlFunctions_RedReport.ExecuteNonReturnSQL("Insert into redmarketstore(catmanstoreid,store,regionid,formatid,creationdate,romid,categoryid,squaremetres,discontinued,merged,mergedstoreid) values(0,'" + StoreName + "'," + RegionID + ",3," + DateTime.Now.ToShortDateString() + ",83,14,0,0,0," + p.Value + ")");
        }
Beispiel #3
0
        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 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 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 void UpdateMerged(String StoreID, String Merged)
 {
     SqlFunctions_RedReport.ExecuteNonReturnSQL("Update redmarketstore set merged=" + Merged + " where storeid=" + StoreID);
     if (Merged == "0")
     {
         System.Data.SqlTypes.SqlInt32 x = System.Data.SqlTypes.SqlInt32.Null;
         DbParameter p = new SqlParameter();
         p.DbType = DbType.Int32;
         p.Value  = x;
         SqlFunctions_RedReport.ExecuteNonReturnSQL("Update redmarketstore set mergedstoreid=" + p.Value + " where storeid=" + StoreID);
     }
 }
        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 void UpdateMergedS(String StoreID, String MergedStoreID)
 {
     SqlFunctions_RedReport.ExecuteNonReturnSQL("Update redmarketstore set mergedstoreid=" + MergedStoreID + " where storeid=" + StoreID);
 }
        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);
        }
Beispiel #10
0
        public static DataTable GetcurrentDates()
        {
            DataTable DT = SqlFunctions_RedReport.GetData("select distinct(id_day) from reddepartmentsales order by id_day");

            return(DT);
        }
Beispiel #11
0
        public static DataTable GetRomDetails(String Romid)
        {
            DataTable DT = SqlFunctions_RedReport.GetData("select * from vRoms where romid=" + Romid);

            return(DT);
        }
Beispiel #12
0
        public static DataTable GetRegion()
        {
            DataTable DT = SqlFunctions_RedReport.GetData("Select * from redMarketRegions");

            return(DT);
        }
Beispiel #13
0
        public static DataTable GetCategories()
        {
            DataTable DT = SqlFunctions_RedReport.GetData("select * from redmarketcategories");

            return(DT);
        }
        public static DataTable GetDepartmentStoreTypes()
        {
            DataTable DT = SqlFunctions_RedReport.GetData("Select DepartmentStoreTypeID,DepartmentStoreType from redDepartmentStoreType");

            return(DT);
        }
        public static DataTable GetDepartmentSalesOverView()
        {
            DataTable DT = SqlFunctions_RedReport.GetData("Select * from vDepartmentSalesOverView");

            return(DT);
        }
        public static DataTable Get_AllStoreID()
        {
            DataTable DT = SqlFunctions_RedReport.GetData("Select StoreID from redmarketstore");

            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_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);
        }
Beispiel #19
0
        public static DataTable GetCategory(String CategoryID)
        {
            DataTable DT = SqlFunctions_RedReport.GetData("select category from redmarketcategories where categoryid=" + CategoryID);

            return(DT);
        }
        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);
        }
Beispiel #21
0
        public static DataTable GetRegion(String RegionID)
        {
            DataTable DT = SqlFunctions_RedReport.GetData("Select RegionID,Region from redMarketRegions where regionid=" + RegionID);

            return(DT);
        }
 public static void UpdateDiscontinued(String StoreID, String discontinued)
 {
     SqlFunctions_RedReport.ExecuteNonReturnSQL("Update redmarketstore set discontinued=" + discontinued + " where storeid=" + StoreID);
 }
        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 void UpdateStore(String StoreID, String store)
 {
     SqlFunctions_RedReport.ExecuteNonReturnSQL("Update redmarketstore set store='" + store + "' where storeid=" + StoreID);
 }
 public static void InsertDepartmentSale(String StoreID, String ID_Day, String Departmentid, String value)
 {
     SqlFunctions_RedReport.ExecuteNonReturnSQL("Insert into redDepartmentsales(StoreID,ID_Day,DepartmentID,Sales) values(" + StoreID + "," + ID_Day + "," + Departmentid + "," + value + ")");
 }
        public static DataTable GetRomID(String StoreID)
        {
            DataTable DT = SqlFunctions_RedReport.GetData("Select romid from redmarketstore where StoreID=" + StoreID);

            return(DT);
        }
Beispiel #27
0
        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 void UpdateSquareMetres(String StoreID, String SquareMetres)
 {
     SqlFunctions_RedReport.ExecuteNonReturnSQL("Update redmarketstore set SquareMetres=" + SquareMetres + " where storeid=" + StoreID);
 }
 public static void UpdateRomID(String StoreID, String RomID)
 {
     SqlFunctions_RedReport.ExecuteNonReturnSQL("Update redmarketstore set RomID=" + RomID + " where storeid=" + StoreID);
 }
        public static DataTable GetStoreList()
        {
            DataTable DT = SqlFunctions_RedReport.GetData("Select * from redmarketStore order by Store");

            return(DT);
        }