Exemple #1
0
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.ColumnIndex > -1 && e.RowIndex > -1)
     {
         if (dataGridView1.SelectedRows.Count > 0)
         {
             vwAss        ass1 = dataGridView1.SelectedRows[0].DataBoundItem as vwAss;
             tbAssociator ass  = null;
             using (AMSEntities amsContext = new AMSEntities())
             {
                 ass = amsContext.tbAssociator.FirstOrDefault(a => a.iAssID == ass1.iAssID);
             }
             frmAss frmass = new frmAss();
             frmass.ass         = ass;
             frmass.OperType    = "DETAIL";
             frmass.MinimizeBox = false;
             frmass.MaximizeBox = false;
             frmass.ShowDialog();
         }
         else
         {
             Helper.ShowInfo(this, "请查询或搜索会员,并选择会员");
         }
     }
 }
Exemple #2
0
        private void btnAddAss_Click(object sender, EventArgs e)
        {
            frmAss ass = new frmAss();

            ass.OperType    = "ADD";
            ass.MinimizeBox = false;
            ass.MaximizeBox = false;
            ass.ShowDialog();
        }
Exemple #3
0
        private void btnAssData_Click(object sender, EventArgs e)
        {
            frmAss frmass = new frmAss();

            frmass.ass         = ass;
            frmass.OperType    = "DETAIL";
            frmass.MinimizeBox = false;
            frmass.MaximizeBox = false;
            frmass.ShowDialog();
        }
Exemple #4
0
 private void btnDetail_Click(object sender, EventArgs e)
 {
     try
     {
         if (ass == null || assCard == null)
         {
             throw new Exception("请首先读取会员卡");
         }
         frmAss frmass = new frmAss();
         frmass.ass         = ass;
         frmass.OperType    = "DETAIL";
         frmass.MinimizeBox = false;
         frmass.MaximizeBox = false;
         frmass.ShowDialog();
     }
     catch (Exception ex)
     {
         ErrorLog.Write(this, ex);
     }
 }
Exemple #5
0
 private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         if (e.ColumnIndex > -1 && e.RowIndex > -1)
         {
             if (dataGridView1.SelectedRows.Count > 0)
             {
                 vwAssCard    assCard = dataGridView1.SelectedRows[0].DataBoundItem as vwAssCard;
                 tbAssociator ass     = null;
                 using (AMSEntities amsContext = new AMSEntities())
                 {
                     //数据操作
                     ass = amsContext.tbAssociator.FirstOrDefault(a => a.iAssID == assCard.iAssID);
                 }
                 if (ass == null)
                 {
                     throw new Exception("未找到会员信息");
                 }
                 frmAss frmass = new frmAss();
                 frmass.ass         = ass;
                 frmass.OperType    = "DETAIL";
                 frmass.MinimizeBox = false;
                 frmass.MaximizeBox = false;
                 frmass.ShowDialog();
             }
             else
             {
                 Helper.ShowInfo(this, "请查询或搜索会员,并选择会员");
             }
         }
     }
     catch (Exception ex)
     {
         ErrorLog.Write(this, ex);
     }
 }