public void Check_Management_save() { //arrange Kustia_Trading_Agency_Management_Entity information = new Kustia_Trading_Agency_Management_Entity(); Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); //act information.truck_number = "KST-11-1392"; information.ship_name = "Pirireis"; information.loading_point = "RVJ"; information.customer = "Arpon"; information.destination = "Nilphamari"; string price = "21.5"; information.price = float.Parse(price); information.sacks = 50; string mton = "5.0"; information.m_ton = float.Parse(mton); float amnt = 800; float n = (amnt - information.amt); information.avamt = n.ToString(); Boolean t = kta_bl.setManagementData(information); //assert Assert.AreEqual(true, t); }
private void fill_grid_view() { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); DataSet n = kta_bl.available_truck(information1); truck_dataGridView.DataSource = n; truck_dataGridView.DataMember = "truck_number"; }
private void fill_grid_view() { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); DataSet n = kta_bl.dailyReport(information1); dataGridView1.DataSource = n; dataGridView1.DataMember = "ship_name"; }
private void button1_Click(object sender, EventArgs e) { Kustia_Trading_Agency_Management_Entity information = new Kustia_Trading_Agency_Management_Entity(); Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); information.amt = float.Parse(textBox2.Text); if (information.amt < amnt) { if (comboBox1.Text == "" || comboBox2.Text == "" || comboBox3.Text == "" || comboBox4.Text == "" || textBox2.Text == "") { MessageBox.Show("All text Box have to be filled!!!"); } else { //float txbamt = float.Parse(textBox2.Text); information.truck_number = comboBox3.Text; information.ship_name = comboBox1.Text; information.loading_point = comboBox2.Text; information.customer = comboBox4.Text; information.destination = textBox5.Text; string price = textBox3.Text; information.price = float.Parse(price); information.sacks = int.Parse(textBox1.Text); information.m_ton = float.Parse(textBox2.Text); float n = (amnt - information.amt); information.avamt = n.ToString(); //Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); if (kta_bl.setManagementData(information)) { MessageBox.Show("Data Saved Successfully!!"); comboBox1.Text = ""; comboBox2.Text = ""; comboBox3.Text = ""; comboBox4.Text = ""; textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox5.Text = ""; label12.Text = ""; label13.Text = ""; label5.Text = ""; } else { MessageBox.Show("Wrong Entry!!"); } // MessageBox.Show("Your Carring amount is greater than available amount!!"); } } else { MessageBox.Show("Your entered amount is larger than available product!!"); } }
public void Check_Customer_Place() { //arrange Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.cus_name = "Arpon"; //act string n = kta_bl.destination(information1); //assertS Assert.AreEqual("Khulna", n); }
public void Check_Add_Truck() { //arrange Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.truck_number = "KST-11-1392"; information1.driver_name = "Mr. x"; //act bool t = kta_bl.addTruck(information1); //assert Assert.AreEqual(true, t); }
public void Check_Add_Driver() { //arrange Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.driver_name = "Mr. x"; information1.mobile_number = "12345678912"; information1.address = "Dhaka"; //act bool t = kta_bl.addDriver(information1); //assert Assert.AreEqual(true, t); }
public void Check_Add_Ship() { //arrange Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); //act information1.ship_name = "Sundorbon"; information1.amount = "500"; bool t = kta_bl.addShip(information1); //assert Assert.AreEqual(true, t); }
void destination() { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.cus_name = comboBox4.Text; string n = kta_bl.destination(information1); textBox5.Text = n; } catch (Exception ex) { Console.WriteLine(ex); } }
public void Check_Add_Customer() { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.cus_name = "aaa"; information1.cus_mob_no = "xxx"; information1.cus_address = "zzz"; //act bool t = (kta_bl.addCustomer(information1)); //assert Assert.AreEqual(true, t); }
void amount() { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.ship_name = comboBox1.Text; string n = kta_bl.amount(information1); amnt = float.Parse(n); label5.Text = "Available : " + amnt; // label5.Text = n; } catch (Exception ex) { Console.WriteLine(ex); } }
private void Update_button_Click(object sender, EventArgs e) { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.truck_number = comboBox3.Text; information1.driver_name = comboBox2.Text; kta_bl.update_truck(information1); // amnt = float.Parse(n); //label5.Text = "Available : "+amnt; // label5.Text = n; } catch (Exception ex) { Console.WriteLine(ex); } }
void truck_number() { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.driver_name = comboBox2.Text; string n = kta_bl.truck_number(information1); // amnt = float.Parse(n); // label5.Text = "Available : " + amnt; // label5.Text = n; comboBox3.Text = n; } catch (Exception ex) { Console.WriteLine(ex); } }
private void button2_Click(object sender, EventArgs e) { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.ship_name = comboBox1.Text; information1.amount = textBox3.Text; kta_bl.update_ship(information1); comboBox1.Text = ""; textBox3.Text = ""; // textBox6.Text = ""; } catch (Exception ex) { Console.WriteLine(ex); } }
void fill_combobox4() { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); Kustia_Trading_Agency_Management_Entity information2 = new Kustia_Trading_Agency_Management_Entity(); information2 = kta_bl.customer_in_combobox(information1); int len = information2.customerName.Length; for (int i = 0; i < len; i++) { comboBox4.Items.Add(information2.customerName[i]); } } catch (Exception ex) { Console.WriteLine(ex); } }
void fill_combobox2() { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); Kustia_Trading_Agency_Management_Entity information2 = new Kustia_Trading_Agency_Management_Entity(); information2 = kta_bl.load_truck_in_combobox(information1); int len = information2.truckNumber.Length; for (int i = 0; i < len; i++) { comboBox3.Items.Add(information2.truckNumber[i]); } } catch (Exception ex) { Console.WriteLine(ex); } }
void product2() { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); Kustia_Trading_Agency_Management_Entity information2 = new Kustia_Trading_Agency_Management_Entity(); information1.ship_name = comboBox2.Text; information2 = kta_bl.product(information1); // amnt = float.Parse(n); // label5.Text = "Available : " + amnt; // label5.Text = n; textBox5.Text = information2.amount; //textBox6.Text = information2.address; } catch (Exception ex) { Console.WriteLine(ex); } }
void details2() { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); Kustia_Trading_Agency_Management_Entity information2 = new Kustia_Trading_Agency_Management_Entity(); information1.cus_name = comboBox1.Text; information2 = kta_bl.cus_details(information1); // amnt = float.Parse(n); // label5.Text = "Available : " + amnt; // label5.Text = n; textBox7.Text = information2.cus_address; textBox8.Text = information2.cus_mob_no; } catch (Exception ex) { Console.WriteLine(ex); } }
private void button1_Click_1(object sender, EventArgs e) { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.ship_name = textBox1.Text; information1.amount = textBox2.Text; if (kta_bl.addShip(information1)) { textBox1.Text = ""; textBox2.Text = ""; } else { MessageBox.Show("not successful"); } }
private void button3_Click(object sender, EventArgs e) { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.cus_name = comboBox1.Text; kta_bl.delete_customer(information1); textBox7.Text = ""; textBox8.Text = ""; comboBox1.Text = ""; // amnt = float.Parse(n); //label5.Text = "Available : "+amnt; // label5.Text = n; } catch (Exception ex) { Console.WriteLine(ex); } }
void details() { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); Kustia_Trading_Agency_Management_Entity information2 = new Kustia_Trading_Agency_Management_Entity(); information1.driver_name = comboBox4.Text; information2 = kta_bl.details(information1); // amnt = float.Parse(n); // label5.Text = "Available : " + amnt; // label5.Text = n; textBox7.Text = information2.mobile_number; textBox6.Text = information2.address; } catch (Exception ex) { Console.WriteLine(ex); } }
private void button1_Click(object sender, EventArgs e) { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.truck_number = textBox1.Text; information1.driver_name = comboBox1.Text; if (kta_bl.addTruck(information1)) { comboBox1.Text = ""; textBox1.Text = ""; } else { MessageBox.Show("not successful"); } }
private void button2_Click(object sender, EventArgs e) { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.driver_name = textBox3.Text; information1.mobile_number = textBox4.Text; information1.address = textBox5.Text; if (kta_bl.addDriver(information1)) { textBox4.Text = ""; textBox5.Text = ""; textBox3.Text = ""; } else { MessageBox.Show("not successful"); } }
private void button3_Click(object sender, EventArgs e) { try { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.driver_name = comboBox4.Text; information1.mobile_number = textBox7.Text; information1.address = textBox6.Text; kta_bl.update_driver(information1); //amnt = float.Parse(n); //label5.Text = "Available : "+amnt; //label5.Text = n; comboBox4.Text = ""; textBox7.Text = ""; textBox6.Text = ""; } catch (Exception ex) { Console.WriteLine(ex); } }
private void button1_Click(object sender, EventArgs e) { Kustia_Trading_Agency_Management_BL kta_bl = new Kustia_Trading_Agency_Management_BL(); Kustia_Trading_Agency_Management_Entity information1 = new Kustia_Trading_Agency_Management_Entity(); information1.cus_name = textBox1.Text; information1.cus_mob_no = textBox2.Text; information1.cus_address = textBox3.Text; if (kta_bl.addCustomer(information1)) { textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; } else { MessageBox.Show("not successful"); } }