public int Create(WPDevice ent) { int createdid = 0; WPDeviceDAO entDAO = new WPDeviceDAO(); sc = new SqlCommand("CreateWPDevice"); sc.CommandType = CommandType.StoredProcedure; addParameters(ent); createdid = entDAO.createEntity(sc); return(createdid); }
public int CreateWithAssign(WPDevice ent, int wpid, int userID) { int createdid = 0; WPDeviceDAO entDAO = new WPDeviceDAO(); sc = new SqlCommand("CreateWPDeviceWithAssign"); sc.CommandType = CommandType.StoredProcedure; addParameters(ent); sc.Parameters.Add("@wpid", wpid); sc.Parameters.Add("@UserID", userID); createdid = entDAO.createEntity(sc); return(createdid); }