Exemplo n.º 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;
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 3
0
        private void grdPurchaseBillDetailsDET_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            SelectedRow = grdPurchaseBillDetails.CurrentRow.Index;
            int codeValue = grdPurchaseBillDetails.Rows[SelectedRow].Cells["PurchaseBillId"].Value.ToInt();

            try
            {
                using (PurelifeErpClient.PurelifeErpClient clientObj = new PurelifeErpClient.PurelifeErpClient())
                {
                    PurelifeErpClient.Search search = new PurelifeErpClient.Search();
                    search.Id = GetInt(grdPurchaseBillDetails.Rows[SelectedRow].Cells["PurchaseBillId"].Value);
                    BindingSource bs = new BindingSource();
                    grdPurchaseBillDetailsDET.DataSource = clientObj.DETDataListing(PurelifeErpClient.PageName.DETDirectEntry, search);
                    //bs.DataSource = grdPurchaseBillDetailsDET.DataSource;
                    //purelifeErpClient.Delete(PurelifeErpClient.PageName.MSTPurchaseBill, id);PurelifeErpClient.PageName.MSTPurchaseBill, id

                    //new DgvFilterManager(grdPurchaseBillDetailsDET);
                }
            }
            catch (Exception exception)
            {
                // ErrorLog.LogErrorInTxtFormat(exception);
                throw exception;
            }
        }
Exemplo n.º 4
0
        private void grdPurchaseBillDetails_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            SelectedRow = grdPurchaseBillDetails.CurrentRow.Index;
            int codeValue = grdPurchaseBillDetails.Rows[SelectedRow].Cells["PurchaseBillId"].Value.ToInt();

            try
            {
                using (PurelifeErpClient.PurelifeErpClient clientObj = new PurelifeErpClient.PurelifeErpClient())
                {
                    PurelifeErpClient.Search search = new PurelifeErpClient.Search();
                    search.Id = GetInt(grdPurchaseBillDetails.Rows[SelectedRow].Cells["PurchaseBillId"].Value);
                    BindingSource bs = new BindingSource();
                    dtDetails = clientObj.DETDataListing(PurelifeErpClient.PageName.DETPurchaseBill, search);
                    grdPurchaseBillDetailsDET.DataSource = dtDetails;
                }
            }
            catch (Exception exception)
            {
                ErrorLog.LogErrorInTxtFormat(exception);
                throw exception;
            }
        }