Exemple #1
0
        public ViewFolderModel DeleteDocument(ViewFolderModel objViewFolderModel)
        {
            SqlParameter pErrorCode = new SqlParameter("@ErrorCode", objViewFolderModel.ErrorCode);

            pErrorCode.Direction = ParameterDirection.Output;
            pErrorCode.Size      = 10;

            SqlParameter pErrorMessage = new SqlParameter("@ErrorMessage", objViewFolderModel.Message);

            pErrorMessage.Direction = ParameterDirection.Output;
            pErrorMessage.Size      = 100;

            SqlParameter[] parmList =
            {
                new SqlParameter("@DocumentID", objViewFolderModel.DeletedDocumentID)
                ,                               new SqlParameter("@CreatedBy", objViewFolderModel.UserId)
                ,                               pErrorCode
                ,                               pErrorMessage
            };
            //Call delete stored procedure to delete  category
            SQLHelper.ExecuteNonQuery(SQLHelper.ConnectionStringLocalTransaction, CommandType.StoredProcedure, DBConstants.Admin_UserDeleteDocument, parmList);
            //set output parameter error code and error message
            objViewFolderModel.ErrorCode = Convert.ToInt32(pErrorCode.Value);
            objViewFolderModel.Message   = Convert.ToString(pErrorMessage.Value);
            return(objViewFolderModel);
        }
 public ViewFolderModel DeleteFolder(ViewFolderModel objViewFolderModel)
 {
     return(objBusUserLogin.DeleteFolder(objViewFolderModel));
 }
 public ViewFolderModel DeleteDocument(ViewFolderModel objViewFolderModel)
 {
     return(objBusUserLogin.DeleteDocument(objViewFolderModel));
 }