partial void DeleteemployeeInfo(employeeInfo instance);
private void detach_employeeInfo(employeeInfo entity) { this.SendPropertyChanging(); entity.positionInfo = null; }
partial void InsertemployeeInfo(employeeInfo instance);
partial void UpdateemployeeInfo(employeeInfo instance);
private void attach_employeeInfo(employeeInfo entity) { this.SendPropertyChanging(); entity.branchInfo = this; }
/// <summary> /// Edit /// </summary> /// <param name="emp"></param> public int EditEmp(employeeInfo emp) { string sql = string.Format("update employeeInfo set wxName='{0}',wxUser='******',wxOldUser='******',ToKen='{3}',Name='{4}',BranchID={5},positionId={6},phone='{7}',TEL='{8}',Address='{9}',LxrName='{10}',temp1='{12}',temp2='{13}',temp3='{14}',temp4='{15}',temp5='{16}' where Eid={11}", emp.wxName, emp.wxUser, emp.wxOldUser, emp.ToKen, emp.Name, emp.BranchID, emp.positionId, emp.phone, emp.TEL, emp.Address, emp.LxrName, emp.Eid,emp.temp1,emp.temp2,emp.temp3,emp.temp4,emp.temp5); return SqlHelper.ExecuteNonQuery(CommandType.Text, sql); }
/// <summary> /// 修改员工的方法 /// </summary> /// <param name="emp">员工实体</param> /// <param name="nowPosIds">职位编号</param> /// <returns></returns> public int UpdateEmpInfo(employeeInfo emp, string nowPosIds) { int count = 0; return count; }
/// <summary> /// 添加员工的方法 /// </summary> /// <param name="emp">员工实体</param> /// <param name="nowPosIds">职位编号</param> /// <returns></returns> public int InsertEmpInfo(employeeInfo emp, string nowPosIds) { int count = 0; return count; }
/// <summary> /// Insert /// </summary> /// <param name="emp"></param> public int InsertEmp(employeeInfo emp,Users user,employeeData empdata) { db.employeeInfo.InsertOnSubmit(emp); db.SubmitChanges(); user.EmployeeID = emp.Eid; user.Password = "******";//初始密码,123456 user.Status = 0; user.CreateTime = DateTime.Now; empdata.eid = emp.Eid; db.employeeData.InsertOnSubmit(empdata); db.Users.InsertOnSubmit(user); db.SubmitChanges(); return emp.Eid; }