protected string GetAgents(int agid)
        {
            List <Agentstbl> lstAgents   = new List <Agentstbl>();
            Agentstbl        ags         = new Agentstbl();
            AgentsBL         objAgentsBL = new AgentsBL();

            ags.Status = 1;
            lstAgents  = objAgentsBL.GetAgentsByStatus(ags).ToList();
            ListItem l = new ListItem();

            l.Text  = "--Select--";
            l.Value = 0.ToString();
            ddlFromAccount.Items.Add(l);
            foreach (var cnt in lstAgents)
            {
                ListItem li = new ListItem();
                li.Text  = cnt.AgencyName;
                li.Value = cnt.AgentID.ToString();
                ddlFromAccount.Items.Add(li);
            }
            var agent = lstAgents.OfType <Agentstbl>().Where(a => a.AgentID == agid);

            //return agent.First().AgencyName;
            return(agent.Count() > 0 ? agent.First().AgencyName : "");
        }
        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 void Page_Load(object sender, EventArgs e)
        {
            AgentsBL objAgentsBL = new AgentsBL();

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

            if (!IsPostBack)
            {
                GetAccReceipts();
            }
        }
        protected string GetAgents(int agid)
        {
            List <Agentstbl> lstAgents   = new List <Agentstbl>();
            Agentstbl        ags         = new Agentstbl();
            AgentsBL         objAgentsBL = new AgentsBL();

            lstAgents = objAgentsBL.GetAllAgents(ags).ToList();
            var agent = lstAgents.OfType <Agentstbl>().Where(a => a.AgentID == agid);

            //return agent.First().AgencyName;
            return(agent.Count() > 0 ? agent.First().AgencyName : "");
        }
示例#5
0
        protected string GetAgents()
        {
            List <Agentstbl> lstAgents   = new List <Agentstbl>();
            Agentstbl        ags         = new Agentstbl();
            AgentsBL         objAgentsBL = new AgentsBL();

            lstAgents = objAgentsBL.GetAllAgents(ags).ToList();
            foreach (var cnt in lstAgents)
            {
                ags.AgencyName = cnt.AgencyName;
            }

            return(ags.AgencyName);
        }
        protected void GetAgents()
        {
            AgentsBL         objAgentBL = new AgentsBL();
            List <Agentstbl> lstAgent   = new List <Agentstbl>();
            Agentstbl        Agt        = new Agentstbl();

            Agt.IsActive = 1;
            lstAgent     = objAgentBL.GetAllAgents(Agt).ToList();
            foreach (var cnt in lstAgent)
            {
                ListItem li = new ListItem();
                li.Text  = cnt.AgencyName;
                li.Value = cnt.AgentID.ToString();
            }
        }
 protected void GetAgents()
 {
     List<Agentstbl> lstAgents = new List<Agentstbl>();
     Agentstbl ags = new Agentstbl();
     AgentsBL objAgentsBL = new AgentsBL();
     //ags.Status = "1";
     lstAgents = objAgentsBL.GetAllAgents(ags).ToList();
     ListItem m = new ListItem();
     m.Text = "--Select--";
     m.Value = 0.ToString();
     ddlAgent.Items.Add(m);
     foreach (var cntt in lstAgents)
     {
         ListItem la = new ListItem();
         la.Text = cntt.AgencyName;
         la.Value = cntt.AgentID.ToString();
         ddlAgent.Items.Add(la);
     }
 }
示例#8
0
        protected void GetAgentName(string RoleId)
        {
            ddlName.Items.Clear();
            List <Agentstbl> lstAgents = new List <Agentstbl>();
            Agentstbl        agt       = new Agentstbl();
            //agt.AgentID = 1;
            AgentsBL objAgentsBL = new AgentsBL();

            lstAgents = objAgentsBL.GetAllAgents(agt).ToList();
            ListItem l = new ListItem();

            l.Text  = "--Select--";
            l.Value = 0.ToString();
            ddlName.Items.Add(l);
            foreach (var em in lstAgents)
            {
                ListItem li = new ListItem();
                li.Text  = em.FirstName + ' ' + em.LastName;
                li.Value = em.AgentID.ToString();
                ddlName.Items.Add(li);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            AgentsBL objAgentsBL = new AgentsBL();
            lstAgents = objAgentsBL.GetAllAgents(cntt).ToList();

            BookingDetailsBL objBookingDetailsBL = new BookingDetailsBL();
            lstBookings = objBookingDetailsBL.GetAllBooking(bdt).ToList();

            //EmployeeBL objEmployeeBL = new EmployeeBL();
            //lstEmployee = objEmployeeBL.GetAllEmployee(ept).ToList();

            SuppliersBL objSuppliersBL = new SuppliersBL();
            lstSuppliers = objSuppliersBL.GetAllSuppliers(spt).ToList();

            if (!IsPostBack)
            {
                GetAllBookings();
                GetAgents();
                GetBookingDetails();
                //GetEmployee();
                GetSuppliers();
            }
        }
        public static void SetListBoxAgents(TextBox sender, ListBox lbDest)
        {
            List <ListItem> AgentList = AgentsBL.GetAgent_Predictive(sender.Text);

            SetListBox(sender, lbDest, AgentList);
        }
示例#11
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();
            }
        }