private TextBox SetText(ComboBox _combo)
{
TextBox _tmpBox = new TextBox();
switch (_combo.Text)
{
case "Large":
_tmpBox.Text = "LRG" + (GetMaxID() + 1).ToString();
break;
//add other two also
default:
break;
}
return _tmpBox;
}
private int GetMaxID()
{
//Quary to take the max id from table column and return
//return (int)//SELECT MAX(ItemID) FROM dbo.TableName
}
//In Combo box itemChange event
private void ComboBoxItemchangeEvent(object sender, EventArgs e)
{
textbox= SetText(sender as ComboBox);
}
{
TextBox _tmpBox = new TextBox();
switch (_combo.Text)
{
case "Large":
_tmpBox.Text = "LRG" + (GetMaxID() + 1).ToString();
break;
//add other two also
default:
break;
}
return _tmpBox;
}
private int GetMaxID()
{
//Quary to take the max id from table column and return
//return (int)//SELECT MAX(ItemID) FROM dbo.TableName
}
//In Combo box itemChange event
private void ComboBoxItemchangeEvent(object sender, EventArgs e)
{
textbox= SetText(sender as ComboBox);
}



