예제 #1
0
 public OtherPurchaseForm()
 {
     InitializeComponent();
     List<Supplier1> aSuppliers = new List<Supplier1>();
     Supplier1DAO aDao = new Supplier1DAO();
     aSuppliers = aDao.GetAllSupplier();
     supplierNamecomboBox.DataSource = aSuppliers;
     supplierNamecomboBox.DisplayMember = "SupplierName";
     supplierNamecomboBox.ValueMember = "SupplierId";
 }
예제 #2
0
파일: AddSupplier.cs 프로젝트: Jusharra/RMS
        private void supplierAddbutton_Click(object sender, EventArgs e)
        {
            Supplier1 aSuppllier =new Supplier1();

            aSuppllier.SupplierName = NametextBox.Text.Replace("'", "''");
            aSuppllier.SupplierInformation = informationtextBox.Text.Replace("'", "''");
            Supplier1DAO aDao=new Supplier1DAO();
               string sr = aDao.InsertSupplier(aSuppllier);
               if (sr == "Supplier1 Insert Successfully")
               {
               NametextBox.Clear();
               informationtextBox.Clear();
               }
               MessageBox.Show(sr);
        }