Exemplo n.º 1
0
 void LoadEditService(int intServiceID)
 {
     objService = new ServeAtDoorstepService();
     DataTable dt = objService.GetServiceById(intServiceID);
     if(dt.Rows.Count>0)
     {
         txtServiceName.Text = dt.Rows[0]["ServiceName"].ToString();
         txtServiceDesc.Text = dt.Rows[0]["ServiceDescription"].ToString();
         txtServiceKey.Text = dt.Rows[0]["ServiceKeyword"].ToString();
         txtServiceType.Text = dt.Rows[0]["ServiceType"].ToString();
         txtPriceRanFrom.Text = dt.Rows[0]["PriceRangeFrom"].ToString();
         txtPriceRanTo.Text = dt.Rows[0]["PriceRangeTo"].ToString();
         txtNoPair.Text = dt.Rows[0]["NoOfPair"].ToString();
         txtBrandName.Text = dt.Rows[0]["BrandName"].ToString();
         txtBrandType.Text = dt.Rows[0]["BrandType"].ToString();
         ddlCategory.SelectedValue = dt.Rows[0]["CategoryId"].ToString();
     }
 }
Exemplo n.º 2
0
        public void LoadService()
        {
            objService = new ServeAtDoorstepService();
            DataTable dtServ = objService.GetServiceById(intServiceID);

            if (dtServ.Rows.Count > 0)
            {
                intCatID = Convert.ToInt32(dtServ.Rows[0]["CategoryId"].ToString());
                lblServiceName.Text = dtServ.Rows[0]["ServiceName"].ToString();
                lblServiceType.Text = dtServ.Rows[0]["ServiceType"].ToString();
                lblBrandName.Text = dtServ.Rows[0]["BrandName"].ToString();
                lblBrandType.Text = dtServ.Rows[0]["BrandType"].ToString();
                lblCategoryName.Text = dtServ.Rows[0]["CategoryName"].ToString();
                lblDescription.Text = dtServ.Rows[0]["ServiceDescription"].ToString();
                lblPriceRange.Text ="From "+ dtServ.Rows[0]["PriceRangeFrom"].ToString() +" To "+ dtServ.Rows[0]["PriceRangeTo"].ToString();
            }
        }
Exemplo n.º 3
0
        protected void lnkEditImg_Click(object sender, ImageClickEventArgs e)
        {
            ImageButton btndetails = sender as ImageButton;
            GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer;
            string sID = gvService.DataKeys[gvrow.RowIndex].Value.ToString();

            ServeAtDoorstepService objService = new ServeAtDoorstepService();
            DataTable dt = objService.GetServiceById(Convert.ToInt32(sID));
            if (dt.Rows.Count > 0)
            {
                hdnServiceId.Value = dt.Rows[0]["ServiceID"].ToString();
                txtServiceName.Text = dt.Rows[0]["ServiceName"].ToString();
                txtServiceDesc.Text = dt.Rows[0]["ServiceDescription"].ToString();
                txtServiceKey.Text = dt.Rows[0]["ServiceKeyword"].ToString();
                txtServiceType.Text = dt.Rows[0]["ServiceType"].ToString();
                txtPriceRanFrom.Text = dt.Rows[0]["PriceRangeFrom"].ToString();
                txtPriceRanTo.Text = dt.Rows[0]["PriceRangeTo"].ToString();
                txtNoPair.Text = dt.Rows[0]["NoOfPair"].ToString();
                txtBrandName.Text = dt.Rows[0]["BrandName"].ToString();
                txtBrandType.Text = dt.Rows[0]["BrandType"].ToString();
                ddlCategory.SelectedValue = dt.Rows[0]["CategoryId"].ToString();
            }

            this.ModalPopupViewMessage.Show();
        }