/SourceCode/Trunks/Source/InventoryManagementSystem/Services/FU.Capstones.IMS.Services/Management/InventoryService.cs

# · C# · 531 lines · 384 code · 119 blank · 28 comment · 0 complexity · 4ec7eeeb2bfd53f515c59fa981d0b2f2 MD5 · raw file

  1. using System;
  2. using System.ServiceModel.Activation;
  3. using FU.Capstones.IMS.Services.Common.DataContracts;
  4. using FU.Capstones.IMS.Services.Common.Respondents;
  5. using FU.Capstones.IMS.Services.DataContracts;
  6. using FU.Capstones.IMS.Services.Interfaces;
  7. namespace FU.Capstones.IMS.Services.Management
  8. {
  9. [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
  10. public class InventoryService : IInventoryService
  11. {
  12. private readonly Manager manager = new Manager();
  13. #region Implementation of IInventoryService
  14. #region Account
  15. //public CollectionFeedback<Account> GetAccountCollection(bool isShowAll)
  16. //{
  17. // return manager.GetAccountCollection(isShowAll);
  18. //}
  19. //public SingleFeedback<Account> GetSingleAccount(int accountID)
  20. //{
  21. // return manager.GetSingleAccount(accountID);
  22. //}
  23. //public SingleFeedback<int> InsertAccount(Account data)
  24. //{
  25. // return manager.InsertAccount(data);
  26. //}
  27. //public Feedback UpdateAccount(Account data)
  28. //{
  29. // return manager.UpdateAccount(data);
  30. //}
  31. //public Feedback DeleteAccount(int data)
  32. //{
  33. // return manager.DeleteAccount(data);
  34. //}
  35. //public Feedback UndoDeleteAccount(int data)
  36. //{
  37. // return manager.UndoDeleteAccount(data);
  38. //}
  39. //public CollectionFeedback<Account> SearchAccount(Account criteria)
  40. //{
  41. // return manager.SearchAccount(criteria);
  42. //}
  43. public SingleFeedback<Account> Login(Account account)
  44. {
  45. return manager.Login(account);
  46. }
  47. public Feedback CheckIfUsernameExists(string usernameToCheck)
  48. {
  49. return manager.CheckIfUsernameExists(usernameToCheck);
  50. }
  51. public Feedback ResetPassword(Account account)
  52. {
  53. return manager.ResetPassword(account);
  54. }
  55. public Feedback ChangePassword(NewPasswordData account)
  56. {
  57. return manager.ChangePassword(account);
  58. }
  59. #endregion
  60. #region Authorization
  61. public CollectionFeedback<Authorization> GetAuthorizationCollection(bool isShowAll)
  62. {
  63. return manager.GetAuthorizationCollection(isShowAll);
  64. }
  65. public SingleFeedback<Authorization> GetSingleAuthorization(int objectID)
  66. {
  67. return manager.GetSingleAuthorization(objectID);
  68. }
  69. public SingleFeedback<int> InsertAuthorization(Authorization data)
  70. {
  71. return manager.InsertAuthorization(data);
  72. }
  73. public Feedback UpdateAuthorization(Authorization data)
  74. {
  75. return manager.UpdateAuthorization(data);
  76. }
  77. public Feedback DeleteAuthorization(int data)
  78. {
  79. return manager.DeleteAuthorization(data);
  80. }
  81. public CollectionFeedback<Authorization> SearchAuthorization(Authorization criteria)
  82. {
  83. return manager.SearchAuthorization(criteria);
  84. }
  85. #endregion
  86. #region Contact
  87. public CollectionFeedback<Contact> GetContactCollection(bool isShowAll)
  88. {
  89. return manager.GetContactCollection(isShowAll);
  90. }
  91. public SingleFeedback<Contact> GetSingleContact(int contactID)
  92. {
  93. return manager.GetSingleContact(contactID);
  94. }
  95. public SingleFeedback<int> InsertContact(Contact data)
  96. {
  97. return manager.InsertContact(data);
  98. }
  99. public Feedback UpdateContact(Contact data)
  100. {
  101. return manager.UpdateContact(data);
  102. }
  103. public Feedback DeleteContact(int data)
  104. {
  105. return manager.DeleteContact(data);
  106. }
  107. public CollectionFeedback<Contact> SearchContact(Contact criteria)
  108. {
  109. return manager.SearchContact(criteria);
  110. }
  111. public Feedback UndoDeleteContact(int data)
  112. {
  113. return manager.UndoDeleteContact(data);
  114. }
  115. #endregion
  116. #region Employee
  117. public CollectionFeedback<Employee> GetEmployeeCollection(bool isShowAll)
  118. {
  119. return manager.GetEmployeeCollection(isShowAll);
  120. }
  121. public SingleFeedback<Employee> GetSingleEmployee(int objectID)
  122. {
  123. return manager.GetSingleEmployee(objectID);
  124. }
  125. public SingleFeedback<int> InsertEmployee(Employee data)
  126. {
  127. return manager.InsertEmployee(data);
  128. }
  129. public Feedback UpdateEmployee(Employee data)
  130. {
  131. return manager.UpdateEmployee(data);
  132. }
  133. public Feedback DeleteEmployee(int data)
  134. {
  135. return manager.DeleteEmployee(data);
  136. }
  137. public CollectionFeedback<Employee> SearchEmployee(EmployeeCriteria criteria)
  138. {
  139. return manager.SearchEmployee(criteria);
  140. }
  141. public Feedback UndoDeleteEmployee(int data)
  142. {
  143. return manager.UndoDeleteEmployee(data);
  144. }
  145. #endregion
  146. #region EmploymentType
  147. public CollectionFeedback<EmploymentType> GetEmploymentTypeCollection(bool isShowAll)
  148. {
  149. return manager.GetEmploymentTypeCollection(isShowAll);
  150. }
  151. public SingleFeedback<EmploymentType> GetSingleEmploymentType(int employmentTypeID)
  152. {
  153. return manager.GetSingleEmploymentType(employmentTypeID);
  154. }
  155. public SingleFeedback<int> InsertEmploymentType(EmploymentType data)
  156. {
  157. return manager.InsertEmploymentType(data);
  158. }
  159. public Feedback UpdateEmploymentType(EmploymentType data)
  160. {
  161. return manager.UpdateEmploymentType(data);
  162. }
  163. public Feedback DeleteEmploymentType(int data)
  164. {
  165. return manager.DeleteEmploymentType(data);
  166. }
  167. public CollectionFeedback<EmploymentType> SearchEmploymentType(EmploymentType criteria)
  168. {
  169. return manager.SearchEmploymentType(criteria);
  170. }
  171. public Feedback UndoDeleteEmploymentType(int data)
  172. {
  173. return manager.UndoDeleteEmploymentType(data);
  174. }
  175. #endregion
  176. #region Material
  177. public CollectionFeedback<Material> GetMaterialCollection(bool isShowAll)
  178. {
  179. return manager.GetMaterialCollection(isShowAll);
  180. }
  181. public CollectionFeedback<Material> GetMaterialCollectionType(bool isShowAll)
  182. {
  183. return manager.GetMaterialCollectionType(isShowAll);
  184. }
  185. public SingleFeedback<Material> GetSingleMaterial(int materialID)
  186. {
  187. return manager.GetSingleMaterial(materialID);
  188. }
  189. public SingleFeedback<int> InsertMaterial(Material data)
  190. {
  191. return manager.InsertMaterial(data);
  192. }
  193. public Feedback UpdateMaterial(Material data)
  194. {
  195. return manager.UpdateMaterial(data);
  196. }
  197. public Feedback DeleteMaterial(int data)
  198. {
  199. return manager.DeleteMaterial(data);
  200. }
  201. public CollectionFeedback<Material> SearchMaterial(MaterialCriteria criteria)
  202. {
  203. return manager.SearchMaterial(criteria);
  204. }
  205. public Feedback UndoDeleteMaterial(int data)
  206. {
  207. return manager.UndoDeleteMaterial(data);
  208. }
  209. #endregion
  210. #region Order
  211. public CollectionFeedback<Order> GetOrderCollection(bool isShowAll)
  212. {
  213. return manager.GetOrderCollection(isShowAll);
  214. }
  215. public CollectionFeedback<Order> GetOrderCollectionByParameter(bool? isMaterial)
  216. {
  217. return manager.GetOrderCollectionByParameter(isMaterial);
  218. }
  219. public SingleFeedback<Order> GetSingleOrder(int orderID)
  220. {
  221. return manager.GetSingleOrder(orderID);
  222. }
  223. public SingleFeedback<int> InsertOrder(Order data)
  224. {
  225. return manager.InsertOrder(data);
  226. }
  227. public Feedback UpdateOrder(Order data)
  228. {
  229. return manager.UpdateOrder(data);
  230. }
  231. public Feedback DeleteOrder(int data)
  232. {
  233. return manager.DeleteOrder(data);
  234. }
  235. public CollectionFeedback<Order> SearchOrder(OrderCriteria criteria)
  236. {
  237. return manager.SearchOrder(criteria);
  238. }
  239. public Feedback UndoDeleteOrder(int data)
  240. {
  241. return manager.UndoDeleteOrder(data);
  242. }
  243. #endregion
  244. #region Partner
  245. public CollectionFeedback<Partner> GetPartnerCollection(bool isShowAll)
  246. {
  247. return manager.GetPartnerCollection(isShowAll);
  248. }
  249. public CollectionFeedback<Partner> GetPartnerCollectionByParam(bool? isSupplier)
  250. {
  251. return manager.GetPartnerCollectionByParam(isSupplier);
  252. }
  253. public SingleFeedback<Partner> GetSinglePartner(int partnerID)
  254. {
  255. return manager.GetSinglePartner(partnerID);
  256. }
  257. public SingleFeedback<int> InsertPartner(Partner data)
  258. {
  259. return manager.InsertPartner(data);
  260. }
  261. public Feedback UpdatePartner(Partner data)
  262. {
  263. return manager.UpdatePartner(data);
  264. }
  265. public Feedback DeletePartner(int data)
  266. {
  267. return manager.DeletePartner(data);
  268. }
  269. public CollectionFeedback<Partner> SearchPartner(Partner criteria)
  270. {
  271. return manager.SearchPartner(criteria);
  272. }
  273. public Feedback UndoDeletePartner(int data)
  274. {
  275. return manager.UndoDeletePartner(data);
  276. }
  277. #endregion
  278. #region Product
  279. public CollectionFeedback<Product> GetProductCollection(bool isShowAll)
  280. {
  281. return manager.GetProductCollection(isShowAll);
  282. }
  283. public CollectionFeedback<Product> GetProductCollectionType(bool isShowAll)
  284. {
  285. return manager.GetProductCollectionType(isShowAll);
  286. }
  287. public SingleFeedback<Product> GetSingleProduct(int productID)
  288. {
  289. return manager.GetSingleProduct(productID);
  290. }
  291. public SingleFeedback<int> InsertProduct(Product data)
  292. {
  293. return manager.InsertProduct(data);
  294. }
  295. public Feedback InsertBuiltupMaterial(int pID, int mID, long mQuantity)
  296. {
  297. return manager.InsertBuiltupMaterial(pID, mID, mQuantity);
  298. }
  299. public Feedback UpdateProduct(Product data)
  300. {
  301. return manager.UpdateProduct(data);
  302. }
  303. public Feedback DeleteProduct(int data)
  304. {
  305. return manager.DeleteProduct(data);
  306. }
  307. public Feedback DeleteProductBuiltup(int pID, int mID)
  308. {
  309. return manager.DeleteBuiltup(pID, mID);
  310. }
  311. public CollectionFeedback<Product> SearchProduct(ProductCriteria criteria)
  312. {
  313. return manager.SearchProduct(criteria);
  314. }
  315. public Feedback UndoDeleteProduct(int data)
  316. {
  317. return manager.UndoDeleteProduct(data);
  318. }
  319. #endregion
  320. #region Role
  321. public CollectionFeedback<Role> GetRoleCollection(bool isShowAll)
  322. {
  323. return manager.GetRoleCollection(isShowAll);
  324. }
  325. public SingleFeedback<Role> GetSingleRole(int roleID)
  326. {
  327. return manager.GetSingleRole(roleID);
  328. }
  329. public SingleFeedback<int> InsertRole(Role data)
  330. {
  331. return manager.InsertRole(data);
  332. }
  333. public Feedback UpdateRole(Role data)
  334. {
  335. return manager.UpdateRole(data);
  336. }
  337. public Feedback DeleteRole(int data)
  338. {
  339. return manager.DeleteRole(data);
  340. }
  341. public CollectionFeedback<Role> SearchRole(Role criteria)
  342. {
  343. return manager.SearchRole(criteria);
  344. }
  345. public Feedback UndoDeleteRole(int data)
  346. {
  347. return manager.UndoDeleteRole(data);
  348. }
  349. #endregion
  350. #region Warehouse
  351. public CollectionFeedback<Warehouse> GetWarehouseCollection(bool isShowAll)
  352. {
  353. return manager.GetWarehouseCollection(isShowAll);
  354. }
  355. public SingleFeedback<Warehouse> GetSingleWarehouse(int warehouseID)
  356. {
  357. return manager.GetSingleWarehouse(warehouseID);
  358. }
  359. public SingleFeedback<int> InsertWarehouse(Warehouse data)
  360. {
  361. return manager.InsertWarehouse(data);
  362. }
  363. public Feedback UpdateWarehouse(Warehouse data)
  364. {
  365. return manager.UpdateWarehouse(data);
  366. }
  367. public Feedback DeleteWarehouse(int data)
  368. {
  369. return manager.DeleteWarehouse(data);
  370. }
  371. public CollectionFeedback<Warehouse> SearchWarehouse(Warehouse criteria)
  372. {
  373. return manager.SearchWarehouse(criteria);
  374. }
  375. public Feedback UndoDeleteWarehouse(int data)
  376. {
  377. return manager.UndoDeleteWarehouse(data);
  378. }
  379. #endregion
  380. #region MaterialLoaf
  381. public CollectionFeedback<MaterialLoaf> GetMaterialLoafCollection(bool isShowAll)
  382. {
  383. return manager.GetMaterialLoafCollection(isShowAll);
  384. }
  385. public SingleFeedback<MaterialLoaf> GetSingleMaterialLoaf(int materialID)
  386. {
  387. return manager.GetSingleMaterialLoaf(materialID);
  388. }
  389. public SingleFeedback<int> InsertMaterialLoaf(MaterialLoaf data)
  390. {
  391. return manager.InsertMaterialLoaf(data);
  392. }
  393. public Feedback UpdateMaterialLoaf(MaterialLoaf data)
  394. {
  395. return manager.UpdateMaterialLoaf(data);
  396. }
  397. public Feedback DeleteMaterialLoaf(int data)
  398. {
  399. return manager.DeleteMaterialLoaf(data);
  400. }
  401. public CollectionFeedback<MaterialLoaf> SearchMaterialLoaf(MaterialLoaf criteria)
  402. {
  403. return manager.SearchMaterialLoaf(criteria);
  404. }
  405. public Feedback UndoDeleteMaterialLoaf(int data)
  406. {
  407. return manager.UndoDeleteMaterialLoaf(data);
  408. }
  409. #endregion
  410. #endregion
  411. }
  412. }