Beispiel #1
0
    public void GetBody()
    {
        try
        {
            var obj = new List<BodyInfo>();

            //MakesInfo objMakes = new MakesInfo();
            MakesBL objMakesBL = new MakesBL();

            if (Session[Constants.Bodys] == null)
            {
                obj = (List<BodyInfo>)objMakesBL.GetBodys();
                Session["Bodys"] = obj;
            }
            else
            {
                obj = (List<BodyInfo>)Session[Constants.Bodys];
            }

            ddlBodyStyle.DataSource = obj;
            ddlBodyStyle.DataTextField = "bodyType";
            ddlBodyStyle.DataValueField = "bodyTypeID";
            ddlBodyStyle.DataBind();
            ddlBodyStyle.Items.Insert(0, new ListItem("Unspecified", "0"));
        }
        catch (Exception ex)
        {
        }
    }
Beispiel #2
0
    public void GetMakes()
    {
        try
        {
            var obj = new List<MakesInfo>();

            MakesBL objMakesBL = new MakesBL();

            if (Session[Constants.Makes] == null)
            {
                obj = (List<MakesInfo>)objMakesBL.GetMakes();
                Session[Constants.Makes] = obj;
            }
            else
            {
                obj = (List<MakesInfo>)Session[Constants.Makes];
            }
            ddlMake.DataSource = obj;
            ddlMake.DataTextField = "Make";
            ddlMake.DataValueField = "MakeID";
            ddlMake.DataBind();
            ddlMake.Items.Insert(0, new ListItem("Unspecified", "0"));
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
    protected void lnkVeh_Click(object sender, EventArgs e)
    {
        try
        {
            lblvehsale.Text = lblSalesId.Text;
            DataSet Cardetais = objHotLeadBL.GetCarDetailsByPostingID(Convert.ToInt32(lblSalesId.Text));
            lblMake.Text = Cardetais.Tables[0].Rows[0]["make"].ToString();
            lblMaodel.Text = Cardetais.Tables[0].Rows[0]["model"].ToString(); ;
            lblYear.Text = Cardetais.Tables[0].Rows[0]["yearOfMake"].ToString();
            // txtcmake.Text = Session["Make"].ToString();
            txtyear.Text = Session["year"].ToString();
            //txtcmake
            try
            {
                var obj = new List<MakesInfo>();

                MakesBL objMakesBL = new MakesBL();

                if (Session[Constants.Makes] == null)
                {
                    obj = (List<MakesInfo>)objMakesBL.GetMakes();
                    Session[Constants.Makes] = obj;
                }
                else
                {
                    obj = (List<MakesInfo>)Session[Constants.Makes];
                }
                txtcmake.DataSource = obj;
                txtcmake.DataTextField = "Make";
                txtcmake.DataValueField = "MakeID";
                txtcmake.DataBind();
                txtcmake.Items.Insert(0, new ListItem("Unspecified", "0"));
            }
            catch (Exception ex)
            {
                throw ex;
            }

            MdlPopVehUp.Show();
        }
        catch { }
    }