Esempio n. 1
0
        private void dgBindingFrm_Load(object sender, EventArgs e)
        {
            //Initialize Controller
            m_AppController = new AppController();

            /* Note that the DataProvider class is static, so it doesn't
             * get instantiated. */

            //Get Customer List
            CommandGettingOutlet getOutlets = new CommandGettingOutlet();

            m_OutletList = (outletList)m_AppController.ExecuteCommand(getOutlets);

            // Get invoices List
            CommandGetInvoices getInvoices = new CommandGetInvoices();

            m_Invoices = (InvoiceList)m_AppController.ExecuteCommand(getInvoices);

            CommandGetRoti getRoti = new CommandGetRoti();

            m_RotiList = (RotiToChooseList)m_AppController.ExecuteCommand(getRoti);

            //Bind Grids
            outletItemBindingSource.DataSource       = m_OutletList;
            rotiToChooseItemBindingSource.DataSource = m_RotiList;

            bindingInvoice.DataSource = m_Invoices;
            bindingItem.DataSource    = bindingInvoice;
            bindingItem.DataMember    = "Items";
        }
Esempio n. 2
0
        private void FrmOutlet_Load(object sender, EventArgs e)
        {
            m_AppController = new AppController();

            CommandGettingOutlet getOutlet = new CommandGettingOutlet();

            m_List = (outletList)m_AppController.ExecuteCommand(getOutlet);

            outletItemBindingSource.DataSource = m_List;
        }
Esempio n. 3
0
        private void FrmViewInvoice_Load(object sender, EventArgs e)
        {
            //Initialize Controller
            m_AppController = new AppController();

            /* Note that the DataProvider class is static, so it doesn't
             * get instantiated. */

            //Get Customer List
            CommandGettingOutlet getOutlets = new CommandGettingOutlet();

            m_Outlet = (outletList)m_AppController.ExecuteCommand(getOutlets);

            // Get invoices List
            CommandGetInvoices getInvoices = new CommandGetInvoices();

            m_Invoices = (InvoiceList)m_AppController.ExecuteCommand(getInvoices);


            invoiceItemBindingSource.DataSource = m_Invoices;


            #region [ CardView... ]

            //card.CaptionField = "OUTLETCODE";
            //card.CardSpacingWidth = 10;
            //card.CardSpacingHeight = 10;
            //card.MaxCardCols = 5;
            //card.CaptionHeight = 35;
            //card.CardBackColor = Color.Lavender;
            //card.WireGrid(this.gridDataBoundGrid1);

            #endregion

            //Assumes this.dataTable is a DataTable object with at least 2 columns named "id" and "display".



            //Sets the style properties.

            GridStyleInfo style = this.gridDataBoundGrid1.GridBoundColumns[3].StyleInfo;

            style.CellType = "ComboBox";

            style.DataSource = m_Outlet;

            //Displays in the grid cell.
            style.DisplayMember = "OutletName";

            //Values in the grid cell.
            style.ValueMember = "OutletCode";

            style.DropDownStyle = GridDropDownStyle.AutoComplete;
        }
Esempio n. 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            //ReportDocument invoiceObjectReport = new ReportDocument(); ;
            //invoiceObjectReport.Load(Application.StartupPath + "\\rptInvoice.rpt");


            m_AppController = new AppController();

            CommandGetInvoices getInvoices = new CommandGetInvoices();

            m_InvoiceList = (InvoiceList)m_AppController.ExecuteCommand(getInvoices);

            CommandGettingOutlet getOutlet = new CommandGettingOutlet();

            m_OutletList = (outletList)m_AppController.ExecuteCommand(getOutlet);

            CommandGetRoti getRotis = new CommandGetRoti();

            m_RotiToChooseList = (RotiToChooseList)m_AppController.ExecuteCommand(getRotis);

            CommandGetItem getInvoiceDetai = new CommandGetItem();

            m_InvoiceDetailList = (RotiList)m_AppController.ExecuteCommand(getInvoiceDetai);


            //FieldingRw crInvoice = new FieldingRw();
            rptInvoice crInvoice = new rptInvoice();

            //rptSubReportInvoice crInvoice = new rptSubReportInvoice();

            //Set DataSource First
            crInvoice.Database.Tables["Invoice_OTC_Model_InvoiceItem"].SetDataSource(m_InvoiceList);
            crInvoice.Subreports[0].Database.Tables["Invoice_OTC_Model_RotiToChooseItem"].SetDataSource(m_RotiToChooseList);
            crInvoice.Subreports[0].Database.Tables["Invoice_OTC_Model_RotiItem"].SetDataSource(m_InvoiceDetailList);
            crInvoice.Database.Tables["Invoice_OTC_Model_OutletItem"].SetDataSource(m_OutletList);

            //Set the parameter value
            crInvoice.SetParameterValue("nomorInvoice", nomorInvoice);

            crystalReportViewer1.ReportSource = crInvoice;
            crystalReportViewer1.Refresh();
        }