protected void BindReportDetails(string reportId) { DataTable details = ReportDetail.GetDetails(reportId); this.gvwReportDetails.DataSource = details; this.gvwReportDetails.DataBind(); }
protected void Initalize() { string strA = base.Request["type"]; DataTable dataTable = null; if (string.Compare(strA, "edit", true) == 0) { string text = base.Request["reportId"]; if (!string.IsNullOrWhiteSpace(text)) { Report byId = Report.GetById(text); if (byId != null) { this.txtDate.Text = byId.InputDate.Value.ToString("yyyy-M-d"); this.txtInputUser.Text = PageHelper.QueryUser(this, byId.InputUser); this.hfldInputUser.Value = byId.InputUser; this.txtWorkCard.InnerText = byId.Note; this.hfldReportId.Value = byId.Id; } dataTable = ReportDetail.GetDetails(text); this.ViewState["PTasks"] = dataTable; } } else { this.txtDate.Text = System.DateTime.Now.ToString("yyyy-M-d"); this.txtInputUser.Text = PageHelper.QueryUser(this, base.UserCode); this.hfldInputUser.Value = base.UserCode; this.hfldReportId.Value = System.Guid.NewGuid().ToString(); } this.Bind(dataTable); this.FileUpload1.RecordCode = this.hfldReportId.Value; }