public List <ManpowerClassificationAllDTO> GetAllClassification(ManpowerClassificationDTO objClassification)
        {
            List <ManpowerClassificationAllDTO> site = new List <ManpowerClassificationAllDTO>();

            using (DbLayer dbLayer = new DbLayer())
            {
                SqlCommand SqlCmd = new SqlCommand("spCreateOperation");
                SqlCmd.Parameters.AddWithValue("@CustomerId", objClassification.CustomerId);
                SqlCmd.Parameters.AddWithValue("@BranchId", objClassification.BranchId);
                SqlCmd.Parameters.AddWithValue("@SiteId", objClassification.SiteId);
                SqlCmd.Parameters.AddWithValue("@ActionBy", objClassification.ActionBy);
                SqlCmd.CommandType = CommandType.StoredProcedure;
                site = dbLayer.GetEntityList <ManpowerClassificationAllDTO>(SqlCmd);
            }
            return(site);
        }
Ejemplo n.º 2
0
        public HttpResponseMessage GetAllClassification(ManpowerClassificationDTO objGetManPower)
        {
            HttpResponseMessage message;

            try
            {
                // AssignManpowerDataAccessLayer _manPower = new AssignManpowerDataAccessLayer();
                var dynObj = new { result = _manPower.GetAllClassification(objGetManPower) };
                message = Request.CreateResponse(HttpStatusCode.OK, dynObj);
            }
            catch (Exception ex)
            {
                message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "Somthing wrong, Try Again!" });
                ErrorLog.CreateErrorMessage(ex, "AssignManpower", "GetAllClassification");
            }
            return(message);
        }