public static Company RetrieveCompany(int id)
{
var cmp = new Company();
try
{
using (var con = new SqlConnection(ConfigurationManager.ConnectionStrings["MyDB"].ConnectionString))
{
con.Open();
using (var cmd = new SqlCommand("RetreiveEmailProc", con))
{
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@companyId", id);
SqlDataReader sdr = cmd.ExecuteReader();
while (sdr.Read())
{ // code omitted }
}
}
}
catch(Exception ex)
{
}
return cmp;
}
我可以添加多个" ng-model"元素?像那样:
<td style="width:5%" class="active"><input type="checkbox" ng-model="rep.Selected"/></td>
它会起作用吗?