Example #1
0
        public void BindData()
        {
            try
            {
                using (PurelifeErpClient.PurelifeErpClient clientObj = new PurelifeErpClient.PurelifeErpClient())
                {
                    PurelifeErpClient.Search oSearch = new PurelifeErpClient.Search();
                    oSearch.Type = 2;
                    BindingSource bs = new BindingSource();
                    grdPurchaseBillDetails.DataSource = clientObj.DataListingWithSearch(PurelifeErpClient.PageName.MSTPurchaseBill, oSearch);

                    bs.DataSource = grdPurchaseBillDetails.DataSource;
                    new DgvFilterManager(grdPurchaseBillDetails);

                    if (grdPurchaseBillDetails.DataSource == null)
                    {
                        return;
                    }
                    bs = null;
                    //if (ddlPrimaryGroup.SelectedValue.ToString() == "0")
                    //{
                    //    grdPurchaseBillDetails.DataSource = clientObj.grdDataListing(PurelifeErpClient.PageName.MSTPurchaseBill,2);
                    //    bs.DataSource = grdPurchaseBillDetails.DataSource;
                    //}
                }
            }
            catch (Exception exception)
            {
                ErrorLog.LogErrorInTxtFormat(exception);
                //throw exception;
            }
        }
Example #2
0
        public void BindData()
        {
            try
            {
                using (PurelifeErpClient.PurelifeErpClient clientObj = new PurelifeErpClient.PurelifeErpClient())
                {
                    PurelifeErpClient.Search oSearch = new PurelifeErpClient.Search();
                    oSearch.Type = 1;

                    BindingSource bs = new BindingSource();
                    dtMaster = clientObj.DataListingWithSearch(PurelifeErpClient.PageName.MSTPurchaseBill, oSearch);
                    grdPurchaseBillDetails.DataSource = dtMaster;
                    bs.DataSource = grdPurchaseBillDetails.DataSource;
                    new DgvFilterManager(grdPurchaseBillDetails);
                    if (grdPurchaseBillDetails.DataSource == null)
                    {
                        return;
                    }
                    bs = null;
                }
            }
            catch (Exception exception)
            {
                ErrorLog.LogErrorInTxtFormat(exception);
            }
        }