protected void Populate() { DataTable dt = new bllPlaceOfService().GetById(ID); if (dt.Rows.Count > 0) { tbxPlaceOfService.Text = dt.Rows[0]["PlaceOfService"].ToString(); tbxDescription.Text = dt.Rows[0]["Description"].ToString(); } }
protected void btnDelete_Command(object sender, CommandEventArgs e) { try { DataTable dt = new bllPlaceOfService().GetById(Convert.ToInt32(e.CommandArgument.ToString())); int id = Convert.ToInt32(e.CommandArgument.ToString()); new bllPlaceOfService().Delete(id); new bllAudit().Insert("Setup", "Delete Place Of Service", "Panishment Place Of Service: " + dt.Rows[0]["PlaceOfService"].ToString(), User.Identity.Name); BindData(); managePaging(); } catch (Exception ex) { MessageController.Show(ex.Message, MessageType.Error, Page); } }
protected void BindData() { plcPaging.Controls.Clear(); lblSearchResult.Text = ""; DataTable dt = new DataTable(); string Criteria = ""; if (Request.QueryString["printmode"] != null) { Criteria = Session["PlaceCriteria"].ToString(); } else { Criteria = GetCriteria(); Session["PlaceCriteria"] = Criteria; } dt = new bllPlaceOfService().GetBySearchParameter(CurrentPage * PageSize, PageSize, Criteria, PrintMode); gv.DataSource = dt; gv.DataBind(); if (dt.Rows.Count > 0) { TotalRec = Convert.ToInt32(dt.Rows[0]["TotalRecords"].ToString()); } else { lblSearchResult.Text = "No record found."; litPagingSummary.Text = ""; TotalRec = 0; } if (TotalRec <= 500) { plcPaging.Visible = false; } else { plcPaging.Visible = true; } }