
I have a structure like above and they are individual controls not a gridview so when a user fills the respective section only it should get entered into the DB but all the other fields also getting inserted.
InsertObjectives(lblCommunication.Text, tbObj1.Text, tbRating.Text, tbStrength.Text, cmn.Type, cmn.Contribution, cmn.ContributionRemarks);
InsertObjectives(lblDomain.Text, tbObj2.Text, tbRating1.Text, tbStrength1.Text, cmn.Type, cmn.Contribution, cmn.ContributionRemarks);
InsertObjectives(lblLeadership.Text, tbObj3.Text, tbRating2.Text, tbSTrength2.Text, cmn.Type, cmn.Contribution, cmn.ContributionRemarks);
InsertObjectives(lblBehavior.Text, tbObj4.Text, tbRating3.Text, tbStrength3.Text, cmn.Type, cmn.Contribution, cmn.ContributionRemarks);
public void InsertObjectives(string lbl, string txtobj, string tbrating, string tbstr,string strType,string strContribution,string strRemarks)
{
Common cmn = new Common();
cmn.InsertObject(lbl, txtobj, tbrating, tbstr,strType,strContribution,strRemarks);
}
Any help on this problem??
Similarly, you can do it for the rest of the fields:
OR, define this method:
Usage: