public List <BDMAttachementGetQuotation> GetAllQuoteById(BDMAppoinmentGetById objAppointmentDetail)
        {
            List <BDMAttachementGetQuotation> quote = new List <BDMAttachementGetQuotation>();

            using (DbLayer dbLayer = _unitOfWork.DbLayer)
            {
                SqlCommand SqlCmd = new SqlCommand("spSelectQuotefile");
                SqlCmd.Parameters.AddWithValue("@ClientId", objAppointmentDetail.ClientId);
                SqlCmd.Parameters.AddWithValue("@ActionBy", objAppointmentDetail.ActionBy);
                SqlCmd.CommandType = CommandType.StoredProcedure;
                quote = dbLayer.GetEntityList <BDMAttachementGetQuotation>(SqlCmd);
            }
            return(quote);
        }
Example #2
0
        public HttpResponseMessage GetBDMAppointmentQuotationById(BDMAppoinmentGetById objQuote)
        {
            HttpResponseMessage message;

            try
            {
                // BDMAttachmentService dalAttachment = new BDMAttachmentService();
                var dynObj = new { result = _attach.GetAllQuoteById(objQuote) };
                message = Request.CreateResponse(HttpStatusCode.OK, dynObj);
            }
            catch (Exception ex)
            {
                message = Request.CreateResponse(HttpStatusCode.BadRequest, new { msgText = "Something wrong. Try Again!" });

                ErrorLog.CreateErrorMessage(ex, "BDMAppoinmentDetail", "GetBDMAppointmentQuotationById");
            }
            return(message);
        }