Exemplo n.º 1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the EmployeeInfoes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEmployeeInfoes(EmployeeInfo employeeInfo)
 {
     base.AddObject("EmployeeInfoes", employeeInfo);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the EmployeeInfoes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEmployeeInfoes(EmployeeInfo employeeInfo)
 {
     base.AddObject("EmployeeInfoes", employeeInfo);
 }
 /// <summary>
 /// Create a new EmployeeInfo object.
 /// </summary>
 /// <param name="empNo">Initial value of the EmpNo property.</param>
 /// <param name="empName">Initial value of the EmpName property.</param>
 /// <param name="salary">Initial value of the Salary property.</param>
 /// <param name="deptName">Initial value of the DeptName property.</param>
 /// <param name="designation">Initial value of the Designation property.</param>
 public static EmployeeInfo CreateEmployeeInfo(global::System.Int32 empNo, global::System.String empName, global::System.Decimal salary, global::System.String deptName, global::System.String designation)
 {
     EmployeeInfo employeeInfo = new EmployeeInfo();
     employeeInfo.EmpNo = empNo;
     employeeInfo.EmpName = empName;
     employeeInfo.Salary = salary;
     employeeInfo.DeptName = deptName;
     employeeInfo.Designation = designation;
     return employeeInfo;
 }
 public ActionResult Index(EmployeeInfo emp)
 {
     List<EmployeeInfo> Employees;
     if (emp.EmpName != null)
     {
         Employees = (from Emp in objContext.EmployeeInfoes
                      where Emp.EmpName.StartsWith(emp.EmpName)
                      select Emp).ToList();
     }
     else
     {
         Employees = objContext.EmployeeInfoes.ToList();
     }
     return PartialView("EmployeeInfo", Employees);
 }