Exemplo n.º 1
0
        private void barBtnEdit_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                if (gvHeader.RowCount == 0)
                {
                    return;
                }

                //DataViewBase view = gcHeader.View;

                eSolution.WinfrmBasic.frmPopupPOEdit frm = new eSolution.WinfrmBasic.frmPopupPOEdit();
                frm.intPOHeaderID  = Convert.ToInt16(gvHeader.GetRowCellValue(gvHeader.FocusedRowHandle, "POHeaderID").ToString());
                frm.strEntryStatus = "E";

                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    try
                    {
                        string customerCode = lueSearchCustomer.Properties.GetKeyValueByDisplayText(lueSearchCustomer.Text).ToString();
                        string pOType       = lueSearchPOType.Properties.GetKeyValueByDisplayText(lueSearchPOType.Text).ToString();
                        Functions.QueryCmbAvailablePOList(db, ref lueSearchPO, customerCode, pOType, "", true);
                    }
                    catch
                    {
                    }

                    barBtnSearch.PerformClick();
                }
                frm.Dispose();
            }
            catch { }
        }
Exemplo n.º 2
0
        private void barBtnNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            try
            {
                eSolution.WinfrmBasic.frmPopupPOEdit frm = new eSolution.WinfrmBasic.frmPopupPOEdit();
                frm.intPOHeaderID  = 0;
                frm.strEntryStatus = "A";

                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    try
                    {
                        string customerCode = lueSearchCustomer.Properties.GetKeyValueByDisplayText(lueSearchCustomer.Text).ToString();
                        string pOType       = lueSearchPOType.Properties.GetKeyValueByDisplayText(lueSearchPOType.Text).ToString();
                        Functions.QueryCmbAvailablePOList(db, ref lueSearchPO, customerCode, pOType, "", true);
                    }
                    catch
                    {
                    }
                    barBtnSearch.PerformClick();
                }
                frm.Dispose();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }