private void GetMaterialList_Search(string search) { List <Material> lstPrd = null; try { base.BeginProcessing("Begin Load data...", "Please Waiting for Loading Data"); using (ArrivalBLL prdBll = new ArrivalBLL()) { lstPrd = prdBll.GetMaterialList(this.txtSearch.Text, string.Empty, this.PARTY_ID, this.WH_ID); } this.grdMaterial.DataSource = lstPrd; } catch (Exception ex) { base.FinishedProcessing(); XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } finally { base.FinishedProcessing(); } }
public void GetMaterialList() { List <Material> lstPrd = null; try { base.BeginProcessing("Begin Load data...", "Please Waiting for Loading Data"); using (ArrivalBLL prdBll = new ArrivalBLL()) { lstPrd = prdBll.GetMaterialList(string.Empty, string.Empty, this.PARTY_ID, this.WH_ID); } this.grdMaterial.DataSource = lstPrd; } catch (Exception ex) { base.FinishedProcessing(); XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } finally { //GridView view = (GridView)this.grdProduct.Views[0]; //view.Columns["FREE_STOCK"].Visible = false; base.FinishedProcessing(); } }