using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FrameworkDAL.Query.BIZTransactionClass { public static class BIZTransactionClassQB { public const string GET_BIZTRANSACTIONCLASS = @" SELECT MB.BIZTRANSACTIONCLASSID AS BIZTransactionClassId, MB.BIZTRANSACTIONCLASSCODE AS BIZTransactionClassCode, MB.BIZTRANSACTIONCLASSNAME AS BIZTransactionClassName, MB.MODULEID AS ModuleId, M.MODULECODE AS ModuleCode, M.MODULENAME AS ModuleName, MB.ISACCOUNTPOST AS BIZTransactionClassIsAccountPost, MB.STOCKPOSTTYPE AS BIZTransactionClassStockPostType, MB.ISNARRATION AS BIZTransactionClassIsNarration, MB.ISPENDINGMAINTENANCE AS BIZTransactionClassIsPendingMaintance, MB.ISSELECTION AS BIZTransactionClassIsSelection, MB.ISNONSELECTIONENTRY AS BIZTransactionClassIsNonSelectionEntry, MB.ISAMENDMENTREQUIRED AS BIZTransactionClassIsAmendmentRequired, MB.ISCOSTCENTER AS BIZTransactionClassIscostCenter, MB.ISCHARGES AS BIZTransactionClassIsCharges, MB.ISQUANTITY AS BIZTransactionClassIsQuantity, MB.ISORGANIZATIONUNITREQUIRED AS BIZTransactionClassIsOrganizationUnitRequired, MB.ORGANIZATIONUNITLEVEL AS BIZTransactionClassOrganizationUnitlevel, MB.ISPACKINGDETAILSREQUIRED AS BIZTransactionClassIsPackingDetailRequired, MB.UPDATEITEMPARTY AS BIZTransactionClassUpdateItemParty, MB.ISCOUNTER AS BIZTransactionClassIsCounter, MB.ISPENDINGMAINTENANCE AS BIZTransactionClassIsPendingTrackingApplicable, MB.ISDELIVERYSCHEDULE AS BIZTransactionClassIsDeliveryTrackingRequired, MB.ISBATCH AS BIZTransactionClassIsBatch, MB.ISEXCISE AS BIZTransactionClassIsExcise, MB.STOCKVALUEAFFECTING AS BIZTransactionClassStockValueAffecting, MB.ISCONSUMPTION AS BIZTransactionClassIsConsumption, MB.ISWIPPOSTING AS BIZTransactionClassIsWIPPosting, MB.ISIORATIO AS BIZTransactionClassIsIORatio, MB.ISFORECASTAPPLICABLE AS BIZTransactionClassIsForecastApplicable, MB.UOMTYPE AS BIZTransactionClassUOMType, MB.ISPAYMENTDETAILS AS BIZTransactionClassIsPaymentDetails, MB.ISSHOWHISTORY AS BIZTransactionClassIsShowHistory, MB.ISMULTICURRENCY AS BIZTransactionClassIsMultiCurrency, MB.ISMATERIALRELATEDCLASS AS BIZTransactionClassIsMaterialRelatedClass, MB.ISSTOCKCHECKOPTION AS BIZTransactionClassIsStockCheckOption, MB.QUALITY AS BIZTransactionClassQuality, MB.ENTITYID AS EntityId, E.ENTITYCODE AS EntityCode, E.ENTITYNAME AS EntityName, MB.SORTORDER AS BIZTransactionClassSortOrder, MB.STATUS AS BIZTransactionClassStatus, MB.VERSION AS BIZTransactionClassVersion, MB.SOURCETYPE AS BIZTransactionClassSourceType, MB.CREATEDBYID AS BIZTransactionClassCreatedById, MB.CREATEDON AS BIZTransactionClassCreatedOn, MB.MODIFIEDBYID AS BIZTransactionClassModifiedById, MB.MODIFIEDON AS BIZTransactionClassModifiedOn, MB.REPORTID AS ReportId, R.REPORTNAME AS ReportName FROM MBIZTRANSACTIONCLASS MB LEFT JOIN MMODULE M ON MB.MODULEID = M.MODULEID LEFT JOIN MREPORT R ON MB.REPORTID = R.REPORTID LEFT JOIN MENTITY E ON MB.ENTITYID = E.ENTITYID WHERE MB.BIZTRANSACTIONCLASSID = @biztransactionclassid;"; public const string GET_SELECTLIST_BIZTRANSACTION_CLASS = @"WITH PagedBIZTransactionClass AS ( SELECT A.BIZTRANSACTIONCLASSID AS Id, A.BIZTRANSACTIONCLASSCODE AS Code, A.BIZTRANSACTIONCLASSNAME AS Name, A.MODULEID AS ModuleId, ROW_NUMBER() OVER (ORDER BY A.BIZTRANSACTIONCLASSID) AS RowNum FROM MBIZTRANSACTIONCLASS A WHERE 1=1 /*CRITERIA*/ ) SELECT Id, Code, Name FROM PagedBIZTransactionClass WHERE (@firstnumber = -1 AND @maxresult = -1) OR (RowNum BETWEEN @firstnumber AND @maxresult);"; } }