コード例 #1
0
 private void SearchRecord()
 {
     try
     {
         FillGrid();
         DataTable _dt = (DataTable)ViewState["GetQuot"];
         DataView  dv  = new DataView(_dt, "CustomerName LIKE '%" + TBQuotations.Text.Trim().ToUpper() + "%'", "[CustomerName] ASC", DataViewRowState.CurrentRows);
         dt_ = dv.ToTable();
         GVQuot.DataSource = dt_;
         GVQuot.DataBind();
         ViewState["GetQuot"] = dt_;
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #2
0
        public void FillGrid()
        {
            try
            {
                DataTable dtGetQuot_ = new DataTable();

                string queryString = " select MProQuot_sono,MProQuot_dat,CustomerName,MProQuot_rmk,  tbl_MProQuot.CreatedBy, tbl_MProQuot.CreatedAt,tbl_MProQuot.MProQuot_id,tbl_MProQuot.CustomerID, " +
                                     "  MProQuot_app, MProQuot_Rej, tbl_MProQuot.ISActive " +
                                     " from tbl_MProQuot " +
                                     " inner join Customers_ on tbl_MProQuot.CustomerID = Customers_.CustomerID " +
                                     " where MProQuot_app = 0 and MProQuot_Rej = 0  and tbl_MProQuot.ISActive = 1  order by tbl_MProQuot.MProQuot_id desc";

                dtGetQuot_ = DBConnection.GetQueryData(queryString);

                GVQuot.DataSource = dtGetQuot_;
                GVQuot.DataBind();
                ViewState["GetQuot"] = dtGetQuot_;
            }
            catch (Exception ex)
            {
                throw;
                //lbl_err.Text = ex.Message;
            }
        }