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);
                }
            }
        }
        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);
                }
            }
        }
        protected string GetMajorAccounts(int mjid)
        {
            List <MajorAccounttbl> lstMajor          = new List <MajorAccounttbl>();
            MajorAccounttbl        MC                = new MajorAccounttbl();
            MajorAccountBL         objMajorAccountBL = new MajorAccountBL();

            MC.Status = 1;
            lstMajor  = objMajorAccountBL.GetAccountsByStatus(MC).ToList();
            ListItem ma = new ListItem();

            ma.Text  = "--Select--";
            ma.Value = 0.ToString();
            ddlMAccountList.Items.Add(ma);
            foreach (var mt in lstMajor)
            {
                ListItem lb = new ListItem();
                lb.Text  = mt.MajorAccountName;
                lb.Value = mt.MajorAccountID.ToString();
                ddlMAccountList.Items.Add(lb);
            }
            var major = lstMajor.OfType <MajorAccounttbl>().Where(a => a.MajorAccountID == mjid);

            //return major.First().MajorAccountName;
            return(major.Count() > 0 ? major.First().MajorAccountName : "");
        }
        protected string GetMajorAccounts(int mjid)
        {
            List <MajorAccounttbl> lstMajor          = new List <MajorAccounttbl>();
            MajorAccounttbl        MC                = new MajorAccounttbl();
            MajorAccountBL         objMajorAccountBL = new MajorAccountBL();

            lstMajor = objMajorAccountBL.GetAllAccounts(MC).ToList();
            var major = lstMajor.OfType <MajorAccounttbl>().Where(c => c.MajorAccountID == mjid);

            //return major.First().MajorAccountName;
            return(major.Count() > 0 ? major.First().MajorAccountName : "");
        }
        //List<MajorAccounttbl> lstMajorAccount = new List<MajorAccounttbl>();
        protected void Page_Load(object sender, EventArgs e)
        {
            MajorAccountBL objMajorAccountBL = new MajorAccountBL();

            lstMajorAccount = objMajorAccountBL.GetAllAccounts(mct).ToList();
            if (!IsPostBack)
            {
                GetAllMinorAccount();
                GetAllAccountsMajorActive();
                //GetAllAccounts();
            }
        }
        protected void GetMajorAccounts()
        {
            List <MajorAccounttbl> lstMajor          = new List <MajorAccounttbl>();
            MajorAccounttbl        MC                = new MajorAccounttbl();
            MajorAccountBL         objMajorAccountBL = new MajorAccountBL();

            MC.Status = 1;
            lstMajor  = objMajorAccountBL.GetAccountsByStatus(MC).ToList();
            ListItem ma = new ListItem();

            ma.Text  = "--Select--";
            ma.Value = 0.ToString();
            ddlMAccountList.Items.Add(ma);
            foreach (var mt in lstMajor)
            {
                ListItem lb = new ListItem();
                lb.Text  = mt.MajorAccountName;
                lb.Value = mt.MajorAccountID.ToString();
                ddlMAccountList.Items.Add(lb);
            }
        }
        protected void GetAllAccounts()
        {
            MajorAccounttbl matl = new MajorAccounttbl();
            MajorAccountBL  objMajorAccountBL = new MajorAccountBL();

            //matl.Status = 1;
            lstMajorAccount = objMajorAccountBL.GetAllAccounts(matl).ToList();
            DdlMajorAccount.Items.Clear();
            ListItem l = new ListItem();

            l.Text  = "--Select--";
            l.Value = 0.ToString();
            DdlMajorAccount.Items.Add(l);
            foreach (var cnt in lstMajorAccount)
            {
                ListItem li = new ListItem();
                li.Text  = cnt.MajorAccountName.ToString();
                li.Value = cnt.MajorAccountID.ToString();
                DdlMajorAccount.Items.Add(li);
            }
        }
        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();
            }
        }
示例#9
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();
            }
        }