예제 #1
0
        }   //supplier Edit

        public string Edit(Model.Employees employees)
        {
            string sqlStr = "update Employees set name=@name,post=@post,sex=@sex,telephone=@telephone where empID=@empID";

            SqlParameter[] paras = new SqlParameter[] {
                new SqlParameter("@empID", employees.EmpID),
                new SqlParameter("@name", employees.Name),
                new SqlParameter("@post", employees.Post),
                new SqlParameter("@sex", employees.Sex),
                new SqlParameter("@telephone", employees.Telephone)
            };
            if (userDao.Edit(sqlStr, paras))
            {
                return("Success");
            }
            else
            {
                return("Fail");
            }
        }   //employees Edit
예제 #2
0
        }   //users Insert

        public string Insert(Model.Employees employees)
        {
            string sqlStr = "insert into Employees(empID,name,salary,post,sex,telephone) values(@empID,@name,@salary,@post,@sex,@telephone)";

            SqlParameter[] paras = new SqlParameter[] {
                new SqlParameter("@empID", employees.EmpID),
                new SqlParameter("@name", employees.Name),
                new SqlParameter("@salary", employees.Salary),
                new SqlParameter("@post", employees.Post),
                new SqlParameter("@sex", employees.Sex),
                new SqlParameter("@telephone", employees.Telephone)
            };
            if (userDao.Insert(sqlStr, paras))
            {
                return("Success");
            }
            else
            {
                return("Fail");
            }
        }   //emoloyees Insert
예제 #3
0
 public static List<Orders> OrderByEmp(Employees empl)
 {
     return (from o in DMclass.dc.Orders
             where empl.EmployeeID == o.EmployeeID
             select o).ToList();
 }