Esempio n. 1
0
        public DataTable postPurchasePerMonthToDb(DashBoardPurchasePerMonth objDashBoardPurchasePerMonth)
        {
            SqlCommand    command = new SqlCommand();
            SqlConnection conn    = new SqlConnection(strConn);

            conn.Open();
            command.Connection  = conn;
            command.CommandType = CommandType.StoredProcedure;
            command.CommandText = "Mst_GetPurchasePerMonth";

            command.Parameters.AddWithValue("@SellerId", objDashBoardPurchasePerMonth.SellerId);
            //command.Parameters.AddWithValue("@OrderDate", objDashBoardPurchasePerMonth.StartDate);
            //command.Parameters.AddWithValue("@DeliveryDate", objDashBoardPurchasePerMonth.EndDate);


            SqlDataAdapter adapter = new SqlDataAdapter(command);

            DataSet fileData = new DataSet();

            adapter.Fill(fileData, "fileData");
            conn.Close();
            DataTable firstTable = fileData.Tables[0];

            return(firstTable);
        }
Esempio n. 2
0
        public DataTable getHighestValueProductsByMonth(DashBoardPurchasePerMonth objDashBoardPurchasePerMonth)
        {
            SqlCommand    command = new SqlCommand();
            SqlConnection conn    = new SqlConnection(strConn);

            command.Connection  = conn;
            command.CommandType = CommandType.StoredProcedure;
            command.CommandText = "Mst_HighestValue_Products_By_Current_Month";

            command.Parameters.AddWithValue("@SellerId", objDashBoardPurchasePerMonth.SellerId);
            command.Parameters.AddWithValue("@CurrentMonthDate", objDashBoardPurchasePerMonth.StartDateOfMonth);
            SqlDataAdapter adapter = new SqlDataAdapter(command);

            conn.Open();

            DataSet fileData = new DataSet();

            adapter.Fill(fileData, "fileData");
            conn.Close();
            DataTable firstTable = fileData.Tables[0];

            return(firstTable);
        }
Esempio n. 3
0
        public DataTable getPurchaseAmountPerMonthByVendors(DashBoardPurchasePerMonth objDashBoardPurchasePerMonth)
        {
            SqlCommand    command = new SqlCommand();
            SqlConnection conn    = new SqlConnection(strConn);

            command.Connection  = conn;
            command.CommandType = CommandType.StoredProcedure;
            command.CommandText = "Mst_GetPurchaseAmountByMonthByVendor";

            command.Parameters.AddWithValue("@SellerId", objDashBoardPurchasePerMonth.SellerId);
            command.Parameters.AddWithValue("@StartDateOfMonth", objDashBoardPurchasePerMonth.StartDateOfMonth);
            SqlDataAdapter adapter = new SqlDataAdapter(command);

            conn.Open();

            DataSet fileData = new DataSet();

            adapter.Fill(fileData, "fileData");
            conn.Close();
            DataTable firstTable = fileData.Tables[0];

            return(firstTable);
        }