コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BankBL objBankBL = new BankBL();

            lstBank = objBankBL.GetAllBanks(cnt).ToList();

            SuppliersBL objSuppliersBL = new SuppliersBL();

            lstSuppliers = objSuppliersBL.GetAllSuppliers(cntt).ToList();

            MajorAccountBL objMajorAccountBL = new MajorAccountBL();

            lstMajor = objMajorAccountBL.GetAllAccounts(mt).ToList();

            MinorAccountBL objMinorAccountBL = new MinorAccountBL();

            lstMinor = objMinorAccountBL.GetAllMinorAccount(nt).ToList();

            if (!IsPostBack)
            {
                if (Session["PaymentID"].ToString() != null)
                {
                    int PaymentID = Convert.ToInt32(Session["PaymentID"]);
                    GetPaymentsByID(PaymentID);
                }
            }
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BankBL objBankBL = new BankBL();

            lstBank = objBankBL.GetAllBanks(cnt).ToList();

            AgentsBL objAgentsBL = new AgentsBL();

            lstAgents = objAgentsBL.GetAllAgents(cntt).ToList();

            MajorAccountBL objMajorAccountBL = new MajorAccountBL();

            lstMajor = objMajorAccountBL.GetAllAccounts(mt).ToList();

            MinorAccountBL objMinorAccountBL = new MinorAccountBL();

            lstMinor = objMinorAccountBL.GetAllMinorAccount(nt).ToList();

            //divPM.Visible = false;
            //divCheque.Visible = false;
            //divDD.Visible = false;
            //divBank.Visible = false;
            //divCard.Visible = false;
            //divTD.Visible = false;
            //divRN.Visible = false;

            if (!IsPostBack)
            {
                if (Session["ReceiptID"].ToString() != null)
                {
                    int ReceiptID = Convert.ToInt32(Session["ReceiptID"]);
                    GetAccReceiptById(ReceiptID);
                }
            }
        }
コード例 #3
0
        protected string GetBank(int bkid)
        {
            List <Bankstbl> lstBank   = new List <Bankstbl>();
            Bankstbl        bnk       = new Bankstbl();
            BankBL          objbankBL = new BankBL();

            lstBank = objbankBL.GetAllBanks(bnk).ToList();
            var bank = lstBank.OfType <Bankstbl>().Where(b => b.BankID == bkid);

            //return bank.First().BankName;
            return(bank.Count() > 0 ? bank.First().BankName : "");
        }
コード例 #4
0
        protected void GetBank()
        {
            Bankstbl        ba  = new Bankstbl();
            List <Bankstbl> lst = new List <Bankstbl>();

            lst = objBankBL.GetAllBanks(ba).ToList();
            if (lst.Count() >= 1)
            {
                gdvBank.DataSource = lst;
                gdvBank.DataBind();
            }
            else
            {
                DataTable dt = new DataTable();
                gdvBank.DataSource = dt;
                gdvBank.DataBind();
            }
        }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BankBL objBankBL = new BankBL();

            lstBank = objBankBL.GetAllBanks(cnt).ToList();

            SuppliersBL objSuppliersBL = new SuppliersBL();

            lstSuppliers = objSuppliersBL.GetAllSuppliers(cntt).ToList();

            MajorAccountBL objMajorAccountBL = new MajorAccountBL();

            lstMajor = objMajorAccountBL.GetAllAccounts(mt).ToList();

            MinorAccountBL objMinorAccountBL = new MinorAccountBL();

            lstMinor = objMinorAccountBL.GetAllMinorAccount(nt).ToList();

            if (!IsPostBack)
            {
                divPM.Visible     = false;
                divCheque.Visible = false;
                divDD.Visible     = false;
                divBank.Visible   = false;
                divCard.Visible   = false;
                divTD.Visible     = false;
                divRN.Visible     = false;

                //divCheque.Attributes.Remove("class");
                //divDD.Attributes.Remove("class");
                //divBank.Attributes.Remove("class");
                //divCard.Attributes.Remove("class");
                //divTD.Attributes.Remove("class");
                //divRN.Attributes.Remove("class");

                lblPaymentMode.Visible     = false;
                ddlPaymentMode.Visible     = false;
                lblChequeNo.Visible        = false;
                txtChequeNo.Visible        = false;
                lblChequeDate.Visible      = false;
                txtChequeDate.Visible      = false;
                lblAcNO.Visible            = false;
                txtAcNo.Visible            = false;
                lblDDNo.Visible            = false;
                txtDDNo.Visible            = false;
                lblDDDate.Visible          = false;
                txtDDDate.Visible          = false;
                lblBankName.Visible        = false;
                txtBankName.Visible        = false;
                lblCardNo.Visible          = false;
                txtCardNo.Visible          = false;
                lblTransactionDate.Visible = false;
                txtTransactionDate.Visible = false;
                lblReferenceNo.Visible     = false;
                txtReferenceNo.Visible     = false;
                Random rnd = new Random();
                int    num = rnd.Next(10000);
                txtVoucherNumber.Text = "MFB" + num;

                GetSuppliers();
                GetMajorAccounts();
                GetMinorAccounts();
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            BankBL objBankBL = new BankBL();

            lstBank = objBankBL.GetAllBanks(cnt).ToList();

            AgentsBL objAgentsBL = new AgentsBL();

            lstAgents = objAgentsBL.GetAllAgents(cntt).ToList();

            MajorAccountBL objMajorAccountBL = new MajorAccountBL();

            lstMajor = objMajorAccountBL.GetAllAccounts(mt).ToList();

            MinorAccountBL objMinorAccountBL = new MinorAccountBL();

            lstMinor = objMinorAccountBL.GetAllMinorAccount(nt).ToList();

            //divPM.Visible = false;
            //divCheque.Visible = false;
            //divDD.Visible = false;
            //divBank.Visible = false;
            //divCard.Visible = false;
            //divTD.Visible = false;
            //divRN.Visible = false;

            if (!IsPostBack)
            {
                divPM.Visible     = false;
                divCheque.Visible = false;
                divDD.Visible     = false;
                divBank.Visible   = false;
                divCard.Visible   = false;
                divTD.Visible     = false;
                divRN.Visible     = false;

                lblChequeNo.Visible        = false;
                txtChequeNo.Visible        = false;
                lblChequeDate.Visible      = false;
                txtChequeDate.Visible      = false;
                lblDDNo.Visible            = false;
                txtDDNo.Visible            = false;
                lblDate.Visible            = false;
                txtDate.Visible            = false;
                lblAccountNo.Visible       = false;
                txtAccountNo.Visible       = false;
                lblBankName.Visible        = false;
                txtBankName.Visible        = false;
                lblCardNo.Visible          = false;
                txtCardNo.Visible          = false;
                lblTransactionDate.Visible = false;
                txtTransactionDate.Visible = false;
                lblReferenceNo.Visible     = false;
                txtReferenceNo.Visible     = false;
                Random rnd = new Random();
                int    num = rnd.Next(10000);
                txtVoucherNo.Text = "MFB" + num;

                GetAgents();
                GetMajorAccounts();
                GetMinorAccounts();
            }
        }