Пример #1
0
        protected void GetCountry()
        {
            Countrytbl        ls  = new Countrytbl();
            List <Countrytbl> lst = new List <Countrytbl>();

            lst = objCountryBL.GetAllCountry(ls).ToList();
            gdvCountry.DataSource = lst;
            gdvCountry.DataBind();
        }
Пример #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Countrytbl ls = new Countrytbl();

            ls.CountryName = txtCountry.Text;
            ls.IsActive    = 1;
            ls.CreatedBy   = 1;
            ls.CreatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            List <Countrytbl> lst = new List <Countrytbl>();

            lst = objCountryBL.SaveCountry(ls).ToList();
            ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Country Saved Successfully');", true);
            Clear();
            GetCountry();
        }
Пример #3
0
        protected void GetCountry()
        {
            List <Countrytbl> lstCountry   = new List <Countrytbl>();
            Countrytbl        ctry         = new Countrytbl();
            CountryBL         objcountryBL = new CountryBL();

            lstCountry = objcountryBL.GetAllCountry(ctry).ToList();
            foreach (var cnt in lstCountry)
            {
                ListItem li = new ListItem();
                li.Text  = cnt.CountryName;
                li.Value = cnt.CountryID.ToString();
                DDlCountry.Items.Add(li);
            }
        }
Пример #4
0
        protected void getCountrybyCountryName(int id)
        {
            Countrytbl ls = new Countrytbl();

            ls.CountryID = id;
            List <Countrytbl> lst = new List <Countrytbl>();

            lst = objCountryBL.GetCountryById(ls).ToList();

            foreach (var el in lst)
            {
                txtCountry.Text    = el.CountryName;
                hdnCountryID.Value = el.CountryID.ToString();
            }
            btnSave.Visible   = false;
            btnUpdate.Visible = true;
        }
Пример #5
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            Countrytbl ls = new Countrytbl();

            ls.CountryID   = Convert.ToInt32(hdnCountryID.Value);
            ls.CountryName = txtCountry.Text;
            List <Countrytbl> lst = new List <Countrytbl>();

            ls.IsActive    = 1;
            ls.UpdatedBy   = 1;
            ls.UpdatedDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            lst            = objCountryBL.UpdateCountry(ls).ToList();
            ScriptManager.RegisterStartupScript(this, GetType(), "alertMessage", "alertMessage('Country Updated Successfully');", true);
            Clear();
            btnUpdate.Visible = false;
            btnSave.Visible   = true;
            GetCountry();
        }
Пример #6
0
        protected void lbtnCMarkAsActive_Click(object sender, EventArgs e)
        {
            LinkButton  lbtn = (LinkButton)sender;
            GridViewRow gvr  = (GridViewRow)lbtn.NamingContainer;
            var         val  = gvr.DataItemIndex;
            var         id   = gvr.Cells[2].Text;
            Countrytbl  cnt  = new Countrytbl();

            cnt.CountryID = Convert.ToInt32(gvr.Cells[0].Text);
            if (id == "Active")
            {
                cnt.IsActive = 0;
            }
            else if (id == "InActive")
            {
                cnt.IsActive = 1;
            }
            objCountryBL.UpdateCountryIsActive(cnt);
            GetCountry();
        }
        protected void BookingDetails()
        {
            BookingRequesttbl        brt   = new BookingRequesttbl();
            List <BookingRequesttbl> lstbr = new List <BookingRequesttbl>();

            brt.RequestId = Convert.ToInt32(Session["RequestId"]);
            lstbr         = objReBL.GetBookingRequestbyId(brt).ToList();
            foreach (var el in lstbr)
            {
                lblDest.Text = el.Destination;
                //lblIn.Text = el.Nationality;

                Countrytbl cn = new Countrytbl();
                cn.CountryID = Convert.ToInt32(el.Nationality);
                var cval = objCountryBL.GetCountryById(cn);
                lblIn.Text = cval.First().CountryName;


                lblHName.Text        = el.PreferedHotels;
                txtCheckInDate.Text  = Convert.ToDateTime(el.Checkin).ToShortDateString();
                txtCheckOutDate.Text = Convert.ToDateTime(el.Checkout).ToShortDateString();
                GetRequestByID(brt.RequestId);
            }
        }
