using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace AdminDAL.Query.Branch { public static class BranchQB { public const string GET_BRANCH = @"SELECT B.BRANCHID AS BranchId, B.COMPANYID AS CompanyId, C.COMPANYCODE AS CompanyCode, C.COMPANYNAME AS CompanyName, C.COMPANYSHORTNAME AS CompanyShortName, B.BRANCHCODE AS BranchCode, B.BRANCHNAME AS BranchName, B.BRANCHSHORTNAME AS BranchShortName, B.SORTORDER AS BranchSortOrder, B.STATUS AS BranchStatus, B.VERSION AS BranchVersion, B.CREATEDBYID AS BranchCreatedById, B.CREATEDON AS BranchCreatedOn, B.MODIFIEDBYID AS BranchModifiedById, B.MODIFIEDON AS BranchModifiedOn, B.SOURCETYPE AS BranchSourceType, B.TENANTID AS BranchTenantId FROM MBRANCH B LEFT JOIN MCOMPANY C ON B.COMPANYID = C.COMPANYID WHERE B.BRANCHID = @branchid; "; public const string GET_SELECTLIST_BRANCH = @"SELECT BRANCHID AS Id, BRANCHCODE AS Code, BRANCHNAME AS Name, BRANCHSHORTNAME AS ShortName FROM MBRANCH "; public const string SAVE_BRANCH = @"INSERT INTO MBRANCH ( BRANCHID, COMPANYID, BRANCHCODE, BRANCHNAME, BRANCHSHORTNAME, SORTORDER, STATUS, VERSION, CREATEDBYID, CREATEDON, MODIFIEDBYID, MODIFIEDON ) VALUES ( @BranchId, @CompanyId, @BranchCode, @BranchName, @BranchShortName, @BranchSortOrder, @BranchStatus, @BranchVersion, @BranchCreatedById, @BranchCreatedOn, @BranchModifiedById, @BranchModifiedOn ); "; public const string UPDATE_BRANCH = @"UPDATE MBRANCH SET COMPANYID = @CompanyId, BRANCHCODE = @BranchCode, BRANCHNAME = @BranchName, BRANCHSHORTNAME = @BranchShortName, SORTORDER = @BranchSortOrder, STATUS = @BranchStatus, VERSION = @BranchVersion, MODIFIEDBYID = @BranchModifiedById, MODIFIEDON = @BranchModifiedOn WHERE BRANCHID = @BranchId; "; public const string DELETE_BRANCH = @"DELETE FROM MBRANCH WHERE BRANCHID = @branchid; "; } }