01 Jan 20 by Administrator 292 MS-SQL
ALTER TABLE Account ADD ALink varchar(3500)
GO
ALTER VIEW [dbo].[vAccount]
AS
SELECT a1.CompanyId, a1.AccountId, a1.AccountTypeId, a1.ARoleIds, a1.PAccountId, a1.ACode, a1.OCode, a1.ATitle, a1.Gender, a1.FName, a1.MName, a1.LName, a1.BirthDate, a1.JoinDate, a1.Age, a1.Email, a1.Mobile, a1.Password,
a1.BloodGroup, a1.DeptId, a1.DesgId, a1.MaritalStatus, a1.Nationality, a1.AAddress, a1.StatusOfResidential, a1.LocalityCAddress, a1.CCountry, a1.CState, a1.TownCAddress, a1.CDistrict, a1.CPinCode, a1.PermanentAddress,
a1.LocalityPAddress, a1.PCountry, a1.PState, a1.TownPAddress, a1.PDistrict, a1.PPinCode, a1.PhoneR, a1.PhoneO, a1.ProofOfAddress, a1.ProofOfIdentity, a1.LinkedTo, a1.FatherName, a1.MotherName, a1.GuardianName,
a1.IncTaxSlab, a1.RouteId, a1.ContactPerson, a1.AColor, a1.OpenDate, a1.OpenBal, a1.OpenDrCr, a1.AcNote, a1.ADImage, a1.AImages, a1.EduId, a1.OccupationId, a1.Caste, a1.SubCaste, a1.Disability, a1.DisabilityPer,
a1.DisabilityI, a1.AadharNo, a1.AadharI, a1.VotingCardNo, a1.VotingCardI, a1.RashanCard, a1.RashanI, a1.PanCardNo, a1.PanCardI, a1.PassportNo, a1.PassportIssueDt, a1.PassportExpDt, a1.PassportIssueAt, a1.PassportI,
a1.GSTTIN, a1.GSTTINI, a1.CGeoLocation, a1.PGeoLocation, a1.Facebook, a1.Instagram, a1.Twitter, a1.Youtube, a1.LinkedIn, a1.Social1, a1.Social2, a1.Social3, a1.PassOutYear, a1.AStandard, a1.AStatus, a1.AShowWeb, a1.ALink,
ISNULL(a1.FName, N'') + N' ' + ISNULL(a1.MName, N'') + N' ' + ISNULL(a1.LName, N'') AS FullName, ISNULL(a1.FName, N'') + N' ' + ISNULL(a1.LName, N'') AS FLName, g7.GTitle AS g7GTitle, g7.GShort AS g7GShort,
g7.SortOrder AS g7SortOrder, g10.GTitle AS g10GTitle, g10.GShort AS g10GShort, g10.SortOrder AS g10SortOrder, ISNULL(a1.FName, N'') + N' ' + ISNULL(a1.MName, N'') + N' ' + ISNULL(a1.LName, N'') + N': ' + ISNULL(a1.Mobile,
N'') AS FullMName, g80.GTitle AS g80GTitle, g80.GShort AS g80GShort, g80.SortOrder AS g80SortOrder, g9.GTitle AS g9GTitle, g9.GShort AS g9GShort, g9.SortOrder AS g9SortOrder
, ISNULL((SELECT STUFF(( SELECT ',' + ImageDir + REPLACE(ImageFileName, ImageFileType, '--100' + ImageFileType) FROM FileManager WHERE CompanyId=0 AND ImageType=0 AND CHARINDEX(N',' + LTRIM(RTRIM(ImageId)) + ',', N',' + REPLACE(CAST(ADImage AS nvarchar(max)),N' ',N'') + ',') > 0 FOR XML PATH('')), 1, 1, '') AS XYList), '../../img/aim.png') AS iADImage
, ISNULL((SELECT STUFF(( SELECT ',' + ImageDir + REPLACE(ImageFileName, ImageFileType, '--100' + ImageFileType) FROM FileManager WHERE CompanyId=0 AND ImageType=0 AND CHARINDEX(N',' + LTRIM(RTRIM(ImageId)) + ',', N',' + REPLACE(CAST(AImages AS nvarchar(max)),N' ',N'') + ',') > 0 FOR XML PATH('')), 1, 1, '') AS XYList), '../../img/aim.png') AS iAImages
, ISNULL((SELECT STUFF(( SELECT ',' + ImageDir + REPLACE(ImageFileName, ImageFileType, '--100' + ImageFileType) FROM FileManager WHERE CompanyId=0 AND ImageType=0 AND CHARINDEX(N',' + LTRIM(RTRIM(ImageId)) + ',', N',' + REPLACE(CAST(AadharI AS nvarchar(max)),N' ',N'') + ',') > 0 FOR XML PATH('')), 1, 1, '') AS XYList), '../../img/aim.png') AS iAadharI
FROM dbo.Account AS a1 LEFT OUTER JOIN
dbo.generalsettings AS g9 ON a1.DeptId = g9.GId AND a1.CompanyId = g9.Companyid AND g9.GTypeId = 9 LEFT OUTER JOIN
dbo.generalsettings AS g80 ON a1.EduId = g80.GId AND a1.CompanyId = g80.Companyid AND g80.GTypeId = 80 LEFT OUTER JOIN
dbo.generalsettings AS g10 ON a1.CompanyId = g10.Companyid AND a1.DesgId = g10.GId AND g10.GTypeId = 10 LEFT OUTER JOIN
dbo.generalsettings AS g7 ON a1.CompanyId = g7.Companyid AND a1.OccupationId = g7.GId AND g7.GTypeId = 7