Пример #8
0
 public IEnumerable <Countrytbl> GetCountryByIsActive(Countrytbl ls)
 {
     return(objCountryDA.CountryAll(8, ls));
 }
Пример #9
0
 public IEnumerable <Countrytbl> UpdateCountryStatus(Countrytbl ls)
 {
     return(objCountryDA.CountryAll(7, ls));
 }
Пример #10
0
 public IEnumerable <Countrytbl> UpdateCountryIsActive(Countrytbl ls)
 {
     return(objCountryDA.CountryAll(6, ls));
 }
Пример #11
0
 public IEnumerable <Countrytbl> DeleteCountry(Countrytbl ls)
 {
     return(objCountryDA.CountryAll(5, ls));
 }
Пример #12
0
 public IEnumerable <Countrytbl> SaveCountry(Countrytbl ls)
 {
     return(objCountryDA.CountryAll(3, ls));
 }
Пример #13
0
 public IEnumerable <Countrytbl> GetCountryById(Countrytbl ls)
 {
     return(objCountryDA.CountryAll(2, ls));
 }
Пример #14
0
 public IEnumerable <Countrytbl> GetAllCountry(Countrytbl ls)
 {
     return(objCountryDA.CountryAll(1, ls));
 }
Пример #15
0
        protected void GetAgentsById(int AgentsID)
        {
            Agentstbl at = new Agentstbl
            {
                AgentID = AgentsID
            };

            List <Agentstbl> lstAgents = new List <Agentstbl>();

            lstAgents = objagBL.GetAgentById(at).ToList();


            foreach (var el in lstAgents)
            {
                if (el.CategoryId == 0)
                {
                    lblCN.Text = "B2B";
                }
                else if (el.CategoryId == 1)
                {
                    lblCN.Text = "B2C";
                }
                else if (el.CategoryId == 2)
                {
                    lblCN.Text = "Others";
                }

                lblWeb.Text = el.Website;
                lblAdd.Text = el.Address;

                Citytbl ct = new Citytbl();
                ct.CityID = el.CityId;
                var ctval = objCityBL.GetCitybyId(ct);
                lblCt.Text = ctval.Count() <= 0 ? "":ctval.First().CityName;

                Statetbl st = new Statetbl();
                st.StateID = el.StateID;
                var sval = objSBl.GetStateById(st);
                lblSt.Text = sval.Count() <= 0 ? "" : sval.First().StateName;

                Countrytbl cn = new Countrytbl();
                cn.CountryID = Convert.ToInt32(el.CountryId);
                var cval = objCountryBL.GetCountryById(cn);
                lblCntry.Text = cval.Count() <= 0 ? "" : cval.First().CountryName;

                Employeetbl emp = new Employeetbl();
                emp.EmpId = Convert.ToInt32(el.MfbStaff);
                var eval = empBL.GetEmployeeById(emp);
                lblEname.Text = eval.Count() <= 0 ? "" : eval.First().FirstName + " " + eval.First().LastName;

                Usertbl ut = new Usertbl();
                ut.LoginUserId = el.AgentID;
                var utval = objUBl.GetAgentExists(ut);
                lblUName.Text = utval.Count() <= 0 ?"": utval.First().Username;
                lblPWord.Text = utval.Count() <= 0 ? "" : utval.First().Password;

                if (el.IATAStatus == 1)
                {
                    lblIATAS.Text = "Yes";
                }
                else if (el.IATAStatus == 2)
                {
                    lblIATAS.Text = "NO";
                }

                lblAgencyName.Text = el.AgencyName;
                lblFN.Text         = el.FirstName;
                lblLName.Text      = el.LastName;

                lblAdd.Text         = el.Address;
                lblRBy.Text         = el.ReferredBy;
                lblIATARNo.Text     = el.IATARegNo;
                lblAC.Text          = el.AgencyCode;
                lblAEmail.Text      = el.AgencyEmail;
                lblTN.Text          = el.MobileNo;
                lblPC.Text          = el.PreferredCurrency;
                lblPin.Text         = el.Pincode.ToString();
                txtCommission1.Text = el.Commission;

                lblACName.Text        = el.AccountsName;
                lblACEmail.Text       = el.AccountsEmail;
                lblACPhoneNumber.Text = el.AccountsMobileNo;
                lblOPName.Text        = el.OperationsName;
                lblOPEmail1.Text      = el.OperationsEmail;
                lblOPPhoneNumber.Text = el.OperationsMobileNo;
                lblMNName.Text        = el.ManagementsName;
                lblMNEmail.Text       = el.ManagementsEmail;
                lblMNPhoneNumber.Text = el.ManagementsMobileNo;
                hdnAgentID.Value      = el.AgentID.ToString();
            }
        }
