using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FMDAL.Query.PartyBranchLocation { public static class PartyBranchLocationQB { public const string GET_PARTYBRANCHLOCATION = @"SELECT PBL.PARTYBRANCHLOCATIONID AS PartyBranchLocationId, PBL.PARTYBRANCHLOCATIONCODE AS PartyBranchLocationCode, PBL.PARTYBRANCHLOCATIONNAME AS PartyBranchLocationName, PBL.PARTYBRANCHID AS PartyBranchId, PB.PARTYBRANCHCODE AS PartyBranchCode, PB.PARTYBRANCHNAME AS PartyBranchName, PB.PARTYBRANCHSHORTNAME AS PartyBranchShortName, PBL.PARENTLOCATIONID AS ParentLocationId, PL.PARTYBRANCHLOCATIONCODE AS ParentLocationCode, PL.PARTYBRANCHLOCATIONNAME AS ParentLocationName, PBL.INCHARGEID AS PartyBranchLocationInchargeId, PBL.NATURE AS PartyBranchLocationNature, PBL.LEVELS AS PartyBranchLocationLevels, PBL.PARENTIDS AS PartyBranchLocationParentIds, PBL.SORTORDER AS PartyBranchLocationSortOrder, PBL.STATUS AS PartyBranchLocationStatus, PBL.VERSION AS PartyBranchLocationVersion, PBL.CREATEDBYID AS PartyBranchLocationCreatedById, PBL.CREATEDON AS PartyBranchLocationCreatedOn, PBL.MODIFIEDBYID AS PartyBranchLocationModifiedById, PBL.MODIFIEDON AS PartyBranchLocationModifiedOn FROM MPARTYBRANCHLOCATION PBL LEFT JOIN MPARTYBRANCH PB ON PBL.PARTYBRANCHID = PB.PARTYBRANCHID LEFT JOIN MPARTYBRANCHLOCATION PL ON PBL.PARENTLOCATIONID = PL.PARTYBRANCHLOCATIONID WHERE PBL.PARTYBRANCHLOCATIONID = @partybranchlocationid; "; public const string GET_SELECTLIST_PARTYBRANCHLOCATION = @"SELECT PARTYBRANCHLOCATIONID AS Id, PARTYBRANCHLOCATIONCODE AS Code, PARTYBRANCHLOCATIONNAME AS Name FROM MPARTYBRANCHLOCATION "; public const string SAVE_PARTYBRANCHLOCATION = @"INSERT INTO MPARTYBRANCHLOCATION ( PARTYBRANCHLOCATIONID, PARTYBRANCHLOCATIONCODE, PARTYBRANCHLOCATIONNAME, PARTYBRANCHID, PARENTLOCATIONID, INCHARGEID, NATURE, LEVELS, PARENTIDS, SORTORDER, STATUS, VERSION, CREATEDBYID, CREATEDON, MODIFIEDBYID, MODIFIEDON ) VALUES ( @PartyBranchLocationId, @PartyBranchLocationCode, @PartyBranchLocationName, @PartyBranchId, @ParentLocationId, @PartyBranchLocationInchargeId, @PartyBranchLocationNature, @PartyBranchLocationLevels, @PartyBranchLocationParentIds, @PartyBranchLocationSortOrder, @PartyBranchLocationStatus, @PartyBranchLocationVersion, @PartyBranchLocationCreatedById, @PartyBranchLocationCreatedOn, @PartyBranchLocationModifiedById, @PartyBranchLocationModifiedOn ); "; public const string UPDATE_PARTYBRANCHLOCATION = @"UPDATE MPARTYBRANCHLOCATION SET PARTYBRANCHLOCATIONCODE = @PartyBranchLocationCode, PARTYBRANCHLOCATIONNAME = @PartyBranchLocationName, PARTYBRANCHID = @PartyBranchId, PARENTLOCATIONID = @ParentLocationId, INCHARGEID = @PartyBranchLocationInchargeId, NATURE = @PartyBranchLocationNature, LEVELS = @PartyBranchLocationLevels, PARENTIDS = @PartyBranchLocationParentIds, SORTORDER = @PartyBranchLocationSortOrder, STATUS = @PartyBranchLocationStatus, VERSION = @PartyBranchLocationVersion, MODIFIEDBYID = @PartyBranchLocationModifiedById, MODIFIEDON = @PartyBranchLocationModifiedOn WHERE PARTYBRANCHLOCATIONID = @PartyBranchLocationId; "; public const string DELETE_PARTYBRANCHLOCATION = @"DELETE FROM MPARTYBRANCHLOCATION WHERE PARTYBRANCHLOCATIONID = @partybranchlocationid; "; } }