int rowindex = GVRules.SelectedIndex;
foreach (GridViewRow gvrow in GVRules.Rows)
{
if (gvrow.RowIndex != rowindex)
{
if (DdlRule.SelectedValue == GVRules.DataKeys[gvrow.RowIndex].Values[2].ToString()
&& DdlMemPrmZone.SelectedItem.Text == gvrow.Cells[2].Text && DdlMemProvZone.SelectedItem.Text ==
gvrow.Cells[3].Text)
{
Label1.Text = "Rule " + DdlRule.SelectedItem.Text + " for Member Premium Zone "
+ DdlMemPrmZone.SelectedItem.Text + " and Member Provider Zone " + DdlMemProvZone.SelectedItem.Text
+ " is already added to this Policy !!";
return false;
}
}
}
foreach (GridViewRow gvrow in GVRules.Rows)
{
if (gvrow.RowIndex != rowindex)
{
if (DdlRule.SelectedValue == GVRules.DataKeys[gvrow.RowIndex].Values[2].ToString()
&& DdlMemPrmZone.SelectedItem.Text == gvrow.Cells[2].Text && DdlMemProvZone.SelectedItem.Text ==
gvrow.Cells[3].Text)
{
Label1.Text = "Rule " + DdlRule.SelectedItem.Text + " for Member Premium Zone "
+ DdlMemPrmZone.SelectedItem.Text + " and Member Provider Zone " + DdlMemProvZone.SelectedItem.Text
+ " is already added to this Policy !!";
return false;
}
}
}
No comments:
Post a Comment