private void ClearControls() { this.grdEvidence.DataSource = ""; this.grdEvidence.DataBind(); this.grdAppellant.DataSource = ""; this.grdAppellant.DataBind(); this.grdRespondant.DataSource = ""; this.grdRespondant.DataBind(); Session["BindToGrid"] = new List <DocFup>(); List <DocFup> fupLST = (List <DocFup>)Session["BindToGrid"]; DocFup dFup = new DocFup(); dFup.FUP = new FileUpload(); fupLST.Add(dFup); this.grdDocuments.DataSource = fupLST; this.grdDocuments.DataBind(); this.grdLitDocument.DataSource = ""; this.grdLitDocument.DataBind(); heCaseSummary.Text = ""; }
protected void Page_Load(object sender, EventArgs e) { if (this.Page.IsPostBack == false) { Session["Evidence"] = new List <ATTCaseEvidence>(); Session["SEQ"] = 1; Session["Evidence"] = new List <ATTCaseEvidence>(); Session["BindToGrid"] = new List <DocFup>(); Session["CaseDocuments"] = new List <ATTCaseDocuments>(); Session["LitDocuments"] = new List <ATTCaseDocumentsLit>(); List <DocFup> fupLST = (List <DocFup>)Session["BindToGrid"]; DocFup dFup = new DocFup(); dFup.FUP = new FileUpload(); fupLST.Add(dFup); this.grdDocuments.DataSource = fupLST; this.grdDocuments.DataBind(); if (Session["CaseNo"] != null) { this.txtCaseNo.Text = Session["CaseNo"].ToString(); Session["CaseNo"] = null; LoadCaseRegistrationDetails(double.Parse(this.txtCaseNo.Text), sender, e); } } }
protected void GridViewInsert() { int seq = int.Parse(Session["SEQ"].ToString()); List <DocFup> fupLST = (List <DocFup>)Session["BindToGrid"]; DocFup dFup = fupLST[fupLST.Count - 1]; FileUpload fup; fup = (FileUpload)this.grdDocuments.Rows[this.grdDocuments.Rows.Count - 1].FindControl("fupDocuments"); //dFup.FUP = fup; if (fup.HasFile != true) { this.lblStatusMessage.Text = "Documents Not Attached For Last Row"; this.programmaticModalPopup.Show(); return; } dFup.FileName = fup.FileName; dFup.FileContents = fup.FileBytes; dFup.DocSeq = seq; fupLST.Add(new DocFup()); grdDocuments.DataSource = fupLST; grdDocuments.DataBind(); seq += 1; Session["SEQ"] = seq; Session["BindToGrid"] = fupLST; }