Пример #16
0
        protected void GetAgencyById(int AgencyID)
        {
            Agentstbl agt = new Agentstbl
            {
                AgentID = AgencyID
            };

            List <Agentstbl> lstAgency = new List <Agentstbl>();

            lstAgency = objRegBL.GetAgentById(agt).ToList();

            foreach (var el in lstAgency)
            {
                hdnAgentID.Value   = el.AgentID.ToString();
                lblAgencyName.Text = el.AgencyName;
                lblAEmail.Text     = el.AgencyEmail;
                lblTN.Text         = el.MobileNo;

                if (el.CategoryId == 0)
                {
                    lblCategory1.Text = "B2B";
                }
                else if (el.CategoryId == 1)
                {
                    lblCategory1.Text = "B2C";
                }
                else if (el.CategoryId == 2)
                {
                    lblCategory1.Text = "Others";
                }

                if (el.IATAStatus == 1)
                {
                    lblIATAS.Text = "Yes";
                }
                else if (el.IATAStatus == 2)
                {
                    lblIATAS.Text = "No";
                }


                lblRN.Text       = el.IATARegNo;
                lblWeb.Text      = el.Website;
                lblFN.Text       = el.FirstName;
                lblLN.Text       = el.LastName;
                lblAddress1.Text = el.Address;

                Citytbl ct = new Citytbl();
                ct.CityID = el.CityId;
                var ctval = objCityBL.GetCitybyId(ct);
                lblCt.Text = ctval.Count() <= 0?"": ctval.First().CityName;

                Statetbl st = new Statetbl();
                st.StateID = el.StateID;
                var sval = objStateBL.GetStateById(st);
                lblSt.Text = sval.Count() <= 0 ? "" : sval.First().StateName;

                Countrytbl cn = new Countrytbl();
                cn.CountryID = Convert.ToInt32(el.CountryId);
                var cval = objCountryBL.GetCountryById(cn);
                lblCntry.Text = cval.First().CountryName;

                lblPCode.Text          = el.Pincode.ToString();
                lblPCurrency1.Text     = el.PreferredCurrency;
                lblRBy.Text            = el.ReferredBy;
                lblAcName.Text         = el.AccountsName;
                lblAcEmail.Text        = el.AccountsEmail;
                lblAcPhoneNumber.Text  = el.AccountsMobileNo;
                lblmnName2.Text        = el.ManagementsName;
                lblmnEmail2.Text       = el.ManagementsEmail;
                lblmnPhoneNumber2.Text = el.ManagementsMobileNo;
                lblopName1.Text        = el.OperationsName;
                lblopEmail1.Text       = el.OperationsEmail;
                lblopPhoneNumber1.Text = el.OperationsMobileNo;


                List <Employeetbl> lstEmployee = new List <Employeetbl>();
                Employeetbl        Emply       = new Employeetbl();
                EmployeeBL         objemplyBL  = new EmployeeBL();
                Emply.IsActive = 1;
                lstEmployee    = objemplyBL.GetEmployeeByStatus(Emply).ToList();
                foreach (var cnt in lstEmployee)
                {
                    ListItem li = new ListItem();
                    li.Text  = cnt.FirstName + " " + cnt.LastName;
                    li.Value = cnt.EmpId.ToString();
                    ddlEmployee.Items.Add(li);
                }
            }
        }