private void BtnAdd_Click(object sender, EventArgs e)
        {
            if (TxtSuppId.Text == string.Empty | TxtSuppName.Text == string.Empty | TxtPhone.Text == string.Empty
                | TxtCompany.Text == string.Empty | TxtAddress.Text == string.Empty | TxtNotes.Text == string.Empty)
            {
                return;
            }


            try

            {
                ClsCat.SuppliersAdd(Convert.ToInt32(TxtSuppId.Text), TxtSuppName.Text, TxtPhone.Text, TxtCompany.Text,
                                    TxtAddress.Text, TxtNotes.Text, TxtF.Text, TxtT.Text, TxtW.Text, TxtE.Text, DateSupp.DateTime, UserName.Text, Convert.ToDouble(credit.Text), Convert.ToDouble(debit.Text));
                MessageBox.Show("تم إضافة المورد بنجاح", "واى إن للبرمجيات", MessageBoxButtons.OK, MessageBoxIcon.Information);
                BtnNew.Enabled = true;
                BtnAdd.Enabled = false;
                clear();
                PL.Suppliers.Frm_SelectSupplier frm = new PL.Suppliers.Frm_SelectSupplier();
                frm.DGvPreview();
            }
            catch
            {
                return;
            }
        }
Exemple #2
0
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     PL.Suppliers.Frm_SelectSupplier frm = new PL.Suppliers.Frm_SelectSupplier();
     frm.ShowDialog();
     try
     {
         PurSup_ID.Text = frm.DGVSelectSupplier.CurrentRow.Cells[0].Value.ToString();
         Sup_Name.Text  = frm.DGVSelectSupplier.CurrentRow.Cells[1].Value.ToString();
         Sup_Phone.Text = frm.DGVSelectSupplier.CurrentRow.Cells[2].Value.ToString();
         credit.Text    = frm.DGVSelectSupplier.CurrentRow.Cells[12].Value.ToString();
         debit.Text     = frm.DGVSelectSupplier.CurrentRow.Cells[13].Value.ToString();
     }
     catch
     {
         return;
     }
 }