示例#1
0
        public DataTable GetMobile()
        {
            MobileEntry mobileEntry    = new MobileEntry();
            DataTable   dtSelectMobile = mobileEntry.SelectAllMobiles();

            return(dtSelectMobile);
        }
示例#2
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            MobileEntry mobileEntry = new MobileEntry();
            DataTable   dtResult    = mobileEntry.DeleteMobileById(Convert.ToInt32(txtId.Text));

            lblResut.Text = "Deleted";
            DataTable dtSelectMobiles = mobileEntry.SelectAllMobiles();

            gvMobileDetails.DataSource = dtSelectMobiles;
            gvMobileDetails.DataBind();
        }
示例#3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            MobileEntry mobileEntry = new MobileEntry();
            //string mobile = txtMobile.Text;
            //string model = txtModel.Text;
            //string price = txtPrice.Text;
            //string Description = txtDescription.Text;
            //Session["mobile"] = mobile;
            //Session["model"] = model;
            //Session["price"] = price;
            //Session["Description"] = Description;

            DataTable dtResult = mobileEntry.InsertMobile(Convert.ToInt32(txtId.Text), txtMobile.Text, txtModel.Text, Convert.ToInt32(txtPrice.Text), txtDescription.Text);

            lblResut.Text = "Inserted";
            //Response.Redirect("MobileUserHome.aspx");

            DataTable dtSelectMobiles = mobileEntry.SelectAllMobiles();

            gvMobileDetails.DataSource = dtSelectMobiles;
            gvMobileDetails.DataBind();
        }