예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Form cfShowBill = new ShowBill();

            //cfchangepasword.MdiParent = this.MdiParent;
            cfShowBill.ShowDialog();
        }
예제 #2
0
 public Delivery_Dialog(int id, string delv_state, ShowBill form)
 {
     InitializeComponent();
     this.id         = id;
     this.delv_state = delv_state;
     this.form       = form;
 }
예제 #3
0
 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    = "تعديل";
 }
예제 #4
0
        /// <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"));
            }
        }