public List <ClsCustomServiceDetails> GetCustomServiceDetails(Int64 ServiceID) { try { DBParameterCollection ObJParameterCOl = new DBParameterCollection(); DBParameter objDBParameter = new DBParameter("@ServiceID", ServiceID, DbType.Int64); ObJParameterCOl.Add(objDBParameter); DBHelper objDbHelper = new DBHelper(); DataSet ds = objDbHelper.ExecuteDataSet(Constant.GetCustomServiceDetails, ObJParameterCOl, CommandType.StoredProcedure); List <ClsCustomServiceDetails> objService = new List <ClsCustomServiceDetails>(); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { IList <ClsCustomServiceDetails> List = ds.Tables[0].AsEnumerable().Select(Row => new ClsCustomServiceDetails { Ref_Service_ID = Row.Field <Int64>("Ref_Service_ID"), CategoryName = Row.Field <string>("CategoryName"), ServiceTitle = Row.Field <string>("ServiceTitle"), Description = Row.Field <string>("Description"), Revision = Row.Field <int>("Revision"), Price = Row.Field <decimal>("Price"), PriceWithProjectFiles = Row.Field <decimal>("PriceWithProjectFiles"), FAQList = ds.Tables[1].AsEnumerable().Select(Row1 => new ClsFAQList { Questions = Row1.Field <string>("Question"), Answer = Row1.Field <string>("Answer") }).ToList(), FileManager = ds.Tables[2].AsEnumerable().Select(Row2 => new ClsFileManager { FileManagerID = Row2.Field <Int64>("Ref_FileManager_ID"), FileIdentifier = Row2.Field <string>("FileIdentifier"), FileName = Row2.Field <string>("FileName"), FilePath = Row2.Field <string>("FilePath"), FileExtension = Row2.Field <string>("FileExtension"), FileSize = Row2.Field <Int64>("FileSize"), FileType = Row2.Field <string>("FileType"), Sequence = Row2.Field <int>("Sequence"), }).ToList(), }).ToList(); objService.AddRange(List); } } return(objService); } catch (Exception ex) { throw ex; } }
public List <ClsTicketDetails> GetUserTicketList(Int64 UserID = 0, int StartCount = 0, int EndCount = 0) { try { DBParameterCollection ObJParameterCOl = new DBParameterCollection(); DBParameter objDBParameter = new DBParameter("@UserID", UserID, DbType.Int64); ObJParameterCOl.Add(objDBParameter); objDBParameter = new DBParameter("@StartCount", StartCount, DbType.Int32); ObJParameterCOl.Add(objDBParameter); objDBParameter = new DBParameter("@EndCount", EndCount, DbType.Int32); ObJParameterCOl.Add(objDBParameter); DBHelper objDbHelper = new DBHelper(); DataSet ds = objDbHelper.ExecuteDataSet(Constant.GetUserTicketList, ObJParameterCOl, CommandType.StoredProcedure); List <ClsTicketDetails> objUserDetails = new List <ClsTicketDetails>(); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { objUserDetails = ds.Tables[0].AsEnumerable().Select(Row => new ClsTicketDetails { Ref_Ticket_ID = Row.Field <Int64>("Ref_User_ID"), Ref_TicketType_ID = Row.Field <Int64>("Ref_TicketType_ID"), Ref_User_ID = Row.Field <Int64>("Ref_User_ID"), Subject = Row.Field <string>("Subject"), Description = Row.Field <string>("Description"), FileManager = ds.Tables[1].AsEnumerable().Select(Row2 => new ClsFileManager { FileManagerID = Row2.Field <Int64>("Ref_FileManager_ID"), FileIdentifier = Row2.Field <string>("FileIdentifier"), FileName = Row2.Field <string>("FileName"), FilePath = Row2.Field <string>("FilePath"), FileExtension = Row2.Field <string>("FileExtension"), FileSize = Row2.Field <Int64>("FileSize"), FileType = Row2.Field <string>("FileType"), Sequence = Row2.Field <int>("Sequence"), }).ToList(), }).ToList(); } } return(objUserDetails); } catch (Exception ex) { throw ex; } }
//====================== private void LoadData() { DataTable dt1 = dbClass.Execute_Proc("dbo.GetTags"); foreach (DataRow Row1 in dt1.Rows) { Tag tag = new Tag ( Row1.Field <int?>("TagID"), Row1.Field <int?>("ParentCategoryID"), Row1.Field <string>("Name"), Row1.Field <string>("ColorID"), Row1.Field <bool?>("IsUserCreated"), Row1.Field <bool?>("IsFeelingGoodBad") ); if (tag.ParentCategoryID == null) { TagViewModel.CategoryTagList.Add(tag); } else { TagViewModel.SubcategoryTagList.Add(tag); } } DataTable dt2 = dbClass.Execute_Proc("dbo.GetFoodEntrys"); foreach (DataRow Row2 in dt2.Rows) { FoodEntry foodEntry = new FoodEntry ( Row2.Field <int?>("FoodEntryId"), Row2.Field <string>("Picture"), Row2.Field <DateTime>("DateTime"), Row2.Field <string>("Description"), Row2.Field <bool?>("IsFeelingGoodBad") ); DataTable dt3 = dbClass.GetFoodEntry_Tags("dbo.GetFoodEntry_Tags", (int)foodEntry.FoodEntryID); foreach (DataRow Row3 in dt3.Rows) { int TagID = Row3.Field <int>("TagID"); Tag foundTag = TagViewModel.SubcategoryTagList.Where(tag => TagID == tag.TagID).FirstOrDefault(); foodEntry.FoodEntry_TagList.Add(foundTag); } EntryViewModel.FoodEntryList.Add(foodEntry); } }
public List <ClsTrackAndBeatDetails> GetTrackAndBeatDetails(Int64 UserID, Int64 TrackID) { try { DBParameterCollection ObJParameterCOl = new DBParameterCollection(); DBParameter objDBParameter = new DBParameter("@UserID", UserID, DbType.Int64); ObJParameterCOl.Add(objDBParameter); objDBParameter = new DBParameter("@TrackID", TrackID, DbType.Int64); ObJParameterCOl.Add(objDBParameter); DBHelper objDbHelper = new DBHelper(); DataSet Ds = objDbHelper.ExecuteDataSet(Constant.GetTrackAndBeatDetails, ObJParameterCOl, CommandType.StoredProcedure); List <ClsTrackAndBeatDetails> objTrackAndBeatDetails = new List <ClsTrackAndBeatDetails>(); if (Ds != null) { if (Ds.Tables.Count > 0) { if (Ds.Tables[0].Rows.Count > 0) { IList <ClsTrackAndBeatDetails> List = Ds.Tables[0].AsEnumerable().Select(Row => new ClsTrackAndBeatDetails { Ref_Track_ID = Row.Field <Int64>("Ref_Track_ID"), CategoryName = Row.Field <string>("CategoryName"), TrackName = Row.Field <string>("TrackName"), TrackType = Row.Field <string>("TrackType"), Bio = Row.Field <string>("Bio"), Mood = Row.Field <string>("Mood"), Key = Row.Field <string>("TrackKey"), Tag = Row.Field <string>("Tag"), Duration = Row.Field <string>("Duration"), Price = Row.Field <decimal>("Price"), PriceWithProjectFiles = Row.Field <decimal>("PriceWithProjectFiles"), BMP = Row.Field <int>("BMP"), DAW = Row.Field <string>("DAW"), IsVocals = Row.Field <string>("IsVocals"), IsTrack = Row.Field <string>("IsTrack"), Favourite = Row.Field <string>("Favourite"), SoldOut = Row.Field <string>("SoldOut"), FileManager = Ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("ModuleID") == Row.Field <Int64>("Ref_Track_ID")).Select(Row1 => new ClsFileManager { FileManagerID = Row1.Field <Int64>("Ref_FileManager_ID"), FileIdentifier = Row1.Field <string>("FileIdentifier"), FileName = Row1.Field <string>("FileName"), FilePath = Row1.Field <string>("FilePath"), FileExtension = Row1.Field <string>("FileExtension"), FileSize = Row1.Field <Int64>("FileSize"), FileType = Row1.Field <string>("FileType"), Sequence = Row1.Field <int>("Sequence"), }).ToList(), RelatedTrack = Ds.Tables[2].AsEnumerable().Select(Row2 => new ClsRelatedTrackList { Ref_Track_ID = Row2.Field <Int64>("Ref_Track_ID"), CategoryName = Row2.Field <string>("CategoryName"), TrackName = Row2.Field <string>("TrackName"), Bio = Row2.Field <string>("Bio"), Price = Row2.Field <decimal>("Price"), IsTrack = Row2.Field <string>("IsTrack"), PlayUrl = Row2.Field <string>("PlayUrl"), Favourite = Row2.Field <string>("Favourite"), SoldOut = Row2.Field <string>("SoldOut"), ThumbnailImageUrl = Row2.Field <string>("Thumbnail"), }).ToList(), }).ToList(); objTrackAndBeatDetails.AddRange(List); } } } return(objTrackAndBeatDetails); } catch (Exception ex) { throw ex; } }
public List <ClsServiceDetails> GetServiceDetails(Int64 Ref_Service_ID, string AliasName) { try { DBParameterCollection ObJParameterCOl = new DBParameterCollection(); DBParameter objDBParameter = new DBParameter("@Ref_Service_ID", Ref_Service_ID, DbType.Int64); ObJParameterCOl.Add(objDBParameter); objDBParameter = new DBParameter("@AliasName", AliasName, DbType.String); ObJParameterCOl.Add(objDBParameter); DBHelper objDbHelper = new DBHelper(); DataSet ds = objDbHelper.ExecuteDataSet(Constant.GetServiceDetails, ObJParameterCOl, CommandType.StoredProcedure); List <ClsServiceDetails> objServiceList = new List <ClsServiceDetails>(); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { objServiceList = ds.Tables[0].AsEnumerable().Select(Row => new ClsServiceDetails { Ref_Service_ID = Row.Field <Int64>("Ref_Service_ID"), Ref_Category_ID = Row.Field <Int64>("Ref_Category_ID"), ServiceTitle = Row.Field <string>("ServiceTitle"), AliasName = Row.Field <string>("AliasName"), Description = Row.Field <string>("Description"), Price = Row.Field <decimal>("Price"), PriceWithProjectFiles = Row.Field <decimal>("PriceWithProjectFiles"), Revision = Row.Field <int>("Revision"), DeliveryDate = Row.Field <string>("DeliveryDate"), IsActive = Row.Field <Boolean>("IsActive"), IsDeleted = Row.Field <Boolean>("IsDeleted"), CreatedBy = Row.Field <Int64>("CreatedBy"), CreatedName = Row.Field <string>("CreatedName"), CreatedDateTime = Row.Field <DateTime?>("CreatedDateTime"), MetaTitle = Row.Field <string>("MetaTitle"), MetaKeywords = Row.Field <string>("MetaKeywords"), MetaDescription = Row.Field <string>("MetaDescription"), FAQDetails = ds.Tables[1].AsEnumerable().Where(x => x.Field <Int64>("Ref_Service_ID") == Row.Field <Int64>("Ref_Service_ID")).Select(Row1 => new ClsFAQDetails { Ref_Service_ID = Row1.Field <Int64>("Ref_Service_ID"), Questions = Row1.Field <string>("Question"), Answer = Row1.Field <string>("Answer") }).ToList(), FileManager = ds.Tables[2].AsEnumerable().Where(x => x.Field <Int64>("ModuleID") == Row.Field <Int64>("Ref_Service_ID")).Select(Row2 => new ClsFileManager { FileManagerID = Row2.Field <Int64>("Ref_FileManager_ID"), FileIdentifier = Row2.Field <string>("FileIdentifier"), FileName = Row2.Field <string>("FileName"), FilePath = Row2.Field <string>("FilePath"), FileExtension = Row2.Field <string>("FileExtension"), FileSize = Row2.Field <Int64>("FileSize"), FileType = Row2.Field <string>("FileType"), Sequence = Row2.Field <int>("Sequence"), }).ToList(), }).ToList(); } } return(objServiceList); } catch (Exception ex) { throw ex; } }
public List <ClsUserDetails> SignIn(ClsUserSignIn ObjUser) { try { DBParameterCollection ObJParameterCOl = new DBParameterCollection(); DBParameter objDBParameter = new DBParameter("@UserCode", ObjUser.User_Code, DbType.String); ObJParameterCOl.Add(objDBParameter); objDBParameter = new DBParameter("@password", ObjUser.Password, DbType.String); ObJParameterCOl.Add(objDBParameter); objDBParameter = new DBParameter("@IsSocialLogin", ObjUser.IsSocialLogin, DbType.Boolean); ObJParameterCOl.Add(objDBParameter); DBHelper objDbHelper = new DBHelper(); DataSet ds = objDbHelper.ExecuteDataSet(Constant.SignIn, ObJParameterCOl, CommandType.StoredProcedure); List <ClsUserDetails> objUserDetails = new List <ClsUserDetails>(); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { objUserDetails = ds.Tables[0].AsEnumerable().Select(Row => new ClsUserDetails { Ref_User_ID = Row.Field <Int64>("Ref_User_ID"), UserCode = Row.Field <string>("UserCode"), FullName = Row.Field <string>("FullName"), EmailID = Row.Field <string>("EmailID"), MobileNumber = Row.Field <string>("MobileNumber"), Bio = Row.Field <string>("Bio"), Gender = Row.Field <string>("Gender"), StudioGears = Row.Field <string>("StudioGears"), PayPalEmailID = Row.Field <string>("PayPalEmailID"), SocialProfileUrl = Row.Field <string>("SocialProfileUrl"), Response = Row.Field <string>("Response"), FileManager = ds.Tables[1].AsEnumerable().Select(Row2 => new ClsFileManager { FileManagerID = Row2.Field <Int64>("Ref_FileManager_ID"), FileIdentifier = Row2.Field <string>("FileIdentifier"), FileName = Row2.Field <string>("FileName"), FilePath = Row2.Field <string>("FilePath"), FileExtension = Row2.Field <string>("FileExtension"), FileSize = Row2.Field <Int64>("FileSize"), FileType = Row2.Field <string>("FileType"), Sequence = Row2.Field <int>("Sequence"), }).ToList(), UserMaster = ds.Tables[2].AsEnumerable().Select(Row2 => new ClsUserMasterMapping { MasterName = Row2.Field <string>("MasterName"), MasterDataName = Row2.Field <string>("MasterDataName"), }).ToList(), }).ToList(); } } return(objUserDetails); } catch (Exception ex) { throw ex; } }