public int delProductTest([PexAssumeUnderTest] BusinessPlayer target, string id) { int result = target.delProduct(id); return(result); // TODO: add assertions to method BusinessPlayerTest.delProductTest(BusinessPlayer, String) }
private void editProduct_Load(object sender, EventArgs e) { business = new BusinessPlayer(Login.UserName, Login.Password); DataTable dataTable = new DataTable(); business.queryProductsByID(Id, dataTable); getColor(); getSize(); getCatogories(); getMadeIn(); name.Text = dataTable.Rows[0]["Name"].ToString(); price.Text = dataTable.Rows[0]["Price"].ToString(); quantity.Text = dataTable.Rows[0]["Quantity"].ToString(); content.Text = dataTable.Rows[0]["Content"].ToString(); colorsBox.Text = dataTable.Rows[0]["Color"].ToString(); sizeBox.Text = dataTable.Rows[0]["Size"].ToString(); CatogoryBox.Text = dataTable.Rows[0]["Category"].ToString(); Countrybox.Text = dataTable.Rows[0]["MadeIn"].ToString(); img = dataTable.Rows[0]["Image"].ToString(); try { pictureBox.Image = Image.FromFile(img); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } }
private void simpleButton1_Click(object sender, EventArgs e) { String input = colorsBox.Text; BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password); if (input.Equals("")) { MessageBox.Show("Vui lòng nhập màu sắc!"); return; } if (business.getColor(input) > 0) { MessageBox.Show("Màu đã tồn tại. Vui lòng nhập màu khác!"); return; } if (business.addColor(input) > 0) { MessageBox.Show("Thêm thành công!"); this.DialogResult = DialogResult.OK; this.color = input; this.Close(); } else { MessageBox.Show("Thêm thất bại!"); } }
public void SetUserPassTest650() { BusinessPlayer businessPlayer; businessPlayer = new BusinessPlayer((string)null, (string)null); this.SetUserPassTest(businessPlayer, (string)null, (string)null); Assert.IsNotNull((object)businessPlayer); }
public BusinessPlayer ConstructorTest01(string username, string password) { BusinessPlayer target = new BusinessPlayer(username, password); return(target); // TODO: add assertions to method BusinessPlayerTest.ConstructorTest01(String, String) }
public List <string> GetCategoriesTest([PexAssumeUnderTest] BusinessPlayer target) { List <string> result = target.GetCategories(); return(result); // TODO: add assertions to method BusinessPlayerTest.GetCategoriesTest(BusinessPlayer) }
public int delWarrantyTest([PexAssumeUnderTest] BusinessPlayer target, string data) { int result = target.delWarranty(data); return(result); // TODO: add assertions to method BusinessPlayerTest.delWarrantyTest(BusinessPlayer, String) }
public List <string> getWarrantyTest([PexAssumeUnderTest] BusinessPlayer target) { List <string> result = target.getWarranty(); return(result); // TODO: add assertions to method BusinessPlayerTest.getWarrantyTest(BusinessPlayer) }
public BusinessPlayer ConstructorTest() { BusinessPlayer target = new BusinessPlayer(); return(target); // TODO: add assertions to method BusinessPlayerTest.ConstructorTest() }
public List <string> GetDistrictsTest([PexAssumeUnderTest] BusinessPlayer target, string province) { List <string> result = target.GetDistricts(province); return(result); // TODO: add assertions to method BusinessPlayerTest.GetDistrictsTest(BusinessPlayer, String) }
public string MD5HashTest(string input) { string result = BusinessPlayer.MD5Hash(input); return(result); // TODO: add assertions to method BusinessPlayerTest.MD5HashTest(String) }
public int getWarrantyTest01([PexAssumeUnderTest] BusinessPlayer target, string input) { int result = target.getWarranty(input); return(result); // TODO: add assertions to method BusinessPlayerTest.getWarrantyTest01(BusinessPlayer, String) }
public int InsertOrdersTest([PexAssumeUnderTest] BusinessPlayer target, string customerID) { int result = target.InsertOrders(customerID); return(result); // TODO: add assertions to method BusinessPlayerTest.InsertOrdersTest(BusinessPlayer, String) }
public List <string> GetProvincesTest([PexAssumeUnderTest] BusinessPlayer target, string Country) { List <string> result = target.GetProvinces(Country); return(result); // TODO: add assertions to method BusinessPlayerTest.GetProvincesTest(BusinessPlayer, String) }
public int GetProvinceTest([PexAssumeUnderTest] BusinessPlayer target, string input) { int result = target.GetProvince(input); return(result); // TODO: add assertions to method BusinessPlayerTest.GetProvinceTest(BusinessPlayer, String) }
public int getCategoriesTest([PexAssumeUnderTest] BusinessPlayer target, string input) { int result = target.getCategories(input); return(result); // TODO: add assertions to method BusinessPlayerTest.getCategoriesTest(BusinessPlayer, String) }
private void btnLogin_Click(object sender, EventArgs e) { String user = username.Text; String pass = password.Text; BusinessPlayer business = new BusinessPlayer(); business.SetUserPass(user, pass); try { business.Connection(); UserName = user; Password = pass; Main main = new Main(); this.Hide(); main.ShowDialog(); if (main.DialogResult == DialogResult.OK) { this.Show(); } else { this.Close(); } } catch (Exception ex) { MessageBox.Show("Tài khoản, mật khẩu không đúng hoặc máy chủ không phản hổi!", "Kết nối lỗi"); Console.WriteLine("Loi cmnr: " + ex.ToString()); } }
public void SetPasswordTest958() { BusinessPlayer businessPlayer; businessPlayer = new BusinessPlayer((string)null, ""); this.SetPasswordTest(businessPlayer, ""); Assert.IsNotNull((object)businessPlayer); }
public void queryProductsByIDTest( [PexAssumeUnderTest] BusinessPlayer target, string id, DataTable data ) { target.queryProductsByID(id, data); // TODO: add assertions to method BusinessPlayerTest.queryProductsByIDTest(BusinessPlayer, String, DataTable) }
public void queryOrdersDetailTest( [PexAssumeUnderTest] BusinessPlayer target, string idOrder, DataTable data ) { target.queryOrdersDetail(idOrder, data); // TODO: add assertions to method BusinessPlayerTest.queryOrdersDetailTest(BusinessPlayer, String, DataTable) }
public void queryCustomerWithAccountByIDTest( [PexAssumeUnderTest] BusinessPlayer target, DataTable data, string ID ) { target.queryCustomerWithAccountByID(data, ID); // TODO: add assertions to method BusinessPlayerTest.queryCustomerWithAccountByIDTest(BusinessPlayer, DataTable, String) }
public void querOrdersByYearTest( [PexAssumeUnderTest] BusinessPlayer target, DataTable data, DateTime time ) { target.querOrdersByYear(data, time); // TODO: add assertions to method BusinessPlayerTest.querOrdersByYearTest(BusinessPlayer, DataTable, DateTime) }
public void SetUserPassTest( [PexAssumeUnderTest] BusinessPlayer target, string username, string password ) { target.SetUserPass(username, password); // TODO: add assertions to method BusinessPlayerTest.SetUserPassTest(BusinessPlayer, String, String) }
private void getMadeIn() { BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password); List <String> MadeIns = business.GetMadeIn(); foreach (String Country in MadeIns) { Countrybox.Items.Add(Country); } }
private void getSize() { BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password); List <String> sizes = business.getSize(); foreach (String size in sizes) { sizeBox.Items.Add(size); } }
private void getColor() { BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password); List <String> colors = business.getColor(); foreach (String color in colors) { colorsBox.Items.Add(color); } }
public void AddAccount541() { BusinessPlayer businessPlayer; int i; businessPlayer = new BusinessPlayer((string)null, (string)null); i = this.AddAccount(businessPlayer, "", "", (string)null); Assert.AreEqual <int>(0, i); Assert.IsNotNull((object)businessPlayer); }
public void SetUserPassTest33() { BusinessPlayer businessPlayer; businessPlayer = new BusinessPlayer("Data Source=Trung-tin-it;Initial Catalog=ShopOnline;", "Data Source=Trung-tin-it;Initial Catalog=ShopOnline;"); this.SetUserPassTest(businessPlayer, "Data Source=Trung-tin-it;Initial Catalog=ShopOnline;", (string)null); Assert.IsNotNull((object)businessPlayer); }
private void getCatogories() { BusinessPlayer business = new BusinessPlayer(Login.UserName, Login.Password); List <String> Catogories = business.GetCategories(); foreach (String Catogory in Catogories) { CatogoryBox.Items.Add(Catogory); } }
public int addProvinceTest( [PexAssumeUnderTest] BusinessPlayer target, string provice, string country ) { int result = target.addProvince(provice, country); return(result); // TODO: add assertions to method BusinessPlayerTest.addProvinceTest(BusinessPlayer, String, String) }