示例#1
0
 private void dataBody_SelectionChanged(object sender, EventArgs e)
 {
     if (dataBody.SelectedRows.Count > 0)
     {
         body = Helpers.ReaderHelper.SelectBodyOnId("spBillQuery", 22, System.Convert.ToInt32(dataBody.Rows[dataBody.CurrentRow.Index].Cells[7].Value.ToString()));
     }
 }
示例#2
0
        private void BillBody_Load(object sender, EventArgs e)
        {
            body = new Classes.BillBody();
            conn = new SqlConnection(Form1.connString);

            //adapter = new SqlDataAdapter("select articlname as [Artikl / Usluga], Quantity as [Količina], uom.name as [Jedinica mjere], sum as [Iznos (kn)], PDV, b.description as [Napomena], b.id from billbody b inner join UnitOfMeasure uom on b.UnitOfMeasureID = uom.id where b.billhead = " + this.head.Id.ToString(), conn);
            Helpers.ReaderHelper.RefreshComboBox("select id, name from UnitOfMeasure where statusid = 1", ref cmbUoM, "UnitOfMeasure", "name", "id");

            this.Text = "Stavke računa: " + this.head.BillNumber;
            //label1.Text = this.head.Id.ToString();

            txtNumber.Text       = head.BillNumber;
            mtxtDate.Text        = head.BillDate.ToShortDateString();
            txtStore.Text        = Classes.MainHelper.GetOneValue("select name from store where id = " + head.StoreID.ToString());
            txtBillCategory.Text = Classes.MainHelper.GetOneValue("select name from BillCategory where id = " + head.BillCategoryID.ToString());
            txtBillPurpose.Text  = Classes.MainHelper.GetOneValue("select name from BillPurpose where id = " + head.BillPurposeID.ToString());
            txtSumTotal.Text     = head.TotalSum.ToString();
            txtSumTotal.Refresh(txtSumTotal);
            txtSumTotal.Refresh();
            txtPdvTotal.Text = head.TotalPdv.ToString();
            RefreshGrid();
            txtArticl.Focus();
        }
示例#3
0
 public BillBodyUpdate(Classes.BillHead head, Classes.BillBody body)
 {
     this.head = head;
     this.body = body;
     InitializeComponent();
 }