/// <summary> /// Register WorkOrder. /// </summary> /// <param name="modelWorkOrder">modelWorkOrder Insert Model information WorkOrder</param> /// <returns>Registered activity information.</returns> public SOFTTEK.SCMS.Entity.FA.WorkOrder RegisterWorkOrder(SOFTTEK.SCMS.Entity.FA.WorkOrder modelWorkOrder) { SOFTTEK.SCMS.Entity.FA.WorkOrder modelInsert = new SOFTTEK.SCMS.Entity.FA.WorkOrder(); return(context.Execute(() => { using (dataSource = new FAMDataContext(context.SecurityContext)) { dataSource.ConnectionString = "SRA"; dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"]; dataSource.Initialize(); var result = dataSource.InsertWorkOrder(modelWorkOrder); modelInsert = result; } return modelInsert; }, "Register an WorkOrder in system")); }
/// <summary> /// Register TechnicalEvaluationRequest. /// </summary> /// <param name="modelTechnicalEvaluationRequest">modelTechnicalEvaluationRequest Insert Model information TechnicalEvaluationRequest</param> /// <returns>Registered activity information.</returns> public SOFTTEK.SCMS.Entity.FA.TechnicalEvaluationRequest RegisterTechnicalEvaluationRequest(SOFTTEK.SCMS.Entity.FA.TechnicalEvaluationRequest modelTechnicalEvaluationRequest) { SOFTTEK.SCMS.Entity.FA.TechnicalEvaluationRequest modelInsert = new SOFTTEK.SCMS.Entity.FA.TechnicalEvaluationRequest(); return(context.Execute(() => { using (dataSource = new FAMDataContext(context.SecurityContext)) { dataSource.ConnectionString = "SRA"; dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"]; dataSource.Initialize(); var result = dataSource.InsertTechnicalEvaluationRequest(modelTechnicalEvaluationRequest); modelInsert = result; } return modelInsert; }, "Register an TechnicalEvaluationRequest in system")); }
/// <summary> /// Register PhysicalInventoryTakingItem. /// </summary> /// <param name="modelPhysicalInventoryTakingItem">modelPhysicalInventoryTakingItem Insert Model information PhysicalInventoryTakingItem</param> /// <returns>Registered activity information.</returns> public SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem RegisterPhysicalInventoryTakingItem(SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem modelPhysicalInventoryTakingItem) { SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem modelInsert = new SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem(); return(context.Execute(() => { using (dataSource = new FAMDataContext(context.SecurityContext)) { dataSource.ConnectionString = "SRA"; dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"]; dataSource.Initialize(); var result = dataSource.InsertPhysicalInventoryTakingItem(modelPhysicalInventoryTakingItem); modelInsert = result; } return modelInsert; }, "Register an PhysicalInventoryTakingItem in system")); }
/// <summary> /// Update an WorkOrder. /// </summary> /// <param name="modelUpdate">model Update Model information WorkOrder</param> /// /// <param name="modelSearch">model filter information WorkOrder</param> /// <returns>Update WorkOrder information.</returns> public SOFTTEK.SCMS.Entity.FA.WorkOrder UpdateWorkOrder(SOFTTEK.SCMS.Entity.FA.WorkOrder modelUpdate, SOFTTEK.SCMS.Entity.FA.WorkOrder modelSearch) { SOFTTEK.SCMS.Entity.FA.WorkOrder modelRUpdate = new SOFTTEK.SCMS.Entity.FA.WorkOrder(); return(context.Execute(() => { using (dataSource = new FAMDataContext(context.SecurityContext)) { dataSource.ConnectionString = "SRA"; dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"]; dataSource.Initialize(); var result = dataSource.UpdateWorkOrder(modelUpdate, modelSearch); modelRUpdate = result; } return modelRUpdate; }, "Update an WorkOrder in system")); }
/// <summary> /// Get all the modelWorkOrder. /// </summary> /// <param name="modelWorkOrder">modelWorkOrder Identifier</param> /// <returns></returns> public List <SOFTTEK.SCMS.Entity.FA.WorkOrder> SearchWorkOrders(SOFTTEK.SCMS.Entity.FA.WorkOrder modelWorkOrder) { List <SOFTTEK.SCMS.Entity.FA.WorkOrder> listWorkOrders = new List <SOFTTEK.SCMS.Entity.FA.WorkOrder>(); return(context.Execute(() => { using (dataSource = new FAMDataContext(context.SecurityContext)) { dataSource.ConnectionString = "SRA"; dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"]; dataSource.Initialize(); var results = dataSource.GetWorkOrders(modelWorkOrder); listWorkOrders = results; } return listWorkOrders; }, "Retrieve the registered WorkOrders in system.")); }
/// <summary> /// Get all the modelTechnicalEvaluationRequest. /// </summary> /// <param name="modelTechnicalEvaluationRequest">modelTechnicalEvaluationRequest Identifier</param> /// <returns></returns> public List <SOFTTEK.SCMS.Entity.FA.TechnicalEvaluationRequest> SearchTechnicalEvaluationRequests(SOFTTEK.SCMS.Entity.FA.TechnicalEvaluationRequest modelTechnicalEvaluationRequest) { List <SOFTTEK.SCMS.Entity.FA.TechnicalEvaluationRequest> listTechnicalEvaluationRequests = new List <SOFTTEK.SCMS.Entity.FA.TechnicalEvaluationRequest>(); return(context.Execute(() => { using (dataSource = new FAMDataContext(context.SecurityContext)) { dataSource.ConnectionString = "SRA"; dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"]; dataSource.Initialize(); var results = dataSource.GetTechnicalEvaluationRequests(modelTechnicalEvaluationRequest); listTechnicalEvaluationRequests = results; } return listTechnicalEvaluationRequests; }, "Retrieve the registered TechnicalEvaluationRequests in system.")); }
/// <summary> /// Get all the modelPhysicalInventoryTakingItem. /// </summary> /// <param name="modelPhysicalInventoryTakingItem">modelPhysicalInventoryTakingItem Identifier</param> /// <returns></returns> public List <SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem> SearchPhysicalInventoryTakingItems(SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem modelPhysicalInventoryTakingItem) { List <SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem> listPhysicalInventoryTakingItems = new List <SOFTTEK.SCMS.Entity.FA.PhysicalInventoryTakingItem>(); return(context.Execute(() => { using (dataSource = new FAMDataContext(context.SecurityContext)) { dataSource.ConnectionString = "SRA"; dataSource.DefaultUser = System.Configuration.ConfigurationManager.AppSettings["S_APP_UID"]; dataSource.Initialize(); var results = dataSource.GetPhysicalInventoryTakingItems(modelPhysicalInventoryTakingItem); listPhysicalInventoryTakingItems = results; } return listPhysicalInventoryTakingItems; }, "Retrieve the registered PhysicalInventoryTakingItems in system.")); }