Пример #1
0
 public FRM_AddNewCustomer(bool _isUpdate)
 {
     InitializeComponent();
     this.isUpdate            = _isUpdate;
     cmbCountry.DataSource    = Class_COUNTRY.SP_COUNTRY_DISPLAY();
     cmbCountry.DisplayMember = "اسم الدولة";
     cmbCountry.ValueMember   = "رقم الدولة";
     cmbCountry_SelectionChangeCommitted(null, null);
     if (isUpdate)
     {
         this.Text         = "تعديل بيانات العميل";
         btnaddUpdate.Text = "تعديل";
         txtCuName.Text    = FRM_CustomerManagment.row.Cells[1].Value.ToString();
         txtCuAddress.Text = FRM_CustomerManagment.row.Cells[2].Value.ToString();
         txtCuMobile.Text  = FRM_CustomerManagment.row.Cells[3].Value.ToString();
         MemoryStream ms = new MemoryStream(FRM_CustomerManagment.row.Cells[4].Value as byte []);
         picCUImage.Image = Image.FromStream(ms);
         cmbCity.Text     = FRM_CustomerManagment.row.Cells[5].Value.ToString();
         cmbCountry.Text  = FRM_CustomerManagment.row.Cells[6].Value.ToString();
     }
     else
     {
         this.Text         = "اضافة عميل جديد";
         btnaddUpdate.Text = "اضافة";
     }
 }
Пример #2
0
 public FRM_City()
 {
     InitializeComponent();
     btnDisplay_Click(null, null);
     cmbCountry.DataSource    = Class_COUNTRY.SP_COUNTRY_DISPLAY();
     cmbCountry.DisplayMember = "اسم الدولة";
     cmbCountry.ValueMember   = "رقم الدولة";
 }
Пример #3
0
 private void btnDisplay_Click(object sender, EventArgs e)
 {
     dgvcountry.DataSource = Class_COUNTRY.SP_COUNTRY_DISPLAY();
 }