Click here to Skip to main content
15,895,799 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regarding Validation of text boxes... Pin
Nirandas8-Jul-08 2:26
Nirandas8-Jul-08 2:26 
QuestionRegarding tab control Pin
tasumisra8-Jul-08 0:09
tasumisra8-Jul-08 0:09 
AnswerRe: Regarding tab control Pin
CPallini8-Jul-08 0:19
mveCPallini8-Jul-08 0:19 
GeneralRe: Regarding tab control Pin
tasumisra8-Jul-08 0:39
tasumisra8-Jul-08 0:39 
GeneralRe: Regarding tab control Pin
tasumisra8-Jul-08 1:29
tasumisra8-Jul-08 1:29 
QuestionDataGrid with checkbox Pin
benjamin yap8-Jul-08 0:00
benjamin yap8-Jul-08 0:00 
AnswerRe: DataGrid with checkbox Pin
half-life8-Jul-08 3:35
half-life8-Jul-08 3:35 
GeneralRe: DataGrid with checkbox [modified] Pin
benjamin yap8-Jul-08 4:59
benjamin yap8-Jul-08 4:59 
private void FrmAddOrder_Load(object sender, EventArgs e)
{
    int currentRow = 0;
    foreach (Product p in productTable.Values)
    {
        this.dataGridProduct.Rows.Add();
        this.dataGridProduct.Rows[currentRow].Cells["colProductName"].Value = p.Name;
        this.dataGridProduct.Rows[currentRow].Cells["colModelNumber"].Value = p.ModelNumber;
        this.dataGridProduct.Rows[currentRow].Cells["colCategory"].Value = p.Category;
        this.dataGridProduct.Rows[currentRow].Cells["colDesc"].Value = p.Description;
        this.dataGridProduct.Rows[currentRow].Cells["colMSRP"].Value = p.MSRP;
        this.dataGridProduct.Rows[currentRow].Cells["colRetailPrice"].Value = p.RetailPrice;

        currentRow++;
    }
}

private void btnOK_Click(object sender, EventArgs e)
{
    foreach (DataGridViewRow dgw in dataGridProduct.Rows)
    {
        DataGridViewCheckBoxCell datacell = dgw.Cells[0] as DataGridViewCheckBoxCell;
        try
        {
            if ((bool)datacell.Value == true)
            {

            }
        }
        catch (NullReferenceException)
        {
        }
    }
}


I have 2 hashtable

1st one is called orderTable;
2nd one is called productTable;

my "datagridproduct" will show the data that is productTable

The Order class have the following attribute

namespace EBMS
{
    public class Order
    {
        private string refNumber;
        private string custName;
        private string destAdd;
        private string destCity;
        private DateTime orderDate;
        private double totalPrice;
        private Hashtable itemList;


I want to create a new Order object and the itemList will store those items in the dategridproduct that is checked.

How do i add my product that is checked into itemList and then add the itemList into my orderTable

modified on Tuesday, July 8, 2008 1:16 PM

Questionconverting Datatable or Datagridview to a picture to send it as an email Pin
Praveen Raghuvanshi7-Jul-08 22:26
professionalPraveen Raghuvanshi7-Jul-08 22:26 
AnswerRe: converting Datatable or Datagridview to a picture to send it as an email Pin
N a v a n e e t h7-Jul-08 22:51
N a v a n e e t h7-Jul-08 22:51 
QuestionRe: converting Datatable or Datagridview to a picture to send it as an email Pin
Praveen Raghuvanshi9-Jul-08 6:38
professionalPraveen Raghuvanshi9-Jul-08 6:38 
QuestionHow to Determine The Location Of Label Text In Pixels Pin
Ahmad Safwat7-Jul-08 22:00
Ahmad Safwat7-Jul-08 22:00 
AnswerRe: How to Determine The Location Of Label Text In Pixels Pin
Harvey Saayman7-Jul-08 22:02
Harvey Saayman7-Jul-08 22:02 
GeneralRe: How to Determine The Location Of Label Text In Pixels Pin
Ahmad Safwat7-Jul-08 22:11
Ahmad Safwat7-Jul-08 22:11 
GeneralRe: How to Determine The Location Of Label Text In Pixels Pin
Harvey Saayman7-Jul-08 22:30
Harvey Saayman7-Jul-08 22:30 
GeneralRe: How to Determine The Location Of Label Text In Pixels Pin
Ahmad Safwat7-Jul-08 23:18
Ahmad Safwat7-Jul-08 23:18 
AnswerRe: How to Determine The Location Of Label Text In Pixels Pin
N a v a n e e t h7-Jul-08 23:14
N a v a n e e t h7-Jul-08 23:14 
GeneralRe: How to Determine The Location Of Label Text In Pixels Pin
Ahmad Safwat8-Jul-08 1:15
Ahmad Safwat8-Jul-08 1:15 
GeneralRe: How to Determine The Location Of Label Text In Pixels Pin
Alan Balkany8-Jul-08 5:37
Alan Balkany8-Jul-08 5:37 
GeneralRe: How to Determine The Location Of Label Text In Pixels Pin
Frank Horn8-Jul-08 7:23
Frank Horn8-Jul-08 7:23 
GeneralRe: How to Determine The Location Of Label Text In Pixels Pin
Ahmad Safwat8-Jul-08 21:24
Ahmad Safwat8-Jul-08 21:24 
AnswerRe: How to Determine The Location Of Label Text In Pixels Pin
Ahmad Safwat9-Jul-08 4:30
Ahmad Safwat9-Jul-08 4:30 
Questionhow to ? Pin
SSN7-Jul-08 21:46
SSN7-Jul-08 21:46 
AnswerRe: how to ? Pin
Ashfield7-Jul-08 22:33
Ashfield7-Jul-08 22:33 
AnswerRe: how to ? Pin
dealon7-Jul-08 22:33
dealon7-Jul-08 22:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.