示例#1
0
        void dgrdv_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int irow = e.RowIndex;
            int icol = e.ColumnIndex;

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

            if (this.dgrdv.Columns[icol].Name == this.ColumnBtnEdit.Name)
            {
                if (frmOper == null)
                {
                    frmOper = new FrmSaleReceiptFormatOper();
                    new FrmStyle(frmOper).SetPopFrmStyle(this);
                    frmOper.AffterSave += this.LoadData;
                }
                frmOper.EditFormat(FormatID);
                frmOper.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnBtnCopy.Name)
            {
                if (frmCopy == null)
                {
                    frmCopy = new FrmSaleReceiptFormatCopy();
                    new FrmStyle(frmCopy).SetPopFrmStyle(this);
                    frmCopy.AffterSave += this.LoadData;
                }
                frmCopy.NewFromCopy(FormatID);
                frmCopy.ShowDialog();
            }
        }
示例#2
0
 void lnkNew_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (frmOper == null)
     {
         frmOper = new FrmSaleReceiptFormatOper();
         new FrmStyle(frmOper).SetPopFrmStyle(this);
         frmOper.AffterSave += this.LoadData;
     }
     frmOper.NewFormat();
     frmOper.ShowDialog();
 }