Пример #1
0
        public void GenerateMaterialMasterTestData(int Records)
        {
            EasyMig.Utility.SampleCustomerRepository repository = new SampleCustomerRepository();
            // to get sample data
            var materialmasters = repository.GetMaterialMaster(Records);

            //Create datatable
            DataTable dt2 = CreateDataTableMaterialMaster(materialmasters);

            //export data to excel file
            string fileName = ExportToExcel(dt2);

            SaveFile(fileName);
        }
Пример #2
0
        public void GenerateTestData(Int32 noOfRecords)
        {
            EasyMig.Utility.SampleCustomerRepository repository = new SampleCustomerRepository();
            // to get sample data
            var customers = repository.GetCustomers(noOfRecords);

            //Create datatable
            DataTable dt = CreateDataTable(customers);

            //export data to excel file
            string fileName = ExportToExcel(dt);

            SaveFile(fileName);
        }
Пример #3
0
        public void GenerateMaterialSalesTestData(int Plantrecords)
        {
            EasyMig.Utility.SampleCustomerRepository repository = new SampleCustomerRepository();
            // to get sample data
            var materialsales = repository.GetMaterialSales(Plantrecords);
            // var m = GeneratePlantData(materialplant);

            //Create datatable
            DataTable dt7 = CreateDataTableMaterialSales(materialsales);

            //export data to excel file
            string fileName = ExportToExcel(dt7);

            SaveFile(fileName);
        }
Пример #4
0
        //material Plant

        public List <Models.MaterialPlant> GenerateMaterialPlantTestData(int Plantrecords)
        {
            EasyMig.Utility.SampleCustomerRepository repository = new SampleCustomerRepository();
            // to get sample data
            var materialplant = repository.GetMaterialPlant(Plantrecords);
            // var m = GeneratePlantData(materialplant);

            //Create datatable
            DataTable dt4 = CreateDataTableMaterialPlant(materialplant);

            //export data to excel file
            string fileName = ExportToExcel(dt4);

            SaveFile(fileName);
            return(materialplant.ToList());
        }
Пример #5
0
        ////material sales list
        //public List<MaterialSales> GenerateSalesData(IEnumerable<MaterialSales> materialsales)
        //{
        //    List<MaterialSales> materialSales = new List<MaterialSales>();
        //    DataSet dt7 = new DataSet();

        //    return materialSales;
        //}


        ////material sales
        //List<int> sales_org = new List<int> { 1000, 1020, 2000, 3000, 3020, 7500};
        //List<int> dist_channel = new List<int> { 10, 20, 12, 10, 30, 10};
        //public DataTable CreateDataTableMaterialSales(IEnumerable<MaterialSales> materialsales)
        //{

        //    DataRow dr7;
        //    //DataTable distinctTable = dt.DefaultView.ToTable( /*distinct*/ true);
        //    int rn = 0;

        //    DataTable dt7 = new DataTable("MaterialSales");
        //    dt7.Columns.Add("MaterialNo", typeof(Int64));
        //    dt7.Columns.Add("Sales_Org", typeof(Int64));
        //    dt7.Columns.Add("Dist_Channel", typeof(Int64));

        //    Int64 matNo = 1100000037;
        //    //  Int64 plantNo = 1000;
        //    Int32 sameNoCount = 0;
        //    rn = RandomNumber(1, 6);


        //    for (int i = 1; i <= 20; i++)
        //    {
        //        int rns = RandomNumber(0, 5);
        //        dr7 = dt7.NewRow();
        //        dr7["MaterialNo"] = matNo;
        //        dr7["Sales_Org"] = sales_org[rns];
        //        dr7["Dist_Channel"] = dist_channel[rns];
        //        dt7.Rows.Add(dr7);

        //        if (sameNoCount == rn)
        //        {
        //            matNo++;
        //            sameNoCount = 0;
        //            rn = RandomNumber(1, 6);
        //        }
        //        sameNoCount++;

        //    }

        //    return dt7;
        //}


        public void GenerateMaterialClassificationTestData(int recorder)
        {
            EasyMig.Utility.SampleCustomerRepository repository = new SampleCustomerRepository();
            // to get sample data
            var materialclassification = repository.GetMaterialClassification(recorder);
            var m = GenerateClassificationData(materialclassification);

            //Create datatable
            DataTable dt7 = CreateDataTableMaterialClassification(m);
            //    var materialPlant = GeneratePlantData(records);

            //export data to excel file
            string fileName = ExportToExcel(dt7);

            SaveFile(fileName);
        }