public static string GenerateColumnHtml(string name, Employee m, ref int index, string refId) { string valuePrefix = string.Format("{0}[{1}]", name, index); var sb = new StringBuilder(); string trName = string.Format("tr_{0}{1}", name, index); sb.AppendFormat("<tr Id='{0}' {1}>", trName, string.IsNullOrEmpty(refId) ? string.Empty : string.Format("class='child-of-{0}'", refId)); sb.AppendFormat("<input type='hidden' name='{0}.Id' value='{1}'></input>", valuePrefix, m.Id); sb.AppendFormat("<td class='columnTree'>"); sb.AppendFormat("{0}", m.Name); sb.AppendFormat("</td>"); sb.AppendFormat("<td>"); sb.AppendFormat("{0}", string.Join(",", m.EmployeeRoles.Select(c => c.Role.Name).ToArray())); sb.AppendFormat("</td>"); sb.Append("</tr>"); return sb.ToString(); }
partial void DeleteEmployee(Employee instance);
partial void UpdateEmployee(Employee instance);
partial void InsertEmployee(Employee instance);
private void detach_Employees(Employee entity) { this.SendPropertyChanging(); entity.StructDivision = null; }