void frmEntryTransaction_Load(object sender, EventArgs e)
        {
            var accountList = AccountsMasterBusinessLogic.GetAll();

            cmbAccountName.DataSource    = accountList;
            cmbAccountName.DisplayMember = "AccountName";
            cmbAccountName.ValueMember   = "AccountId";

            if (TransactionId > 0)
            {
                var tblTransactionDTO = TransactionBusinessLogic.Get(TransactionId);
                dpTdate.Text = Convert.ToString(tblTransactionDTO.TDate);
                cmbAccountName.SelectedValue = tblTransactionDTO.AccountId;
                if (tblTransactionDTO.TransactionType == 1)
                {
                    rbrecieved.Checked = true;
                }
                else
                {
                    rbPaid.Checked = true;
                }
                txtAmount.Text      = Convert.ToString(tblTransactionDTO.Amount);
                txtChanqueno.Text   = tblTransactionDTO.ChequeNo;
                dpChaqurDate.Text   = Convert.ToString(tblTransactionDTO.ChequeDate);
                txtRecievedby.Text  = tblTransactionDTO.Recievedby;
                txtPaidby.Text      = tblTransactionDTO.PaidBy;
                txtDescription.Text = tblTransactionDTO.Description;
            }
            cmbAccountName.Focus();
        }
        /// <summary>
        /// Fill drop downs
        /// </summary>
        /// <param name="tblTransactionDTO"></param>
        /// <returns></returns>
        private tblTransactionDTO FillDropDown(tblTransactionDTO tblTransactionDTO)
        {
            var accountList = AccountsMasterBusinessLogic.GetAll();

            tblTransactionDTO.Accounts = accountList;
            return(tblTransactionDTO);
        }
        private void FillGridData()
        {
            var accountlist = AccountsMasterBusinessLogic.GetAll();

            foreach (var item in accountlist)
            {
                if (item.AccountType == "1")
                {
                    item.AccountTypeName = "Cash";
                }
                else
                {
                    item.AccountTypeName = "Bank";
                }
            }
            gridViewAccount.DataSource = accountlist;
        }
Example #4
0
        public ActionResult _AjaxGetAccountMaster()
        {
            var AccountsMasterList = AccountsMasterBusinessLogic.GetAll();

            return(View(new GridModel(AccountsMasterList)));
        }