예제 #1
0
        public Helper.MethodResponse UpdateBorrowInfoForWCF(Data.Model.BorrowInfo _borrow)
        {
            MethodResponse methodResponse = new MethodResponse();

            try
            {


                BorrowDB borrowdb = new BorrowDB() ;
                methodResponse = borrowdb.UpdateBorrowInfoForWCF(_borrow);


            }
            catch (Exception exc)
            {
                string serilazedObject = "";
                //_book.Serialize(ref serilazedObject);

                CustomException customException = new CustomException()
                {
                    Exception = exc,
                    ExceptionTime = DateTime.Now,
                    Parameters = serilazedObject,
                    HelpLink = "",
                    User = "",
                    MethodName = "UpdateBookForWCF"
                };

                //bool IsSaved = customException.SaveException(customException);

                //if (!IsSaved)
                //{
                //    // Mail At
                //}

                methodResponse.Object = null;
                methodResponse.Type = MethodResponse.ResponseType.Error;
                methodResponse.ResultText = "";
            }
            return methodResponse;
        }
예제 #2
0
        public Helper.MethodResponse DeleteBorrowInfoForWCF(int _borrowId)
        {
            MethodResponse methodResponse = new MethodResponse();

            try
            {

                BorrowDB borrowdb = new BorrowDB();
                methodResponse = borrowdb.DeleteBorrowInfoForWCF(_borrowId);
            }


            catch (Exception exc)
            {
                CustomException customException = new CustomException()
                {
                    Exception = exc,
                    ExceptionTime = DateTime.Now,
                    Parameters = _borrowId.ToString(),
                    HelpLink = "",
                    User = "",
                    MethodName = "DeleteBorrowInfoForWCF"
                };

                //bool IsSaved = customException.SaveException(customException);

                //if (!IsSaved)
                //{
                //    // Mail At
                //}

                methodResponse.Object = null;
                methodResponse.Type = MethodResponse.ResponseType.Error;
                methodResponse.ResultText = "";
            }

            return methodResponse;
        }
예제 #3
0
        public Helper.MethodResponse GetBorrowInfosForWCF()
        {
            MethodResponse methodResponse = new MethodResponse();

            try
            {


                BorrowDB borrowdb = new BorrowDB();
                methodResponse = borrowdb.GetBorrowInfosForWCF();

            }
            catch (Exception exc)
            {
                CustomException customException = new CustomException()
                {
                    Exception = exc,
                    ExceptionTime = DateTime.Now,
                    Parameters = "",
                    HelpLink = "",
                    User = "",
                    MethodName = "GetBorrowInfosForWCF"
                };

                //bool IsSaved = customException.SaveException(customException);

                //if (!IsSaved)
                //{
                //    // Mail At
                //}

                methodResponse.Object = null;
                methodResponse.Type = MethodResponse.ResponseType.Error;
                methodResponse.ResultText = "An Error Occurred While Getting A List From Service Side.";
            }
            return methodResponse;
        }