示例#1
0
 void lnkNew_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (frmOper == null)
     {
         frmOper = new FrmBeforeCustomerOper();
         new FrmStyle(frmOper).SetPopFrmStyle(this);
         frmOper.AffterSave += this.LoadMyData;
     }
     frmOper.New();
     frmOper.ShowDialog();
 }
示例#2
0
        void dgrdvMy_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int irow = e.RowIndex;
            int icol = e.ColumnIndex;

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

            if (this.dgrdvMy.Columns[icol].Name == this.ColumnbtnEdit.Name)
            {
                if (frmOper == null)
                {
                    frmOper = new FrmBeforeCustomerOper();
                    new FrmStyle(frmOper).SetPopFrmStyle(this);
                    frmOper.AffterSave += this.LoadMyData;
                }
                frmOper.Edit(CompanyID);
                frmOper.ShowDialog();
            }

            if (this.dgrdvMy.Columns[icol].Name == this.ColumnbtnShare.Name)
            {
                DialogResult rul = MessageBox.Show("即将当前客户放入公共池,共享资源共同成长!", "操作确认", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (rul == DialogResult.Yes)
                {
                    string errormsg = string.Empty;
                    this.accCustomer.UpdatePotentialCustomerForSalePsn(ref errormsg,
                                                                       CompanyID,
                                                                       -1);
                    this.LoadMyData();
                    this.LoadPublicData();
                }
            }
            if (this.dgrdvMy.Columns[icol].Name == this.ColumnbtnSuccess.Name)
            {
                if (frmSwitch == null)
                {
                    frmSwitch = new FrmCustomerSwitch();
                    new FrmStyle(frmSwitch).SetPopFrmStyle(this);
                    frmSwitch.AffterSave += this.LoadMyData;
                }
                frmSwitch.Switch(CompanyID);
                frmSwitch.ShowDialog();
            }
        }