Пример #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 FrmSaleDeliverFormatOper();
                    new FrmStyle(frmOper).SetPopFrmStyle(this);
                    frmOper.AffterSave += new FrmSaleDeliverFormatOper.AffterSaveDelegate(frmOper_AffterSave);
                }
                frmOper.EditFormat(FormatID);
                frmOper.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnBtnCopy.Name)
            {
                if (frmCopy == null)
                {
                    frmCopy = new FrmSaleDeliverFormatCopy();
                    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 FrmSaleDeliverFormatOper();
         new FrmStyle(frmOper).SetPopFrmStyle(this);
         frmOper.AffterSave += new FrmSaleDeliverFormatOper.AffterSaveDelegate(frmOper_AffterSave);
     }
     frmOper.NewFormat();
     frmOper.ShowDialog();
 }