protected void BtnSearch_Click(object sender, EventArgs e) { DataTable dt = grn.GetGRNList(); grvgrnrpt.DataSource = dt; grvgrnrpt.DataBind(); }
public void GetGRNList() { DateTime ReceiveDate = DateTime.Parse("1/1/1800"); if (txtSReceiveDate.Text != "") { ReceiveDate = DateTime.Parse(txtSReceiveDate.Text); } DateTime ReceiveDate2 = DateTime.Parse("1/1/9999"); if (txtSReceiveDate2.Text != "") { ReceiveDate2 = DateTime.Parse(txtSReceiveDate2.Text); } Guid ItemID = new Guid("00000000-0000-0000-0000-000000000000"); if (ddlSItem.SelectedValue != "") { ItemID = new Guid(ddlSItem.SelectedValue); } try { DataTable dt = grn.GetGRNList(ItemID, ReceiveDate, ReceiveDate2); ViewState.Add("dtbl", dt); grvGRN.DataSource = dt; grvGRN.DataBind(); } catch (Exception ex) { Messages1.SetMessage(ex.Message, Messages.MessageType.Error); } }
private void detail_Format(object sender, EventArgs e) { //if (HttpContext.Current.Session["BrID"] == null) //{ // throw new Exception("Your Session has expired"); //} //else //{ // Guid ID = new Guid(HttpContext.Current.Session["BrID"].ToString()); GRNBLL gr = new GRNBLL(); DataTable r = gr.GetGRNList(); if (r != null) { //rptGRN.s } //} }