예제 #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 FrmWorkingSheetListFormatOper();
                    new FrmStyle(frmOper).SetPopFrmStyle(this);
                    frmOper.AffterSave += new FrmWorkingSheetListFormatOper.AffterSaveDelegate(frmOper_AffterSave);
                }
                frmOper.EditFormat(FormatID);
                frmOper.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnBtnCopy.Name)
            {
                if (frmCopy == null)
                {
                    frmCopy = new FrmWorkingSheetListFormatCopy();
                    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 FrmWorkingSheetListFormatOper();
         new FrmStyle(frmOper).SetPopFrmStyle(this);
         frmOper.AffterSave += new FrmWorkingSheetListFormatOper.AffterSaveDelegate(frmOper_AffterSave);
     }
     frmOper.NewFormat();
     frmOper.ShowDialog();
 }