Beispiel #1
0
 private void MasterTemplate_CellDoubleClick(object sender, GridViewCellEventArgs e)
 {
     try
     {
         if (screen.Equals(1))
         {
             if (e.RowIndex > -1)
             {
                 if (!Convert.ToString(e.Row.Cells["ShippingNo"].Value).Equals(""))
                 {
                     SHNo_tt.Text = Convert.ToString(e.Row.Cells["ShippingNo"].Value);
                     this.Close();
                 }
                 else
                 {
                     SHNo_tt.Text   = Convert.ToString(e.Row.Cells["ShippingNo"].Value);
                     CodeNo_tt.Text = Convert.ToString(e.Row.Cells["CodeNo"].Value);
                     this.Close();
                 }
             }
         }
         else
         {
             if (e.RowIndex > -1)
             {
                 Acciden_t_Slip a = new Acciden_t_Slip(Convert.ToString(e.Row.Cells["ShippingNo"].Value),
                                                       Convert.ToString(e.Row.Cells["CodeNo"].Value));
                 a.ShowDialog();
                 //this.Close();
             }
         }
     }
     catch (Exception ex) { MessageBox.Show(ex.Message); }
 }
Beispiel #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["ShippingNo"].Value).Equals(""))
                    {
                        SHNo_tt.Text = Convert.ToString(dgvData.CurrentRow.Cells["ShippingNo"].Value);
                        this.Close();
                    }
                    else
                    {
                        SHNo_tt.Text   = Convert.ToString(dgvData.CurrentRow.Cells["ShippingNo"].Value);
                        CodeNo_tt.Text = Convert.ToString(dgvData.CurrentRow.Cells["CodeNo"].Value);
                        this.Close();
                    }
                }
                else
                {
                    if (dgvData.Rows.Count > 0)
                    {
                        Acciden_t_Slip a = new Acciden_t_Slip(Convert.ToString(dgvData.CurrentRow.Cells["ShippingNo"].Value),
                                                              Convert.ToString(dgvData.CurrentRow.Cells["CodeNo"].Value));
                        a.ShowDialog();
                    }
                    else
                    {
                        Acciden_t_Slip b = new Acciden_t_Slip();
                        b.ShowDialog();
                    }
                }
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }