protected void BtnSave_Click(object sender, EventArgs e) { if (BtnSave.Text == "SAVE") { TheatresLogicLayer mobile = new TheatresLogicLayer(); mobile.Address = TxtAddress.Text.Trim(); mobile.TheatresName = TxtTheatreName.Text.Trim(); mobile.CityId = ddlCity.SelectedValue.ToString(); mobile.EntryDate = DateTime.Now.ToString("yyyy-MMM-dd"); mobile.EntryBy = "1"; mobile.UpdateBy = "1"; mobile.UpdateDate = DateTime.Now.ToString("yyyy-MMM-dd"); mobile.LocDetail = TxtLoc.Text.Trim(); LblMessage.Text = TheatresLogicLayer.InsertTheatresDetials(mobile); GridFill(); Clear(); } else { TheatresLogicLayer mobile = new TheatresLogicLayer(); mobile.TheatresNameId = hfMobileBrandId1.Value; mobile.Address = TxtAddress.Text.Trim(); mobile.TheatresName = TxtTheatreName.Text.Trim(); mobile.CityId = ddlCity.SelectedValue.ToString(); mobile.EntryDate = DateTime.Now.ToString("yyyy-MMM-dd"); mobile.EntryBy = "1"; mobile.UpdateBy = "1"; mobile.UpdateDate = DateTime.Now.ToString("yyyy-MMM-dd"); mobile.LocDetail = TxtLoc.Text.Trim(); LblMessage.Text = TheatresLogicLayer.updateTheatresDetials(mobile); GridFill(); Clear(); } }
private void GridFill() { dt = TheatresLogicLayer.GetAllTheatresDetials(); GridView1.DataSource = dt; GridView1.DataBind(); ddlCity.DataSource = CityLogicLayer.GetAllCitySelect(); ddlCity.DataTextField = "CityName"; ddlCity.DataValueField = "CityId"; ddlCity.DataBind(); }
private void GridFill() { dt = ScreenLogicLayer.GetAllScreenDetials(); GridView1.DataSource = dt; GridView1.DataBind(); ddltheatres.DataSource = TheatresLogicLayer.GetAllTheatresSelect(); ddltheatres.DataTextField = "TheatresName"; ddltheatres.DataValueField = "TheatresNameId"; ddltheatres.DataBind(); }
protected void BtnSearch_Click(object sender, EventArgs e) { dt = TheatresLogicLayer.GetAllTheatresDetials(); DataView Dv1 = new DataView(dt); Dv1.RowFilter = "TheatresName LIKE '" + txtSearchbox.Text + "*'"; dt = Dv1.ToTable(); GridView1.DataSource = Dv1.ToTable(); GridView1.DataBind(); }
protected void GridView_RowDeleting(object sender, GridViewDeleteEventArgs e) { GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex]; HiddenField hfVendorIdDeleted = (HiddenField)row.FindControl("hfMobileBrandId"); string s = hfVendorIdDeleted.Value; LblMessage.Text = TheatresLogicLayer.DeleteTheatresDetials(s); GridFill(); Clear(); }
private void GridFill() { dt = CateenMasterLogicLayer.GetAllCateenMasterDetials(); GridView1.DataSource = dt; GridView1.DataBind(); ddlTheatresName.DataSource = TheatresLogicLayer.GetAllTheatresSelect(); ddlTheatresName.DataTextField = "TheatresName"; ddlTheatresName.DataValueField = "TheatresNameId"; ddlTheatresName.DataBind(); }
private void GridFill() { string TheatresId = Session["TheatresId"].ToString(); dt = CateenMasterLogicLayer.GetAllCateenMasterDetialsTID(TheatresId); GridView1.DataSource = dt; GridView1.DataBind(); ddlTheatresName.DataSource = TheatresLogicLayer.GetAllTheatresSelect(); ddlTheatresName.DataTextField = "TheatresName"; ddlTheatresName.DataValueField = "TheatresNameId"; ddlTheatresName.DataBind(); ddlTheatresName.Enabled = false; ddlTheatresName.SelectedValue = TheatresId; }
protected void Page_Load(object sender, EventArgs e) { if (Session["AdminUserId"] != null) { if (!Page.IsPostBack) { ddltheatres.DataSource = TheatresLogicLayer.GetAllTheatresSelect(); ddltheatres.DataTextField = "TheatresName"; ddltheatres.DataValueField = "TheatresNameId"; ddltheatres.DataBind(); } } else { Response.Redirect("Default.aspx"); } }
protected void ddlCity_SelectedIndexChanged(object sender, EventArgs e) { try { DataTable Dt = TheatresLogicLayer.GetAllTheatresSelectId(ddlCity.SelectedValue.ToString()); if (Dt.Rows.Count > 0) { ddltheatre.DataSource = Dt; ddltheatre.DataTextField = "TheatresName"; ddltheatre.DataValueField = "TheatresNameId"; ddltheatre.DataBind(); } } catch (Exception) { } }
protected void ddltheatre_SelectedIndexChanged(object sender, EventArgs e) { try { DataTable Dt = TheatresLogicLayer.GetAllIDWiseTheatresDetials(ddltheatre.SelectedValue.ToString()); if (Dt.Rows.Count > 0) { //ddltheatre.DataSource = Dt; //ddltheatre.DataTextField = "TheatresName"; //ddltheatre.DataValueField = "TheatresNameId"; //ddltheatre.DataBind(); StMap.Attributes.Add("src", Dt.Rows[0]["LocDetail"].ToString()); //StMap.InnerHtml = ""; } } catch (Exception) { } }
protected void GridView_RowUpdating(object sender, GridViewUpdateEventArgs e) { GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex]; HiddenField hfCampaignIdDeleted = (HiddenField)row.FindControl("hfMobileBrandId"); string s = hfCampaignIdDeleted.Value; try { DataTable CamaignDetail = TheatresLogicLayer.GetAllIDWiseTheatresDetials(s); hfMobileBrandId1.Value = s; TxtAddress.Text = CamaignDetail.Rows[0]["Address"].ToString(); TxtTheatreName.Text = CamaignDetail.Rows[0]["TheatresName"].ToString(); ddlCity.SelectedValue = CamaignDetail.Rows[0]["CityId"].ToString(); BtnSave.Text = "UPDATE"; //btn_save.Text = "UPDATE"; TableAccessoriesBrand.Visible = true; BtnNew.Visible = false; } catch (Exception) { } }