private void BindData(string filter) { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); if (ddlBulan.SelectedItem.Value != "0" && ddlTahun.SelectedItem.Value != "0") { _ht["p_mount"] = ddlBulan.SelectedItem.Value; _ht["p_year"] = ddlTahun.SelectedItem.Value; } else { _ht["p_mount"] = ""; _ht["p_year"] = ""; } _ht["p_keywords"] = txtSearch.Text; _ht["p_status"] = ddlStatus.SelectedItem.Value; _ht["p_filter"] = filter; gvwList.DataSource = _dal.GetRows(TABLE_NAME, _ht); gvwList.DataBind(); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private void LoadData() { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_code"] = Request.Params["code"]; DataRow _dr = _dal.GetRow(TABLE_NAME, _ht); DBToUI.Map(this.Controls, _dr); if (ddlQuestionType.SelectedValue.Equals("CHOICE")) { btnAddQuestionChoice.Enabled = true; } else { btnAddQuestionChoice.Enabled = false; } } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private void SaveData() { GeneralDAL _dal = null; Hashtable _ht = null; string sNextEmpCode = string.Empty; try { _dal = new GeneralDAL(); _ht = new Hashtable(); MPF23.Shared.Mapper.UIToDB.Map(this.Controls, _ht); Shared.ApplyDefaultProp(_ht); _ht["branch_code"] = Request.Params["branch_code"]; if (Request.Params["action"].Equals("add")) { _dal.Insert(TABLE_NAME, _ht, ref sNextEmpCode); txtEmployeeCode.Text = sNextEmpCode; } else { _dal.Update(TABLE_NAME, _ht); } Shared.ShowSuccessGritter(this, string.Format("employeebranch.aspx?action=edit&emp_code={0}&branch_code={1} ", txtEmployeeCode.Text, txtBranchCode.Text)); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private void BindData() { GeneralDAL _dal = null; Hashtable _ht = null; DataTable _dt = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_keywords"] = ""; _ht["p_emp_code"] = Request.Params["emp_code"]; _ht["p_start_date"] = Shared.ConvertToDateTime(txtStartDate.Text); _ht["p_end_date"] = Shared.ConvertToDateTime(txtEndDate.Text); _dt = _dal.GetRows("", "xsp_employee_geotag_log_getrows_sort_by_date", _ht); rptMarkers.DataSource = _dt; rptMarkers.DataBind(); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private void SaveData() { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); MPF23.Shared.Mapper.UIToDB.Map(this.Controls, _ht); Shared.ApplyDefaultProp(_ht); if (Request.Params["action"].Equals("add")) { _dal.Insert(TABLE_NAME, _ht); } else { _dal.Update(TABLE_NAME, _ht); } Shared.ShowSuccessGritter(this, string.Format("masterwidget.aspx?action=edit&code={0}", txtWidgetCode.Text)); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
public static void BindSubscription(string SubscribeCode, ref string TableSource, ref string TableTarget, ref string SPSaveName, ref string SPSourceToTarget, ref string SPTargetToSource, ref string SPParameterCode, ref string SPParameterUserCode) { GeneralDAL _dal = null; Hashtable _ht = null; DataTable _dt = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_keywords"] = string.Empty; _ht["p_subscribe_code"] = SubscribeCode; _dt = _dal.GetRows("MASTER_SUBSCRIPTION", _ht); if (_dt.Rows.Count > 0) { TableSource = _dt.Rows[0]["SP_TABLE_SOURCE"].ToString(); TableTarget = _dt.Rows[0]["SP_TABLE_TARGET"].ToString(); SPSaveName = _dt.Rows[0]["SP_SAVE_NAME"].ToString(); SPSourceToTarget = _dt.Rows[0]["SP_SOURCE_TO_TARGET"].ToString(); SPTargetToSource = _dt.Rows[0]["SP_TARGET_TO_SOURCE"].ToString(); SPParameterCode = _dt.Rows[0]["SP_PARAMETER_CODE"].ToString(); SPParameterUserCode = _dt.Rows[0]["SP_PARAMETER_USER_CODE"].ToString(); } } catch (Exception ex) { throw ex; } }
private void AddDataToSourceGVW(string Code) { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_emp_code"] = Request.Params["empcode"]; _ht[SP_PARAMETER_CODE] = Code; Shared.ApplyDefaultProp(_ht); _dal.Insert("", SP_TARGET_TO_SOURCE, _ht); string script = ""; if (Request.Params["gvw"] == null) { script += "javascript:parent.__doPostBack('ctl00$cpb$btnSearch','');"; } else { script += "javascript:parent.__doPostBack('" + Request.Params["gvw"] + "','');"; } ScriptManager.RegisterStartupScript(this, GetType(), "fn2", script, true); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private void SaveData() { GeneralDAL _dal = null; Hashtable _ht = null; int inextId = 0; try { _dal = new GeneralDAL(); _ht = new Hashtable(); MPF23.Shared.Mapper.UIToDB.Map(this.Controls, _ht); Shared.ApplyDefaultProp(_ht); _ht["p_code_question"] = txtCode.Text; if (Request.Params["action"].Equals("add")) { _dal.Insert(TABLE_NAME, _ht, ref inextId); txtId.Text = inextId.ToString(); } else { _dal.Update(TABLE_NAME, _ht); } Shared.ShowSuccessGritter(this, string.Format("masterquestionchoice.aspx?action=edit&code={0}&id={1}", txtCode.Text, txtId.Text)); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private static DataTable GetLookUp(string LookUpCode, ref string SPName) { GeneralDAL _dal = null; Hashtable _ht = null; DataTable _dt = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_keywords"] = ""; _ht["p_lookup_code"] = LookUpCode; _dt = _dal.GetRows("MASTER_LOOKUP_COLUMN", _ht); if (_dt != null && _dt.Rows.Count > 0) { SPName = _dt.Rows[0]["SP_NAME"].ToString(); } else { throw new Exception("Fail to execute MASTER_LOOKUP_COLUMN"); } return(_dt); } catch (Exception ex) { return(null); } }
private void SaveData() { GeneralDAL _dal = null; Hashtable _ht = null; int iNextID = 0; try { _dal = new GeneralDAL(); _ht = new Hashtable(); MPF23.Shared.Mapper.UIToDB.Map(this.Controls, _ht); Shared.ApplyDefaultProp(_ht); _ht["p_id"] = txtId.Text; Shared.ApplyDefaultProp(_ht); if (Request.Params["action"].Equals("add")) { _dal.Insert(TABLE_NAME, _ht, ref iNextID); txtId.Text = iNextID.ToString() ; } else _dal.Update(TABLE_NAME, _ht); Shared.ShowSuccessGritter(this, string.Format("employeenotification.aspx?action=edit&id={0}", txtId.Text)); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private void BindingCollection() { GeneralDAL _dal = null; Hashtable _ht = null; //System.Diagnostics.Debugger.Break(); if (Status == "New") { Collector = "All"; } try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_keywords"] = Collector; // _ht["p_collector_code"] = Collector; gvwList.DataSource = _dal.GetRows("", "xsp_collection_main_quickview", _ht); gvwList.DataBind(); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } finally { Status = "New"; } }
protected string TarikXSP() { string xsp = string.Empty; GeneralDAL _dal = null; Hashtable _ht = null; DataRow dr = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_id"] = Request.Params["code"]; dr = _dal.GetRow(TABLE_NAME, _ht); xsp = dr[3].ToString(); } catch (Exception ex) { Message(ex.Message); xsp = string.Empty; } return(xsp); }
protected DataTable TarikData(string SPNAME) { GeneralDAL _dal = null; Hashtable _ht = null; DataTable dt = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); dt = new DataTable(); _ht["p_dateMonth"] = ddlBulan.SelectedItem.Text; _ht["p_dateYear"] = ddlTahun.SelectedItem.Text; _ht["p_user"] = Shared.CurrentUID; _ht["p_ip"] = Shared.CurrentIPAddress; dt = _dal.GetTarikData(SPNAME, _ht); } catch (Exception ex) { Message(ex.Message); dt = null; } return(dt); }
private void SaveDataCollection() { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); MPF23.Shared.Mapper.UIToDB.Map(this.Controls, _ht); Shared.ApplyDefaultProp(_ht); _ht["p_trx_no"] = lblTrxNo.Text; Shared.ApplyDefaultProp(_ht); if (Request.Params["action"].Equals("add")) { _dal.Insert(TABLE_NAME_MAIN, _ht); } else { _dal.Update(TABLE_NAME_MAIN, _ht); } Shared.ShowSuccessGritter(this, string.Format("collectionmain.aspx?action=edit&trxNo={0}", lblTrxNo.Text)); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private void LoadData() { GeneralDAL _dal = null; Hashtable _ht = null; //System.Diagnostics.Debugger.Break(); try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_trx_no"] = Request.Params["trx_no"]; DataRow _dr = _dal.GetRow(TABLE_NAME, _ht); IS_PICKED_DEVICE = _dr.ItemArray[12].ToString(); IS_SYNC_DEVICE = _dr.ItemArray[13].ToString(); IS_SYNC_PRODUCTION = _dr.ItemArray[14].ToString(); From_Production = _dr.ItemArray[18].ToString(); Picked_Device = _dr.ItemArray[19].ToString(); Sync_Device = _dr.ItemArray[20].ToString(); Sync_Production = _dr.ItemArray[21].ToString(); DBToUI.Map(this.Controls, _dr); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private void BindLocationUserList() { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); _ht["p_keywords"] = txtSearch.Text; _ht["p_position"] = FILTER_POSITION; _dt = _dal.GetRows("", "xsp_master_user_main_getrows_position", _ht); gvwList.DataSource = _dt; gvwList.DataBind(); //gvwListLocationUser.DataSource = _dal.GetRows(TABLE_NAME, _ht); //gvwListLocationUser.DataBind(); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
private void SaveData() { GeneralDAL _dal = null; Hashtable _ht = null; int inextId = 0; try { _dal = new GeneralDAL(); _ht = new Hashtable(); MPF23.Shared.Mapper.UIToDB.Map(this.Controls, _ht); Shared.ApplyDefaultProp(_ht); _ht["p_id"] = Request.Params["id"]; if (Request.Params["action"].Equals("add")) { _dal.Insert(TABLE_NAME_RESULTS, _ht, ref inextId); //txtID.Text = inextId.ToString(); } else { _dal.Update(TABLE_NAME_RESULTS, _ht); } Shared.ShowSuccessGritter(this, string.Format("collectionresults.aspx?action=edit&id={0}", int.Parse(Request.Params["id"]))); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
public DataSet FetchDetailBySearch(string SpotID) { DataSet ds = new DataSet(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchDetailBySearch(SpotID); return ds; }
private void SaveData() { GeneralDAL _dal = null; Hashtable _ht = null; try { _dal = new GeneralDAL(); _ht = new Hashtable(); MPF23.Shared.Mapper.UIToDB.Map(upd.Controls, _ht); Shared.ApplyDefaultProp(_ht); _ht["p_application_no"] = txtApplicationNoCustomer.Text; Shared.ApplyDefaultProp(_ht); if (Request.Params["action"].Equals("add")) { _dal.Insert(TABLE_NAME, _ht); } else { _dal.Update(TABLE_NAME, _ht); } Shared.ShowSuccessGritter(this, string.Format("applicationcustomer.aspx?action=edit&app_no={0}", txtApplicationNoCustomer.Text)); } catch (Exception ex) { Shared.ShowErrorDialog(this, ex); } }
public DataTable FetchBatchProcess() { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchBatchProcess(); return ds; }
public DataSet FetchBanner() { DataSet ds = new DataSet(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchBanner(); return ds; }
public int DeleteSpotPhoto(string PhotoID) { int a; GeneralDAL lp = new GeneralDAL(); a = lp.DeleteSpotPhoto(PhotoID); return a; }
public int DeleteSpotMapphoto(string MapID) { int b; GeneralDAL lp = new GeneralDAL(); b = lp.DeleteSpotMapphoto(MapID); return b; }
protected void btnSave_Click(object sender, EventArgs e) { List <string> listItem = new List <string>(); string errorRow = ""; string errorCif = ""; GeneralDAL _dal = null; Hashtable _ht = null; if (FileUploadControl.HasFile) { string fileExt = System.IO.Path.GetExtension(FileUploadControl.FileName); if (fileExt == ".etlerr" || fileExt == ".log") { StreamReader reader = new StreamReader(FileUploadControl.FileContent); do { listItem.Add(reader.ReadLine()); } while (reader.Peek() != -1); reader.Close(); foreach (string item in listItem) { if (item.Split('|')[0] == "RECORD") { errorRow = item.Split('|')[1]; errorCif = item.Split('|')[2]; try { _dal = new GeneralDAL(); _ht = new Hashtable(); //var date = Convert.ToDateTime(txtStartdate.Text); _ht["p_row_number"] = errorRow; _ht["p_dateMonth"] = ddlBulan.SelectedItem.Value; _ht["p_dateYear"] = ddlTahun.SelectedItem.Value; _ht["p_cif"] = errorCif; _dal.Update(Request.Params["table"], _ht); string script = Shared.GenerateLookUpClearString(ClientQueryString); ScriptManager.RegisterStartupScript(this, GetType(), "fn2", script, true); } catch (Exception ex) { lblError.Text = ex.Message; } } } } else { lblError.Text = "Only .txt files allowed!"; } } else { lblError.Text = "You have not specified a file."; } }
public int DeleteSpotPhoto(string PhotoID) { int a; GeneralDAL lp = new GeneralDAL(); a = lp.DeleteSpotPhoto(PhotoID); return(a); }
public int InsertSpotPhoto(string SpotID, string FileName, string Description, string Title) { int a; GeneralDAL lp = new GeneralDAL(); a = lp.InsertSpotPhoto(SpotID, FileName, Description, Title); return(a); }
public int DeleteSpotMapphoto(string MapID) { int b; GeneralDAL lp = new GeneralDAL(); b = lp.DeleteSpotMapphoto(MapID); return(b); }
public DataSet FetchDetailBySearch(string SpotID) { DataSet ds = new DataSet(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchDetailBySearch(SpotID); return(ds); }
public DataSet FetchNoOfActiveList() { DataSet ds = new DataSet(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchNoOfActiveList(); return(ds); }
public DataTable SearchBySearchCategory(string SearchItem) { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.SearchBySearchCategory(SearchItem); return(ds); }
public DataTable FetchGridPageSize() { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchGridPageSize(); return(ds); }
//#region Fetch Map Grid Page Size map Details.... //public DataTable FetchMapGridPageSize() //{ // DataTable ds = new DataTable(); // GeneralDAL lp = new GeneralDAL(); // ds = lp.FetchMapGridPageSize(); // return ds; //} //#endregion #region Batch public DataTable FetchBatchProcess() { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchBatchProcess(); return(ds); }
public DataTable FetchFestivalByMonth() { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchFestivalByMonth(); return(ds); }
public DataSet FetchFestivalBySearch(string FestivalID) { DataSet ds = new DataSet(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchFestivalBySearch(FestivalID); return(ds); }
public DataTable FetchFestivalGridDetails(string Month) { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchFestivalGridDetails(Month); return(ds); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { #region Fetch Grid Page Size Details... DataTable pg = new DataTable(); GeneralBAL pz = new GeneralBAL(); pg = pz.FetchGridPageSize(); if (pg.Rows.Count != 0 && pg.Rows[0][0].ToString() != string.Empty) grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString()); #endregion // Bind the banner of the image. DataSet ds = new DataSet(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchBanner(); if (ds.Tables[3].Rows.Count != 0) imgBanner.ImageUrl = ds.Tables[3].Rows[0][1].ToString(); //End Bind the banner of the image. // fetch value of the grid details.... DataSet ds1 = new DataSet(); FestivalBAL fs = new FestivalBAL(); ds1 = fs.FetchFestival(); grdFestival.DataSource = ds1.Tables[0]; grdFestival.DataBind(); //End fetch value of the grid details.... //if comes from index page if (Session["festivalId"] != null) { int rowno=0; for (int i = 0; ds1.Tables[0].Rows.Count > i; i++) { if (ds1.Tables[0].Rows[i]["festivalid"].ToString() == Session["festivalId"].ToString()) rowno = i; } FetchGridDetails(Session["festivalId"].ToString()); grdFestival.PageIndex = rowno / grdFestival.PageSize; int SelectedRowIndex = rowno - (grdFestival.PageSize * grdFestival.PageIndex); grdFestival.DataBind(); grdFestival.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray; Session["festivalId"] = null; }//other load festival here..... else if (Request.QueryString["festivalId"] != null) { int rowno = 0; for (int i = 0; ds1.Tables[0].Rows.Count > i; i++) { if (ds1.Tables[0].Rows[i]["festivalid"].ToString() == Request.QueryString["festivalId"].ToString()) rowno = i; } FetchGridDetails(Request.QueryString["festivalId"].ToString()); grdFestival.PageIndex = rowno / grdFestival.PageSize; int SelectedRowIndex = rowno - (grdFestival.PageSize * grdFestival.PageIndex); grdFestival.DataBind(); grdFestival.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray; } else { if (ds1.Tables[0].Rows.Count != 0) { FetchGridDetails(ds1.Tables[0].Rows[0][0].ToString()); grdFestival.Rows[0].BackColor = System.Drawing.Color.LightGray; } } } }
public DataTable FetchDetailBySearchCategory(string SearchItem) { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchDetailBySearchCategory(SearchItem); return ds; }
public DataTable FetchFestivalByMonth() { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchFestivalByMonth(); return ds; }
public int InsertSpotMap(string Spotid, string Mappath) { int a; GeneralDAL Map = new GeneralDAL(); a = Map.InsertSpotMap(Spotid, Mappath); return a; }
public int InsertBanner(string Category, string Description) { int a; GeneralDAL lp = new GeneralDAL(); a = lp.InsertBanner(Category, Description); return a; }
public int InsertFestivalPhoto(string FestivalID, string FileName, string Description, string Title) { int a; GeneralDAL lp = new GeneralDAL(); a = lp.InsertFestivalPhoto(FestivalID, FileName, Description, Title); return a; }
public int InsertSpotPhoto(string SpotID, string FileName, string Description, string Title) { int a; GeneralDAL lp = new GeneralDAL(); a = lp.InsertSpotPhoto(SpotID, FileName, Description, Title); return a; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { #region Fetch Grid Page Size Details... DataTable pg = new DataTable(); GeneralBAL pz = new GeneralBAL(); pg = pz.FetchGridPageSize(); if (pg.Rows.Count != 0 && pg.Rows[0][0].ToString() != string.Empty) { grdSpotName.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString()); grdFestival.PageSize = Convert.ToInt32(pg.Rows[0][0].ToString()); } #endregion // Bind the search category value in first ddl DataTable ds = new DataTable(); GeneralBAL lp = new GeneralBAL(); ds = lp.FetchSearchCategory(); ddlSearchCategory.DataSource = ds; ddlSearchCategory.DataTextField = "SearchCategoryName"; ddlSearchCategory.DataValueField = "SearchCategoryID"; ddlSearchCategory.DataBind(); ddlSearchCategory.Items.Insert(0, "Select"); //End Bind the search category value in first ddl // Bind the banner of the image. DataSet dsphoto = new DataSet(); GeneralDAL lpphoto = new GeneralDAL(); dsphoto = lpphoto.FetchBanner(); if (dsphoto.Tables[1].Rows.Count != 0) // imgBanner.ImageUrl = dsphoto.Tables[1].Rows[0][1].ToString(); //End Bind the banner of the image. //// Bind the map of the image. //DataSet dsmapphoto = new DataSet(); //GeneralDAL lpmapphoto = new GeneralDAL(); //dsmapphoto = lpmapphoto.FetchMap(); //if (dsmapphoto.Tables[1].Rows.Count != 0) // Image1.ImageUrl = dsmapphoto.Tables[1].Rows[0][1].ToString(); //// End Bind the map of the image. // fetch value of the grid details.... { DataSet fetchspotdetails = new DataSet(); SpotDetailsBAL det = new SpotDetailsBAL(); fetchspotdetails = det.FetchSpotDetails(); grdSpotName.DataSource = fetchspotdetails.Tables[4]; grdSpotName.DataBind(); //End value of the grid details.... if (Session["SpotId"] != null) { int rowno = 0; for (int i = 0; fetchspotdetails.Tables[4].Rows.Count > i; i++) { if (fetchspotdetails.Tables[4].Rows[i]["spotid"].ToString() == Session["SpotId"].ToString()) rowno = i; } FetchGridDetails(Session["SpotId"].ToString()); grdSpotName.PageIndex = rowno / grdSpotName.PageSize; int SelectedRowIndex = rowno - (grdSpotName.PageSize * grdSpotName.PageIndex); grdSpotName.DataBind(); grdSpotName.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray; Session["SpotId"] = null; } else if (Request.QueryString["SpotId"] != null) { int rowno = 0; for (int i = 0; fetchspotdetails.Tables[4].Rows.Count > i; i++) { if (fetchspotdetails.Tables[4].Rows[i]["spotid"].ToString() == Request.QueryString["SpotId"].ToString()) rowno = i; } FetchGridDetails(Request.QueryString["SpotId"].ToString()); grdSpotName.PageIndex = rowno / grdSpotName.PageSize; int SelectedRowIndex = rowno - (grdSpotName.PageSize * grdSpotName.PageIndex); grdSpotName.DataBind(); grdSpotName.Rows[SelectedRowIndex].BackColor = System.Drawing.Color.LightGray; } else { if (fetchspotdetails.Tables[4].Rows.Count != 0) { grdSpotName.Rows[0].BackColor = System.Drawing.Color.LightGray; FetchGridDetails(fetchspotdetails.Tables[4].Rows[0][0].ToString()); } } } } }
public DataSet FetchNoOfActiveList() { DataSet ds = new DataSet(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchNoOfActiveList(); return ds; }
public DataTable FetchGridPageSize() { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchGridPageSize(); return ds; }
public DataTable FetchSearchCategory() { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchSearchCategory(); return ds; }
public DataSet FetchFestivalBySearch(string FestivalID) { DataSet ds = new DataSet(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchFestivalBySearch(FestivalID); return ds; }
public DataTable FetchLPGridDetails1(string LpCategroyName) { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchLPGridDetails1(LpCategroyName); return ds; }
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e) { if (DropDownList2.SelectedItem.Text == "Banner") { trBanner.Visible = true; trGallery.Visible = false; trGrid.Visible = false; tr2.Visible = false; trgrid4.Visible = false; DataSet ds1 = new DataSet(); GeneralDAL lp = new GeneralDAL(); ds1 = lp.FetchBanner(); if (DropDownList1.SelectedItem.Text == "Historical Spots") GridView2.DataSource = ds1.Tables[1]; else if (DropDownList1.SelectedItem.Text == "LP") GridView2.DataSource = ds1.Tables[2]; else if (DropDownList1.SelectedItem.Text == "Festivals") GridView2.DataSource = ds1.Tables[3]; else if (DropDownList1.SelectedItem.Text == "Home") GridView2.DataSource = ds1.Tables[0]; GridView2.DataBind(); } else if (DropDownList2.SelectedItem.Text == "Gallery") { tr2.Visible = false; trgrid4.Visible = false; trBanner.Visible = false; trGallery.Visible = true; trGrid.Visible = true; tr1.Visible = false; GridView1.DataSource = null; GridView1.DataBind(); if (DropDownList1.SelectedItem.Text == "Historical Spots") { lblColumn.Text = "Spot Name"; DataSet ds = new DataSet(); SpotDetailsBAL sp = new SpotDetailsBAL(); ds = sp.FetchSpotDetails1(); ddlColumn.DataSource = ds.Tables[4]; ddlColumn.DataTextField = "spotname"; ddlColumn.DataValueField = "spotid"; ddlColumn.DataBind(); ddlColumn.Items.Insert(0, "Select"); RequiredFieldValidator1.ErrorMessage = "Choose Spot Name"; } else if (DropDownList1.SelectedItem.Text == "LP") { lblColumn.Text = "LP Category Name"; DataSet ds = new DataSet(); LPDetailsBAL lp = new LPDetailsBAL(); ds = lp.FetchLP1(); ddlColumn.DataSource = ds.Tables[2]; ddlColumn.DataTextField = "lpcategoryname"; ddlColumn.DataValueField = "lpcategoryid"; ddlColumn.DataBind(); ddlColumn.Items.Insert(0, "Select"); RequiredFieldValidator1.ErrorMessage = "Choose LP Category Name"; } else if (DropDownList1.SelectedItem.Text == "Festivals") { lblColumn.Text = "Festival Name"; DataSet ds = new DataSet(); FestivalBAL fs = new FestivalBAL(); ds = fs.FetchFestival1(); ddlColumn.DataSource = ds.Tables[0]; ddlColumn.DataTextField = "Name"; ddlColumn.DataValueField = "FestivalID"; ddlColumn.DataBind(); ddlColumn.Items.Insert(0, "Select"); RequiredFieldValidator1.ErrorMessage = "Choose Festival Name"; } else { lblColumn.Text = string.Empty; ddlColumn.Items.Clear(); ddlColumn.Items.Add("Select"); } } else if (DropDownList2.SelectedItem.Text == "Map") { tr2.Visible = true; trgrid4.Visible = true; trBanner.Visible = false; trGallery.Visible = false ; trGrid.Visible = false; tr1.Visible = false; // GridView3.DataSource = null; GridView3.DataBind(); if (DropDownList1.SelectedItem.Text == "Historical Spots") { Label8.Text = "Spot Name"; DataSet ds = new DataSet(); SpotDetailsBAL sp = new SpotDetailsBAL(); ds = sp.FetchSpotDetails1(); DropDownList3.DataSource = ds.Tables[4]; DropDownList3.DataTextField = "spotname"; DropDownList3.DataValueField = "spotid"; DropDownList3.DataBind(); DropDownList3.Items.Insert(0, "Select"); RequiredFieldValidator1.ErrorMessage = "Choose Spot Name"; } else if (DropDownList1.SelectedItem.Text == "LP") { lblColumn.Text = "LP Category Name"; DataSet ds = new DataSet(); LPDetailsBAL lp = new LPDetailsBAL(); ds = lp.FetchLP1(); ddlColumn.DataSource = ds.Tables[2]; ddlColumn.DataTextField = "lpcategoryname"; ddlColumn.DataValueField = "lpcategoryid"; ddlColumn.DataBind(); ddlColumn.Items.Insert(0, "Select"); RequiredFieldValidator1.ErrorMessage = "Choose LP Category Name"; } else if (DropDownList1.SelectedItem.Text == "Festivals") { lblColumn.Text = "Festival Name"; DataSet ds = new DataSet(); FestivalBAL fs = new FestivalBAL(); ds = fs.FetchFestival1(); ddlColumn.DataSource = ds.Tables[0]; ddlColumn.DataTextField = "Name"; ddlColumn.DataValueField = "FestivalID"; ddlColumn.DataBind(); ddlColumn.Items.Insert(0, "Select"); RequiredFieldValidator1.ErrorMessage = "Choose Festival Name"; } else { lblColumn.Text = string.Empty; ddlColumn.Items.Clear(); ddlColumn.Items.Add("Select"); } } else { trBanner.Visible = false; trGallery.Visible = false; trGrid.Visible = false; tr2.Visible = false; trgrid4.Visible = false; } }
public DataTable FetchFestivalGridDetails(string Month) { DataTable ds = new DataTable(); GeneralDAL lp = new GeneralDAL(); ds = lp.FetchFestivalGridDetails(Month); return ds; }