private void button2_Click(object sender, EventArgs e) { Form cfShowBill = new ShowBill(); //cfchangepasword.MdiParent = this.MdiParent; cfShowBill.ShowDialog(); }
public Delivery_Dialog(int id, string delv_state, ShowBill form) { InitializeComponent(); this.id = id; this.delv_state = delv_state; this.form = form; }
public AddBillForm(ShowBill form2, int bill_id) { InitializeComponent(); WindowState = FormWindowState.Maximized; this.form2 = form2; this.bill_id = bill_id; db = new SqlConnectionDB(); cases = 2; this.Text = "تعديل الفاتوره"; save.Text = "تعديل"; }
/// <summary> /// Shows the details of a bill given an id /// </summary> /// <param name="id">1</param> /// <returns>Bill details with an ID of 1. Including amount, date issued, and bill breakdown</returns> public ActionResult Details(int id) { ShowBill ViewModel = new ShowBill(); //Show only if the user is in an admin role, can change for user role ViewModel.isadmin = User.IsInRole("Admin"); string url = "BillData/FindBill/" + id; HttpResponseMessage response = client.GetAsync(url).Result; if (response.IsSuccessStatusCode) { BillDto SelectedBill = response.Content.ReadAsAsync <BillDto>().Result; ViewModel.Bill = SelectedBill; return(View(ViewModel)); } else { return(RedirectToAction("Error")); } }