Пример #1
0
        private void StartMigration()
        {
            CompanyMaster        companyMaster        = new CompanyMaster();
            ItemMaster           itemMaster           = new ItemMaster();
            PersonRouteMaster    personRouteMaster    = new PersonRouteMaster();
            PersonalLedgerMaster personalLedgerMaster = new PersonalLedgerMaster();
            AccountLedgerMaster  accountLedgerMaster  = new AccountLedgerMaster();
            SupplierLedgerMaster supplierLedgerMaster = new SupplierLedgerMaster();
            CustomerLedgerMaster customerLedgerMaster = new CustomerLedgerMaster();
            BillOutstanding      billOutstanding      = new BillOutstanding();
            FIFO fifo = new FIFO();

            int result;

            grdDataMigration.Rows.Add("Company Master", "Processing", 0);
            result = 0;

            result = companyMaster.InsertCompanyMasterData();

            grdDataMigration.Rows[0].Cells[1].Value = "Completed";
            grdDataMigration.Rows[0].Cells[2].Value = result;

            grdDataMigration.Rows.Add("A.S.M.", "Processing", 0);
            result = 0;

            result = personRouteMaster.InsertASMData();

            grdDataMigration.Rows[1].Cells[1].Value = "Completed";
            grdDataMigration.Rows[1].Cells[2].Value = result;

            grdDataMigration.Rows.Add("R.S.M.", "Processing", 0);
            result = 0;

            result = personRouteMaster.InsertRSMData();

            grdDataMigration.Rows[2].Cells[1].Value = "Completed";
            grdDataMigration.Rows[2].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Z.S.M.", "Processing", 0);
            result = 0;

            result = personRouteMaster.InsertZSMData();

            grdDataMigration.Rows[3].Cells[1].Value = "Completed";
            grdDataMigration.Rows[3].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Sales Man", "Processing", 0);
            result = 0;

            result = personRouteMaster.InsertSalesManData();

            grdDataMigration.Rows[4].Cells[1].Value = "Completed";
            grdDataMigration.Rows[4].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Area", "Processing", 0);
            result = 0;

            result = personRouteMaster.InsertAreaData();

            grdDataMigration.Rows[5].Cells[1].Value = "Completed";
            grdDataMigration.Rows[5].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Route", "Processing", 0);
            result = 0;

            result = personRouteMaster.InsertRouteData();

            grdDataMigration.Rows[6].Cells[1].Value = "Completed";
            grdDataMigration.Rows[6].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Personal Details", "Processing", 0);
            result = 0;

            result = personalLedgerMaster.InsertPersonalLedgerMasterData();

            grdDataMigration.Rows[7].Cells[1].Value = "Completed";
            grdDataMigration.Rows[7].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Control Codes", "Processing", 0);
            result = 0;

            result = accountLedgerMaster.InsertControlCodesData();

            grdDataMigration.Rows[8].Cells[1].Value = "Completed";
            grdDataMigration.Rows[8].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Income Ledger", "Processing", 0);
            result = 0;

            result = accountLedgerMaster.InsertIncomeLedgerData();

            grdDataMigration.Rows[9].Cells[1].Value = "Completed";
            grdDataMigration.Rows[9].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Expenditure Ledger", "Processing", 0);
            result = 0;

            result = accountLedgerMaster.InsertExpenditureLedgerData();

            grdDataMigration.Rows[10].Cells[1].Value = "Completed";
            grdDataMigration.Rows[10].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Transaction Books", "Processing", 0);
            result = 0;

            result = accountLedgerMaster.InsertTransactionLedgerData();

            grdDataMigration.Rows[11].Cells[1].Value = "Completed";
            grdDataMigration.Rows[11].Cells[2].Value = result;

            grdDataMigration.Rows.Add("General Ledger", "Processing", 0);
            result = 0;

            result = accountLedgerMaster.InsertGeneralLedgerData();

            grdDataMigration.Rows[12].Cells[1].Value = "Completed";
            grdDataMigration.Rows[12].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Purchase Ledger", "Processing", 0);
            result = 0;

            result = accountLedgerMaster.InsertPurchaseLedgerData();

            grdDataMigration.Rows[13].Cells[1].Value = "Completed";
            grdDataMigration.Rows[13].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Sale Ledger", "Processing", 0);
            result = 0;

            result = accountLedgerMaster.InsertSaleLedgerData();

            grdDataMigration.Rows[14].Cells[1].Value = "Completed";
            grdDataMigration.Rows[14].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Item Master", "Processing", 0);
            result = 0;

            result = itemMaster.InsertItemMasterData();

            grdDataMigration.Rows[15].Cells[1].Value = "Completed";
            grdDataMigration.Rows[15].Cells[2].Value = result;

            grdDataMigration.Rows.Add("FIFO", "Processing", 0);
            result = 0;

            result = fifo.InsertFIFOData();

            grdDataMigration.Rows[16].Cells[1].Value = "Completed";
            grdDataMigration.Rows[16].Cells[2].Value = result;


            grdDataMigration.Rows.Add("Supplier Ledger", "Processing", 0);
            result = 0;

            result = supplierLedgerMaster.InsertSupplierLedgerMasterData();

            grdDataMigration.Rows[17].Cells[1].Value = "Completed";
            grdDataMigration.Rows[17].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Customer Ledger", "Processing", 0);
            result = 0;

            result = customerLedgerMaster.InsertCustomerLedgerMasterData(); //confirm mapping columns for columns having comments in CustomerLedgerMaster

            grdDataMigration.Rows[18].Cells[1].Value = "Completed";
            grdDataMigration.Rows[18].Cells[2].Value = result;

            //For below method check comments in CustomerLedgerMaster
            grdDataMigration.Rows.Add("Customer Company Discount", "Processing", 0);
            result = 0;

            result = customerLedgerMaster.InsertCustomerCompanyReferenceData();

            grdDataMigration.Rows[19].Cells[1].Value = "Completed";
            grdDataMigration.Rows[19].Cells[2].Value = result;


            //For below method check comments in CustomerLedgerMaster
            grdDataMigration.Rows.Add("Supplier Company Discount", "Processing", 0);
            result = 0;

            result = supplierLedgerMaster.InsertSupplierCompanyReferenceData();

            grdDataMigration.Rows[20].Cells[1].Value = "Completed";
            grdDataMigration.Rows[20].Cells[2].Value = result;

            grdDataMigration.Rows.Add("Bill Oustanding", "Processing", 0);
            result = 0;

            result = billOutstanding.InsertBillOutstandingData();

            grdDataMigration.Rows[21].Cells[1].Value = "Completed";
            grdDataMigration.Rows[21].Cells[2].Value = result;


            MessageBox.Show("Process Completed");
        }
