コード例 #1
0
        private void PaginationDataGridView()
        {
            BLClient bl = new BLClient();
            BindingList <ClientModel> list = bl.GetClientBi(txtName.Text, txtSurName.Text, txtClientCode.Text, null, skip_page, take_page);

            foreach (ClientModel client in list)
            {
                dataPartners.Rows.Add(client.ClientId, client.ClientName, client.ClientSurname, client.ClientCode, client.PhoneNo, client.Email);
            }

            lblPage.Text      = this.currentpage.ToString() + "/" + this.total_page.ToString();
            txtTotalPage.Text = this.total_page.ToString();
        }
コード例 #2
0
        public void PopulateForm(string clientName, string clientSurname, string clientCode, int clientId)
        {
            BLClient bl = new BLClient();
            BindingList <ClientModel> list = bl.GetClientBi(clientName, clientSurname, clientCode, clientId, null, null);

            foreach (ClientModel cm in list)
            {
                txtClientName.Text    = cm.ClientName;
                txtClientSurName.Text = cm.ClientSurname;
                txtClientCode.Text    = cm.ClientCode;
                txtClientPhone.Text   = cm.PhoneNo;
                txtClientEmail.Text   = cm.Email;
            }
            this.clientCodeInitial = txtClientCode.Text;
        }
コード例 #3
0
        private void InvoiceForm_Load(object sender, EventArgs e)
        {
            BLClient bl = new BLClient();
            BindingList <ClientModel> listClients = bl.GetClientBi("", "", "", null, null, null);

            foreach (ClientModel client in listClients)
            {
                comboBoxFilterClientName.Items.Add(client.ClientName + ' ' + client.ClientSurname);
            }

            this.dateTimePickerStartDate.CustomFormat  = " ";
            this.dateTimePickerStartDate.Format        = DateTimePickerFormat.Custom;
            this.dateTimePickerFinishDate.CustomFormat = " ";
            this.dateTimePickerFinishDate.Format       = DateTimePickerFormat.Custom;
            dateTimePickerStartDate.ValueChanged      += DateTimePickerStartDate_ValueChanged;
            dateTimePickerStartDate.ShowCheckBox       = true;
            dateTimePickerFinishDate.ValueChanged     += DateTimePickerFinishDate_ValueChanged;
            dateTimePickerFinishDate.ShowCheckBox      = true;

            dataGridViewInvoice.Columns.Add("invoiceId", "invoiceId");
            dataGridViewInvoice.Columns.Add("invoiceNumber", "Numar Factura");
            dataGridViewInvoice.Columns.Add("invoiceDate", "Data Factura");
            dataGridViewInvoice.Columns.Add("clientId", "clientId");
            dataGridViewInvoice.Columns.Add("clientName", "Nume Client");
            dataGridViewInvoice.Columns.Add("clientAddressId", "clientAddressId");
            dataGridViewInvoice.Columns.Add("clientAddress", "Adresa Client");
            dataGridViewInvoice.Columns.Add("userId", "userId");
            dataGridViewInvoice.Columns.Add("invoiceObs", "Observatii");
            dataGridViewInvoice.Columns.Add("invoiceStatus", "invoiceStatus");
            dataGridViewInvoice.AutoGenerateColumns = false;
            dataGridViewInvoice.Columns[0].Visible  = false;
            dataGridViewInvoice.Columns[3].Visible  = false;
            dataGridViewInvoice.Columns[5].Visible  = false;
            dataGridViewInvoice.Columns[7].Visible  = false;
            dataGridViewInvoice.Columns[9].Visible  = false;

            BLInvoice bliv = new BLInvoice();
            BindingList <InvoiceModel> listInvoice = bliv.BLGetInvoice(null, Convert.ToDateTime("01/01/1980"), Convert.ToDateTime("01/01/3000"), txtNrInvoice.Text, comboBoxFilterClientName.Text);

            foreach (InvoiceModel invoice in listInvoice)
            {
                dataGridViewInvoice.Rows.Add(invoice.invoiceId, invoice.invoiceNumber, invoice.invoiceDate, invoice.clientId, invoice.clientName, invoice.clientAddressId, invoice.clientAddress, invoice.userId, invoice.observations, invoice.status);
            }
        }
コード例 #4
0
        private void InvoiceAddForm_Load(object sender, EventArgs e)
        {
            if (invoiceIdSelected == 0)
            {
                btnSave.Text = "Salveaza";
            }
            else
            {
                btnSave.Text = "Modifica";
            }
            BLClient bl = new BLClient();

            listClients = bl.GetClientBi("", "", "", null, null, null);
            foreach (ClientModel client in listClients)
            {
                comboBoxClientName.Items.Add(client.ClientName + ' ' + client.ClientSurname);
            }

            dataGridViewItems.Columns.Add("invoiceDetailId", "invoiceDetailId");
            dataGridViewItems.Columns.Add("invoiceId", "invoiceId");
            dataGridViewItems.Columns.Add("itemId", "itemId");
            dataGridViewItems.Columns.Add("itemName", "Nume Articol");
            dataGridViewItems.Columns.Add("qtty", "Cantitate");
            dataGridViewItems.Columns.Add("price", "Pret");
            dataGridViewItems.Columns.Add("amount", "Valoare");
            dataGridViewItems.Columns.Add("observation", "Observatii");
            dataGridViewItems.Columns.Add("status", "Status");
            dataGridViewItems.Columns.Add("Unique", "Codul Unic");

            dataGridViewItems.Columns[0].Visible = false;
            dataGridViewItems.Columns[1].Visible = false;
            dataGridViewItems.Columns[2].Visible = false;
            dataGridViewItems.Columns[9].Visible = false;

            BLInvoiceDetail blid = new BLInvoiceDetail();
            BindingList <InvoiceDetailModel> list = blid.BLGetInvoiceDetail(invoiceIdSelected, null);

            foreach (InvoiceDetailModel detail in list)
            {
                dataGridViewItems.Rows.Add(detail.invoiceDetailId, detail.invoiceId, detail.itemId, detail.itemName, detail.qtty, detail.price, detail.amount, detail.observation, detail.status, detail.unique);
            }
        }