Tags:

Share Post
02 Dec 19 by Administrator 333
16 May 20 by Administrator 204
03 Jan 20 by Administrator 292 MS-SQL
ALTER TABLE Item ADD ILink varchar(3500)
ALTER TABLE Item ADD IDImages varchar(7000)
ALTER TABLE generalsettings ADD GLink varchar(3500)
GO
ALTER VIEW [dbo].[vItem]
AS
SELECT i1.ILink,i1.CompanyId, i1.ItemId, i1.PItemId, i1.TypeId, i1.ItemName, i1.ShortName, i1.RatePerUnit, i1.TotalOn, i1.ICategory1, i1.ICategory2, i1.ICategory3, i1.ICategory4, i1.ICategory5, i1.ExpireInDays, i1.SortOrder, i1.iLength, i1.iWidth,
i1.iHeight, i1.MeasureUnit, i1.UQty, i1.UUnit, i1.OQty, i1.OUnit, i1.ICategory, i1.IF1, i1.IF2, i1.IF3, i1.IF4, i1.IF5, i1.IF6, i1.VATPer, i1.VATIncl, i1.ItemNote, i2.ItemName AS PItemName, g0.GTitle AS IGType, g1.GTitle AS IC1Type,
g2.GTitle AS IC2Type, g3.GTitle AS IC3Type, g4.GTitle AS IC4Type, g5.GTitle AS IC5Type, i2.OQty AS POQty
, ISNULL((SELECT STUFF(( SELECT ',' + ImageDir + REPLACE(ImageFileName, ImageFileType, '--100' + ImageFileType) FROM FileManager WHERE CompanyId=0 AND ImageType=0 AND CHARINDEX(N',' + LTRIM(RTRIM(ImageId)) + ',', N',' + REPLACE(CAST(i1.IDImages AS nvarchar(max)),N' ',N'') + ',') > 0 FOR XML PATH('')), 1, 1, '') AS XYList), '../../img/aim.png') AS iIDImages
, ISNULL((SELECT STUFF(( SELECT ',' + ImageDir + REPLACE(ImageFileName, ImageFileType, '--100' + ImageFileType) FROM FileManager WHERE CompanyId=0 AND ImageType=0 AND CHARINDEX(N',' + LTRIM(RTRIM(ImageId)) + ',', N',' + REPLACE(CAST(i1.IImages AS nvarchar(max)),N' ',N'') + ',') > 0 FOR XML PATH('')), 1, 1, '') AS XYList), '../../img/aim.png') AS iIImages
FROM dbo.Item AS i1 LEFT OUTER JOIN
dbo.generalsettings AS g5 ON i1.CompanyId = g5.Companyid AND g5.GTypeId = 19 AND i1.ICategory5 = g5.GId LEFT OUTER JOIN
dbo.generalsettings AS g4 ON i1.CompanyId = g4.Companyid AND g4.GTypeId = 18 AND i1.ICategory4 = g4.GId LEFT OUTER JOIN
dbo.generalsettings AS g3 ON i1.CompanyId = g3.Companyid AND g3.GTypeId = 17 AND i1.ICategory3 = g3.GId LEFT OUTER JOIN
dbo.generalsettings AS g2 ON i1.CompanyId = g2.Companyid AND g2.GTypeId = 16 AND i1.ICategory2 = g2.GId LEFT OUTER JOIN
dbo.Item AS i2 ON i1.CompanyId = i2.CompanyId AND i1.PItemId = i2.ItemId LEFT OUTER JOIN
dbo.generalsettings AS g1 ON i1.CompanyId = g1.Companyid AND i1.ICategory1 = g1.GId AND g1.GTypeId = 15 LEFT OUTER JOIN
dbo.generalsettings AS g0 ON i1.CompanyId = g0.Companyid AND i1.TypeId = g0.GId AND g0.GTypeId = 14
GO
CREATE VIEW vgeneralsettings
AS
SELECT a.Companyid, a.GTypeId, a.GId, a.PGId, a.GTitle, a.GShort, a.Value1, a.Value2, a.Value3, a.GColor, a.GImages, a.FImages, a.GStatus, a.SortOrder, a.GLink, b.GTitle AS TGTitle, b.GShort AS TGShort
, ISNULL((SELECT STUFF(( SELECT ',' + ImageDir + REPLACE(ImageFileName, ImageFileType, '--100' + ImageFileType) FROM FileManager WHERE CompanyId=0 AND ImageType=0 AND CHARINDEX(N',' + LTRIM(RTRIM(ImageId)) + ',', N',' + REPLACE(CAST(a.GImages AS nvarchar(max)),N' ',N'') + ',') > 0 FOR XML PATH('')), 1, 1, '') AS XYList), '../../img/aim.png') AS iGImages
, ISNULL((SELECT STUFF(( SELECT ',' + ImageDir + REPLACE(ImageFileName, ImageFileType, '--100' + ImageFileType) FROM FileManager WHERE CompanyId=0 AND ImageType=0 AND CHARINDEX(N',' + LTRIM(RTRIM(ImageId)) + ',', N',' + REPLACE(CAST(a.FImages AS nvarchar(max)),N' ',N'') + ',') > 0 FOR XML PATH('')), 1, 1, '') AS XYList), '../../img/aim.png') AS iFImages
FROM dbo.generalsettings AS a INNER JOIN
dbo.generalsettings AS b ON a.Companyid = b.Companyid AND a.GTypeId = b.GId AND b.GTypeId = 0

