예제 #1
0
        protected void btnCreateLedger_OnClick(object sender, EventArgs e)
        {
            objPurchaseLedger    = new PurchaseLedger();
            objPurchaseLedgerBiz = new PurchaseLedgerBiz();

            objPurchaseLedger.SupplierId      = Convert.ToInt32(ddlSupplier.SelectedValue);
            objPurchaseLedger.InvoiceNumber   = txtInvoiceNumber.Text;
            objPurchaseLedger.TransactionType = Convert.ToByte(ddlReceivingType.SelectedValue);
            objPurchaseLedger.ReceivedAmount  = Convert.ToDecimal(txtReceivedAmount.Text);
            objPurchaseLedger.CurrentDue      = txtCurrentDue.Text != "" ? Convert.ToDecimal(txtCurrentDue.Text) : 0;
            objPurchaseLedger.TotalBalance    = txtCurrentBalance.Text != "" ? Convert.ToDecimal(txtCurrentBalance.Text) : 0;
            objPurchaseLedger.CreatedBy       = Convert.ToInt16(Session["UserId"].ToString());

            MessageBox(objPurchaseLedgerBiz.CreatePurchaseLedger(objPurchaseLedger));

            ClearInputs(Controls);
        }
예제 #2
0
        protected void txtInvoiceNumberList_OnTextChanged(object sender, EventArgs e)
        {
            objPurchaseLedger    = new PurchaseLedger();
            objPurchaseLedgerBiz = new PurchaseLedgerBiz();

            objPurchaseLedger = objPurchaseLedgerBiz.GetSingleInvoiceDetail(txtInvoiceNumber.Text.Trim());

            ddlSupplier.SelectedValue = objPurchaseLedger.SupplierId.ToString();
            txtInvoiceDue.Text        = objPurchaseLedger.DueAmount.ToString();

            objSupplier          = new Supplier();
            objSupplierBiz       = new SupplierBiz();
            objSupplier          = objSupplierBiz.GetSupplierDue(ddlSupplier.SelectedValue);
            txtTotalBalance.Text = objSupplier.SupplierDue.ToString();

            ddlReceivingType.Attributes.Add("onfocus", "this.select()");
            ddlReceivingType.Focus();
        }