Пример #2
0
        private void StartMigration()
        {
            CompanyMaster        companyMaster        = new CompanyMaster();
            ItemMaster           itemMaster           = new ItemMaster();
            PersonRouteMaster    personRouteMaster    = new PersonRouteMaster();
            PersonalLedgerMaster personalLedgerMaster = new PersonalLedgerMaster();
            AccountLedgerMaster  accountLedgerMaster  = new AccountLedgerMaster();
            SupplierLedgerMaster supplierLedgerMaster = new SupplierLedgerMaster();
            CustomerLedgerMaster customerLedgerMaster = new CustomerLedgerMaster();
            BillOutstanding      billOutstanding      = new BillOutstanding();
            FIFO fifo = new FIFO();
            PurchaseSaleBookHeaderMigration   purchaseSaleBookHeaderMigration   = new PurchaseSaleBookHeaderMigration();
            PurchaseSaleBookLineItemMigration purchaseSaleBookLineItemMigration = new PurchaseSaleBookLineItemMigration();
            TRN trn = new TRN();
            ReceiptPaymentMigration receiptPayment = new ReceiptPaymentMigration();
            BillOutStandingsAudjustmentMigration billOsAdjustment = new BillOutStandingsAudjustmentMigration();


            int result   = 0;
            int rowIndex = 0;

            SetProcessingText(grdDataMigration, "Company Master", rowIndex, "Processing", result, true);
            result = companyMaster.InsertCompanyMasterData();
            SetProcessingText(grdDataMigration, "Company Master", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "ASM", rowIndex, "Processing", result, true);
            result = personRouteMaster.InsertASMData();
            SetProcessingText(grdDataMigration, "ASM", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "RSM", rowIndex, "Processing", result, true);
            result = personRouteMaster.InsertRSMData();
            SetProcessingText(grdDataMigration, "RSM", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "ZSM", rowIndex, "Processing", result, true);
            result = personRouteMaster.InsertZSMData();
            SetProcessingText(grdDataMigration, "ZSM", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Sales Man", rowIndex, "Processing", result, true);
            result = personRouteMaster.InsertSalesManData();
            SetProcessingText(grdDataMigration, "Sales Man", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Area", rowIndex, "Processing", result, true);
            result = personRouteMaster.InsertAreaData();
            SetProcessingText(grdDataMigration, "Area", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Route", rowIndex, "Processing", result, true);
            result = personRouteMaster.InsertRouteData();
            SetProcessingText(grdDataMigration, "Route", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Personal Ledger", rowIndex, "Processing", result, true);
            result = personalLedgerMaster.InsertPersonalLedgerMasterData();
            SetProcessingText(grdDataMigration, "Personal Ledger", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Control Codes", rowIndex, "Processing", result, true);
            result = accountLedgerMaster.InsertControlCodesData();
            SetProcessingText(grdDataMigration, "Control Codes", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Income Ledger", rowIndex, "Processing", result, true);
            result = accountLedgerMaster.InsertIncomeLedgerData();
            SetProcessingText(grdDataMigration, "Income Ledger", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Expenditure Ledger", rowIndex, "Processing", result, true);
            result = accountLedgerMaster.InsertExpenditureLedgerData();
            SetProcessingText(grdDataMigration, "Expenditure Ledger", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Transaction Ledger", rowIndex, "Processing", result, true);
            result = accountLedgerMaster.InsertTransactionLedgerData();
            SetProcessingText(grdDataMigration, "Transaction Ledger", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "General Ledger", rowIndex, "Processing", result, true);
            result = accountLedgerMaster.InsertGeneralLedgerData();
            SetProcessingText(grdDataMigration, "General Ledger", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Purchase Ledger", rowIndex, "Processing", result, true);
            result = accountLedgerMaster.InsertPurchaseLedgerData();
            SetProcessingText(grdDataMigration, "Purchase Ledger", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Sale Ledger", rowIndex, "Processing", result, true);
            result = accountLedgerMaster.InsertSaleLedgerData();
            SetProcessingText(grdDataMigration, "Sale Ledger", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Item Master", rowIndex, "Processing", result, true);
            result = itemMaster.InsertItemMasterData();
            SetProcessingText(grdDataMigration, "Item Master", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Supplier Ledger", rowIndex, "Processing", result, true);
            result = supplierLedgerMaster.InsertSupplierLedgerMasterData();
            SetProcessingText(grdDataMigration, "Supplier Ledger", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Customer Ledger", rowIndex, "Processing", result, true);
            result = customerLedgerMaster.InsertCustomerLedgerMasterData(); //confirm mapping columns for columns having comments in CustomerLedgerMaster
            SetProcessingText(grdDataMigration, "Customer Ledger", rowIndex, "Completed", result, false);

            //result = 0;
            //rowIndex += 1;
            //SetProcessingText(grdDataMigration, "Customer Compnay Discount Ref", rowIndex, "Processing", result, true);
            //result = customerLedgerMaster.InsertCustomerCompanyReferenceData();
            //SetProcessingText(grdDataMigration, "Customer Compnay Discount Ref", rowIndex, "Completed", result, false);

            //result = 0;
            //rowIndex += 1;
            //SetProcessingText(grdDataMigration, "Suppiier Compnay Discount Ref", rowIndex, "Processing", result, true);
            //result = supplierLedgerMaster.InsertSupplierCompanyReferenceData();
            //SetProcessingText(grdDataMigration, "Suppiier Compnay Discount Ref", rowIndex, "Completed", result, false);

            /*------------------------------------------------------------*/

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "PurchaseSaleBookHeaderData", rowIndex, "Processing", result, true);
            result = purchaseSaleBookHeaderMigration.InsertPurchaseSaleBookHeaderData();
            SetProcessingText(grdDataMigration, "PurchaseSaleBookHeaderData", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "PurchaseSaleBookLineItemData", rowIndex, "Processing", result, true);
            result = purchaseSaleBookLineItemMigration.InsertPurchaseSaleBookLineItemData();
            SetProcessingText(grdDataMigration, "PurchaseSaleBookLineItemData", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Fifo", rowIndex, "Processing", result, true);
            result = fifo.InsertFIFOData();
            SetProcessingText(grdDataMigration, "Fifo", rowIndex, "Completed", result, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "Bill Outstanding", rowIndex, "Processing", result, true);
            result = billOutstanding.InsertBillOutstandingData();
            SetProcessingText(grdDataMigration, "Bill Outstanding", rowIndex, "Completed", result, false);


            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "TRN", rowIndex, "Processing", result, true);
            trn.InsertTRNData();
            SetProcessingText(grdDataMigration, "TRN", rowIndex, "Completed", 0, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "ReceiptPayment", rowIndex, "Processing", result, true);
            result = receiptPayment.InsertReceiptPaymentData();
            SetProcessingText(grdDataMigration, "ReceiptPayment", rowIndex, "Completed", 0, false);

            result    = 0;
            rowIndex += 1;
            SetProcessingText(grdDataMigration, "BillOutStandingsAudjustment", rowIndex, "Processing", result, true);
            result = billOsAdjustment.InsertBillOutStandingsAudjustmentData();
            SetProcessingText(grdDataMigration, "BillOutStandingsAudjustment", rowIndex, "Completed", 0, false);

            /* ---------------------------------------  ---------------------------------------*/

            MessageBox.Show("Process Completed");
        }