private void Form1_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 invoices List CommandGetInvoices getInvoices = new CommandGetInvoices(); m_Invoices = (InvoiceList)m_AppController.ExecuteCommand(getInvoices); //Get Customer List CommandGetCustomer getCustomer = new CommandGetCustomer(); m_Customer = (CustomerList)m_AppController.ExecuteCommand(getCustomer); //Bind Grids bindingInvoice.DataSource = m_Invoices; bindingItems.DataSource = bindingInvoice; bindingItems.DataMember = "Items"; namaInstitusiCmb.DataSource = m_Customer; bindingCustomer.DataSource = m_Customer; }
private void detailedBindingForm_Load(object sender, EventArgs e) { m_AppController = new AppController(); m_Control = new miscellanacousFunction(); CommandGetInvoices getInvoices = new CommandGetInvoices(); m_InvoiceList = (InvoiceList)m_AppController.ExecuteCommand(getInvoices); CommandGetOutlet getOutlets = new CommandGetOutlet(); m_OutletList = (outletList)m_AppController.ExecuteCommand(getOutlets); CommandGetRoti getRoti = new CommandGetRoti(); m_RotiToChooseList = (RotiToChooseList)m_AppController.ExecuteCommand(getRoti); outletItemBindingSource.DataSource = m_OutletList; RotiToChooseBindingSource.DataSource = m_RotiToChooseList; invoiceItemBindingSource.DataSource = m_InvoiceList; itemsBindingSource.DataSource = invoiceItemBindingSource; itemsBindingSource.DataMember = "Items"; //invoiceItemBindingSource.Position = 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"; }
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; }
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(); }