Beispiel #1
0
        private void label14_Click(object sender, EventArgs e)
        {
            ChequeReportForm f = new ChequeReportForm();

            f.Id = Guid.Parse(dataGridView1.SelectedRows[0].Cells["Id"].Value.ToString());
            f.ShowDialog();
        }
 private void button1_Click(object sender, EventArgs e)
 {
     if (Amount.Text == "" || PayTo.Text == "")
     {
         MessageBox.Show("همه فیلد ها باید پر شود");
     }
     else
     {
         ChequeService.ChequeServiceClient a = new ChequeService.ChequeServiceClient();
         if (MyMode == "Edit" && MyId != null)
         {
             Guid idd = Guid.NewGuid();
             a.UpdateCheque(idd, decimal.Parse(Amount.Text), PayTo.Text, Data.NationalCode, dateTimePicker1.Value.Date, textBox1.Text);
             MessageBox.Show("تغییرات چک با موفقیت ثبت شد");
         }
         else
         {
             Guid idd = Guid.NewGuid();
             a.InsertCheque(idd, decimal.Parse(Amount.Text), PayTo.Text, Data.NationalCode, dateTimePicker1.Value.Date);
             MessageBox.Show("چک با موفقیت ثبت شد");
             ChequeReportForm f = new ChequeReportForm();
             f.Id = idd;
             f.ShowDialog();
         }
         this.Close();
     }
 }