Tags:

Share Post
MS-SQL 01 Jan 20 by Administrator 293
16 May 20 by Administrator 204
03 Jan 20 by Administrator 292 MS-SQL
CREATE VIEW vLinks AS
SELECT 0 AS srt, 'vposts2' AS tbl, PTypeId, PostId, PTitle, PLink FROM posts
UNION
SELECT 1 AS srt, 'vgeneralsettings' AS tbl, GTypeId, GId, GTitle, GLink FROM generalsettings
UNION
SELECT 2 AS srt, 'vAccount' AS tbl, AccountTypeId, AccountId, FName, ALink FROM Account
UNION
SELECT 3 AS srt, 'vItem' AS tbl, TypeId,ItemId, ItemName, ILink FROM Item

Tags:

Share Post
MS-SQL 03 Jan 20 by Administrator 293
16 May 20 by Administrator 204

fontawesome link address

19/09/2019 16:06:00 by Administrator 385
<script src="https://kit.fontawesome.com/d7979cec49.js" crossorigin="anonymous"></script>

Date format in repeater asp.net

02/09/2019 07:29:00 by Administrator 462
<%# DataBinder.Eval(Container.DataItem, "ActionListDate", "{0:d/M/yyyy hh:mm:ss tt}") %> <%# string.Format("{0:ddd MMM yyyy}", Eval("ActionListDate"))%>

reCaptcha Google

09/05/2020 17:51:00 by Administrator 195
https://www.google.com/u/2/recaptcha/admin/site/351527026/settings$("form").submit(function(event) { var recaptcha = $("#g-recaptcha-response").val(); if (recaptcha === "") { event.pr

favicon meta settings

03/10/2019 02:25:00 by Administrator 451
2019 standards thanks to faviconit I use faviconit.com for the best browser and device support possible. You upload an image and this site gives you the code, the converted images and

Bootsnav Menu New Implementation

07/01/2020 03:31:00 by Administrator 408
file:///G:/Downloads/bootsnav-master/index.html# This plugin like implementation is required in website. Try

MS SQL Query Important

01/11/2019 05:32:00 by Administrator 399
For multiuser envirment MS SQL slows down queries due to following reason Using subquery Using functions

Youtube Channel Custom Url Requirements

28/11/2019 02:18:00 by Administrator 366
Custom URL eligibility To create a custom URL for your channel, your account needs to: Have 100 or more subscribers Be at least 30 days old Have an uploaded photo as a channel icon Have uploa

facebook api for adhvik.online

23/09/2019 03:15:00 by 330
https://developers.facebook.com/docs/facebook-login/web && <script>window.fbAsyncInit = function() {FB.init({appId : '1208343976013791',cookie : true,xfbml : true,version : 'v4.0'});F

Creating a quick and dirty jQuery contentEditable Plugin

17/08/2019 03:38:00 by Administrator 454
Here is the link for Creating a quick and dirty jQuery contentEditable Plugin https://weblog.west-wind.com/posts/2009/May/25/Creating-a-quick-and-dirty-jQuery-contentEditable-Plugin

Country Flag api

by 1405
We can get country flag using following file apis https://www.countryflags.io/