private void btnSelectRepair_Click_1(object sender, EventArgs e)
        {
            if (grdListRepair.SelectedRows.Count > 0)
            {
                lblEstimateTitle.Visible = true;
                grpSelectParts.Enabled   = true;
                grpSelectRepair.Enabled  = false;
                lblEstimateTitle.Text   += txtRepID.Text;
                grdListRepair.DataSource = null;

                loadCombo();
                grdAddedParts.DataSource = null;

                ds = RepairParts.getRepairParts(ds, Convert.ToInt32(txtRepID.Text));
                grdAddedParts.DataSource = ds.Tables["Repair_Parts"];
                lblCostNum.Text          = RepairTableData.calculateRepairCost(ds.Tables["Repair_Parts"]);


                grpSelectParts.Visible = true;
            }
        }
Esempio n. 2
0
        private void grdListRepairs_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                int rowindex = grdListRepairs.CurrentCell.RowIndex;
                int id       = Convert.ToInt32(grdListRepairs.Rows[rowindex].Cells[0].Value.ToString());



                txtDesc.Text      = Repair.getDescription(id);
                lblCustEmail.Text = Repair.getEmail(id);

                lblCustEmail.Visible    = true;
                lblEmailTitle.Visible   = true;
                pnlConfirmation.Visible = true;
                radNo.Checked           = true;

                DataSet ds = new DataSet();
                ds = RepairParts.getRepairParts(ds, id);
                grdRepairParts.DataSource = ds.Tables["repair_parts"];
            }
        }