protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                repairTableAdapter daSubPageCust = new repairTableAdapter();
                int id = Convert.ToInt32(Request.QueryString["val"]);

                daSubPageCust.Fill(dsRepair.repair, id);

                foreach (DataRow r in dsRepair.repair)
                {
                    lblordNumber.Text      = r.ItemArray[1].ToString();
                    lblordDate.Text        = r.ItemArray[2].ToString();
                    lblserordDateIn.Text   = r.ItemArray[3].ToString();
                    lblserordDateOut.Text  = r.ItemArray[4].ToString();
                    lblserordIssue.Text    = r.ItemArray[5].ToString();
                    lblserordWarrenty.Text = r.ItemArray[6].ToString();
                    lblserName.Text        = r.ItemArray[7].ToString();
                    lblserDescription.Text = r.ItemArray[8].ToString();
                    lblserPrice.Text       = r.ItemArray[9].ToString();
                    lblordPaid.Text        = r.ItemArray[10].ToString();
                    lblCustomer.Text       = r.ItemArray[11].ToString();
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            repairTableAdapter daCustomer = new repairTableAdapter();

            if (!User.Identity.IsAuthenticated)
            {
                Response.Redirect("~/Login.aspx");
            }

            daCustomer.Update(dsCustomer);
            daCustomer.Fill(dsCustomer.customer);

            foreach (DataRow r in dsCustomer.customer)
            {
                TableRow tblRow = new TableRow();

                TableCell linkButtons    = new TableCell();
                TableCell ordNumber      = new TableCell();
                TableCell ordDate        = new TableCell();
                TableCell serordDateIn   = new TableCell();
                TableCell serordDateOut  = new TableCell();
                TableCell serordIssue    = new TableCell();
                TableCell serordWarranty = new TableCell();
                TableCell serName        = new TableCell();
                TableCell serDescription = new TableCell();
                TableCell serPrice       = new TableCell();
                TableCell ordPaid        = new TableCell();
                TableCell Customer       = new TableCell();


                linkButtons.Controls.Add(new LinkButton {
                    Text = "Edit", PostBackUrl = "Customer_Edit.aspx?val=" + r.ItemArray[0].ToString()
                });
                linkButtons.Controls.Add(new Literal {
                    Text = "<br />"
                });
                linkButtons.Controls.Add(new LinkButton {
                    Text = "Delete", PostBackUrl = "Customer_Delete.aspx?val=" + r.ItemArray[0].ToString()
                });

                ordNumber.Text      = r.ItemArray[1].ToString();
                ordDate.Text        = r.ItemArray[2].ToString();
                serordDateIn.Text   = r.ItemArray[3].ToString();
                serordDateOut.Text  = r.ItemArray[4].ToString();
                serordIssue.Text    = r.ItemArray[5].ToString();
                serordWarranty.Text = r.ItemArray[6].ToString();
                serName.Text        = r.ItemArray[7].ToString();
                serDescription.Text = r.ItemArray[8].ToString();
                serPrice.Text       = r.ItemArray[9].ToString();
                ordPaid.Text        = r.ItemArray[10].ToString();
                Customer.Text       = r.ItemArray[11].ToString();

                tblRow.Cells.Add(linkButtons);
                tblRow.Cells.Add(ordNumber);
                tblRow.Cells.Add(ordDate);
                tblRow.Cells.Add(serordDateIn);
                tblRow.Cells.Add(serordDateOut);
                tblRow.Cells.Add(serordIssue);
                tblRow.Cells.Add(serordWarranty);
                tblRow.Cells.Add(serName);
                tblRow.Cells.Add(serDescription);
                tblRow.Cells.Add(serPrice);
                tblRow.Cells.Add(ordPaid);
                tblRow.Cells.Add(Customer);

                this.tblRepairs.Rows.Add(tblRow);
            }

            this.ddlManagement.Items[0].Attributes.Add("style", "color:#009900");
            this.ddlManagement.Items[0].Attributes.Add("disabled", "disabled");
        }