コード例 #1
0
 private void MasterTemplate_CellDoubleClick(object sender, GridViewCellEventArgs e)
 {
     try
     {
         if (e.RowIndex > 0)
         {
             if (screen.Equals(1))
             {
                 if (!Convert.ToString(e.Row.Cells["ADNo"].Value).Equals(""))
                 {
                     ADNo_tt.Text = Convert.ToString(e.Row.Cells["ADNo"].Value);
                     this.Close();
                 }
                 else
                 {
                     ADNo_tt.Text   = Convert.ToString(e.Row.Cells["ADNo"].Value);
                     CodeNo_tt.Text = Convert.ToString(e.Row.Cells["CodeNo"].Value);
                     this.Close();
                 }
             }
             else
             {
                 Return_RM a = new Return_RM(Convert.ToString(e.Row.Cells["ADNo"].Value),
                                             Convert.ToString(e.Row.Cells["CodeNo"].Value)
                                             , this.Name);
                 a.ShowDialog();
                 //this.Close();
             }
         }
     }catch (Exception ex) { MessageBox.Show(ex.Message); }
 }
コード例 #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (screen.Equals(1))
                {
                    if (dgvData.Rows.Count <= 0)
                    {
                        return;
                    }

                    if (!Convert.ToString(dgvData.CurrentRow.Cells["ADNo"].Value).Equals(""))
                    {
                        ADNo_tt.Text = Convert.ToString(dgvData.CurrentRow.Cells["ADNo"].Value);
                        this.Close();
                    }
                    else
                    {
                        ADNo_tt.Text   = Convert.ToString(dgvData.CurrentRow.Cells["ADNo"].Value);
                        CodeNo_tt.Text = Convert.ToString(dgvData.CurrentRow.Cells["CodeNo"].Value);
                        this.Close();
                    }
                }
                else
                {
                    if (dgvData.Rows.Count > 0)
                    {
                        Return_RM a = new Return_RM(Convert.ToString(dgvData.CurrentRow.Cells["ADNo"].Value),
                                                    Convert.ToString(dgvData.CurrentRow.Cells["CodeNo"].Value)
                                                    , this.Name);
                        a.ShowDialog();
                        //this.Close();
                    }
                    else
                    {
                        Return_RM a = new Return_RM();
                        a.ShowDialog();
                    }
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }