private void DataBindReq() { CareerRequests CareerReq = new CareerRequests(); CareerReq.LoadAll(); GrdCareerRequest.DataSource = CareerReq.DefaultView; GrdCareerRequest.DataBind(); }
protected void GrdCareerRequest_RowCommand(object sender, GridViewCommandEventArgs e) { CareerRequests carReq = new CareerRequests(); carReq.LoadByPrimaryKey(int.Parse(e.CommandArgument.ToString())); if (e.CommandName=="DownloadCV") { string url = carReq.CVPath.ToString(); Response.Redirect(url); } else if (e.CommandName=="DeleteGrd") { carReq.MarkAsDeleted(); carReq.Save(); DataBindReq(); } }