Ejemplo n.º 1
0
        void dgrdv_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int irow = e.RowIndex;
            int icol = e.ColumnIndex;

            if ((irow == -1) || (icol == -1))
            {
                return;
            }
            int CompanyID = (int)this.dtblCustomer.DefaultView[irow]["CompanyID"];

            if ((this.dgrdv.Columns[icol].Name == this.ColumnCompanyCode.Name) ||
                (this.dgrdv.Columns[icol].Name == this.ColumnCompanyAbbName.Name) ||
                (this.dgrdv.Columns[icol].Name == this.ColumnCompanyAllName.Name))
            {
                if (frmDetail == null)
                {
                    frmDetail = new JERPApp.Sale.Report.Bill.FrmCustomer();
                    new FrmStyle(frmDetail).SetPopFrmStyle(this);
                }
                frmDetail.Detail(CompanyID);
                frmDetail.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnbtnEdit.Name)
            {
                if (frmCustomerOper == null)
                {
                    frmCustomerOper = new FrmCustomerOper();
                    new FrmStyle(frmCustomerOper).SetPopFrmStyle(this);
                    frmCustomerOper.AffterSave += this.LoadData;
                }
                frmCustomerOper.Edit(CompanyID);
                frmCustomerOper.ShowDialog();
            }
        }
Ejemplo n.º 2
0
        void dgrdv_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int irow = e.RowIndex;
            int icol = e.ColumnIndex;

            if ((irow == -1) || (icol == -1))
            {
                return;
            }
            if (this.dgrdv.Columns[icol].GetType().Equals(typeof(DataGridViewLinkColumn)))
            {
                int CompanyID = (int)this.dtblCustomer.DefaultView[irow]["CompanyID"];
                if (frmDetail == null)
                {
                    frmDetail = new JERPApp.Sale.Report.Bill.FrmCustomer();
                    new FrmStyle(frmDetail).SetPopFrmStyle(this);
                }
                frmDetail.Detail(CompanyID);
                frmDetail.ShowDialog();
            }
        }