public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.mid) { hashcode = (hashcode * 397) + Mid.GetHashCode(); } if (__isset.displayName) { hashcode = (hashcode * 397) + DisplayName.GetHashCode(); } if (__isset.pictureStatus) { hashcode = (hashcode * 397) + PictureStatus.GetHashCode(); } if (__isset.picturePath) { hashcode = (hashcode * 397) + PicturePath.GetHashCode(); } if (__isset.statusMessage) { hashcode = (hashcode * 397) + StatusMessage.GetHashCode(); } } return(hashcode); }
public void Picture_Convert_StringStatus_To_Enum_PictureStatus() { string dead = "Dead"; PictureStatus deadPictureStatus = Picture.ConvertStringStatusToEnumStatus(dead); Assert.AreEqual(PictureStatus.Dead, deadPictureStatus); }
public override string ToString() { var sb = new StringBuilder("SimpleChannelContact("); bool __first = true; if (Mid != null && __isset.mid) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Mid: "); Mid.ToString(sb); } if (DisplayName != null && __isset.displayName) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("DisplayName: "); DisplayName.ToString(sb); } if (PictureStatus != null && __isset.pictureStatus) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PictureStatus: "); PictureStatus.ToString(sb); } if (PicturePath != null && __isset.picturePath) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PicturePath: "); PicturePath.ToString(sb); } if (StatusMessage != null && __isset.statusMessage) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("StatusMessage: "); StatusMessage.ToString(sb); } sb.Append(")"); return(sb.ToString()); }
public Picture(int pictureId, DateTime name, string comment, PictureStatus status, string pictureLink, int tray) { PictureId = pictureId; Name = name; Comment = comment; Status = status; PictureLink = pictureLink; TrayNumber = tray; }
public void PictureStatus_Does_Have_All_Statuses() { PictureStatus pictureStatus = PictureStatus.Dead; pictureStatus = PictureStatus.ExceptionalGrowth; pictureStatus = PictureStatus.NoGrowth; pictureStatus = PictureStatus.NormalGrowth; pictureStatus = PictureStatus.SomeGrowth; Assert.IsNotNull(pictureStatus); }
private void PictureStatus_ComboBox_Populate(Order Ord) { PictureStatus_ComboBox.Items.Clear(); for (ePictureStatus T = ePictureStatus.ePS_MIN + 1; T < ePictureStatus.ePS_MAX; T++) { PictureStatus_ComboBox.Items.Add(PictureStatus.ePS_ToString(T)); if (PictureStatus.ePS_ToString(T) == Ord.GetPictureStatus()) { PictureStatus_ComboBox.SelectedIndex = (int)T - 1; } } }
public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.id) { hashcode = (hashcode * 397) + Id.GetHashCode(); } if (__isset.createdTime) { hashcode = (hashcode * 397) + CreatedTime.GetHashCode(); } if (__isset.name) { hashcode = (hashcode * 397) + Name.GetHashCode(); } if (__isset.pictureStatus) { hashcode = (hashcode * 397) + PictureStatus.GetHashCode(); } if (__isset.preventedJoinByTicket) { hashcode = (hashcode * 397) + PreventedJoinByTicket.GetHashCode(); } if (__isset.groupPreference) { hashcode = (hashcode * 397) + GroupPreference.GetHashCode(); } if (__isset.members) { hashcode = (hashcode * 397) + TCollections.GetHashCode(Members); } if (__isset.creator) { hashcode = (hashcode * 397) + Creator.GetHashCode(); } if (__isset.invitee) { hashcode = (hashcode * 397) + TCollections.GetHashCode(Invitee); } if (__isset.notificationDisabled) { hashcode = (hashcode * 397) + NotificationDisabled.GetHashCode(); } } return(hashcode); }
public List <Picture> GetAllPicturesFromDayId(int dayId) { List <Picture> pictures = new List <Picture>(); using (SqlConnection con = new SqlConnection(ConnectionString)) { try { con.Open(); SqlCommand cmd = new SqlCommand("sp_GetAllPicturesFromDayId", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("@DayId", dayId)); SqlDataReader read = cmd.ExecuteReader(); if (read.HasRows) { while (read.Read()) { string pId = read["PicId"].ToString(); int picId = int.Parse(pId); string dat = read["Date"].ToString(); DateTime date = DateTime.Parse(dat); string comment = read["Comment"].ToString(); string stat = Picture.ConvertStatusFromDkToEng(read["Status"].ToString()); PictureStatus status = Picture.ConvertStringStatusToEnumStatus(stat); string pictureLink = read["PictureLink"].ToString(); string traNr = read["TrayNr"].ToString(); int trayNr = int.Parse(traNr); Picture picture = new Picture(picId, date, comment, status, pictureLink, trayNr); pictures.Add(picture); } } return(pictures); } catch (SqlException ex) { throw new Exception(ex.Message); } } }
public NewPicturesRepo GetPicturesWithNoCommentAndStatus() { NewPicturesRepo savedPictureRepo = new NewPicturesRepo(); using (SqlConnection con = new SqlConnection(ConnectionString)) { try { con.Open(); SqlCommand cmd = new SqlCommand("sp_FindPictureWithNoCommentAndStatus", con); cmd.CommandType = CommandType.StoredProcedure; SqlDataReader read = cmd.ExecuteReader(); if (read.HasRows) { while (read.Read()) { string pictureNumber = read["PicId"].ToString(); int picNumber = int.Parse(pictureNumber); string name = read["Date"].ToString(); DateTime date = DateTime.Parse(name); date.ToString("dd/MM/yyyy HH:mm"); string comment = read["Comment"].ToString(); PictureStatus status = Picture.ConvertStringStatusToEnumStatus(read["Status"].ToString()); string pictureLink = read["PictureLink"].ToString(); string tray = read["TrayNr"].ToString(); int trayNr = int.Parse(tray); Picture pic = new Picture(picNumber, date, comment, status, pictureLink, trayNr); savedPictureRepo.AddItem(pic); } } return(savedPictureRepo); } catch (SqlException ex) { throw new Exception(ex.Message); } } }
public async Task <bool> UpdateStatusByArticleIdAsync(ArticlePictureModifyRequest request, PictureStatus pictureStatus) { await(from articlePicture in _articlePictureRepository.Get(x => x.ArticleId == request.ArticleId) join picture in _pictureRepository.Table on articlePicture.PictureId equals picture.Id select picture) .Set(x => x.StatusId, pictureStatus.GetCode()) .Set(x => x.UpdatedById, request.UpdatedById) .Set(x => x.UpdatedDate, DateTimeOffset.UtcNow) .UpdateAsync(); return(true); }
public override string ToString() { var sb = new StringBuilder("BuddySearchResult("); bool __first = true; if (Mid != null && __isset.mid) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Mid: "); Mid.ToString(sb); } if (DisplayName != null && __isset.displayName) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("DisplayName: "); DisplayName.ToString(sb); } if (PictureStatus != null && __isset.pictureStatus) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PictureStatus: "); PictureStatus.ToString(sb); } if (PicturePath != null && __isset.picturePath) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PicturePath: "); PicturePath.ToString(sb); } if (StatusMessage != null && __isset.statusMessage) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("StatusMessage: "); StatusMessage.ToString(sb); } if (__isset.businessAccount) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("BusinessAccount: "); BusinessAccount.ToString(sb); } sb.Append(")"); return(sb.ToString()); }
public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.mid) { hashcode = (hashcode * 397) + Mid.GetHashCode(); } if (__isset.createdTime) { hashcode = (hashcode * 397) + CreatedTime.GetHashCode(); } if (__isset.type) { hashcode = (hashcode * 397) + Type.GetHashCode(); } if (__isset.status) { hashcode = (hashcode * 397) + Status.GetHashCode(); } if (__isset.relation) { hashcode = (hashcode * 397) + Relation.GetHashCode(); } if (__isset.displayName) { hashcode = (hashcode * 397) + DisplayName.GetHashCode(); } if (__isset.phoneticName) { hashcode = (hashcode * 397) + PhoneticName.GetHashCode(); } if (__isset.pictureStatus) { hashcode = (hashcode * 397) + PictureStatus.GetHashCode(); } if (__isset.thumbnailUrl) { hashcode = (hashcode * 397) + ThumbnailUrl.GetHashCode(); } if (__isset.statusMessage) { hashcode = (hashcode * 397) + StatusMessage.GetHashCode(); } if (__isset.displayNameOverridden) { hashcode = (hashcode * 397) + DisplayNameOverridden.GetHashCode(); } if (__isset.favoriteTime) { hashcode = (hashcode * 397) + FavoriteTime.GetHashCode(); } if (__isset.capableVoiceCall) { hashcode = (hashcode * 397) + CapableVoiceCall.GetHashCode(); } if (__isset.capableVideoCall) { hashcode = (hashcode * 397) + CapableVideoCall.GetHashCode(); } if (__isset.capableMyhome) { hashcode = (hashcode * 397) + CapableMyhome.GetHashCode(); } if (__isset.capableBuddy) { hashcode = (hashcode * 397) + CapableBuddy.GetHashCode(); } if (__isset.attributes) { hashcode = (hashcode * 397) + Attributes.GetHashCode(); } if (__isset.settings) { hashcode = (hashcode * 397) + Settings.GetHashCode(); } if (__isset.picturePath) { hashcode = (hashcode * 397) + PicturePath.GetHashCode(); } if (__isset.recommendParams) { hashcode = (hashcode * 397) + RecommendParams.GetHashCode(); } if (__isset.friendRequestStatus) { hashcode = (hashcode * 397) + FriendRequestStatus.GetHashCode(); } if (__isset.musicProfile) { hashcode = (hashcode * 397) + MusicProfile.GetHashCode(); } if (__isset.videoProfile) { hashcode = (hashcode * 397) + VideoProfile.GetHashCode(); } } return(hashcode); }
public override int GetHashCode() { int hashcode = 157; unchecked { if (__isset.mid) { hashcode = (hashcode * 397) + Mid.GetHashCode(); } if (__isset.userid) { hashcode = (hashcode * 397) + Userid.GetHashCode(); } if (__isset.phone) { hashcode = (hashcode * 397) + Phone.GetHashCode(); } if (__isset.email) { hashcode = (hashcode * 397) + Email.GetHashCode(); } if (__isset.regionCode) { hashcode = (hashcode * 397) + RegionCode.GetHashCode(); } if (__isset.displayName) { hashcode = (hashcode * 397) + DisplayName.GetHashCode(); } if (__isset.phoneticName) { hashcode = (hashcode * 397) + PhoneticName.GetHashCode(); } if (__isset.pictureStatus) { hashcode = (hashcode * 397) + PictureStatus.GetHashCode(); } if (__isset.thumbnailUrl) { hashcode = (hashcode * 397) + ThumbnailUrl.GetHashCode(); } if (__isset.statusMessage) { hashcode = (hashcode * 397) + StatusMessage.GetHashCode(); } if (__isset.allowSearchByUserid) { hashcode = (hashcode * 397) + AllowSearchByUserid.GetHashCode(); } if (__isset.allowSearchByEmail) { hashcode = (hashcode * 397) + AllowSearchByEmail.GetHashCode(); } if (__isset.picturePath) { hashcode = (hashcode * 397) + PicturePath.GetHashCode(); } if (__isset.musicProfile) { hashcode = (hashcode * 397) + MusicProfile.GetHashCode(); } if (__isset.videoProfile) { hashcode = (hashcode * 397) + VideoProfile.GetHashCode(); } } return(hashcode); }
public async Task <bool> UpdateStatusByProductIdsAsync(IEnumerable <long> ids, long updatedById, PictureStatus status) { await(from productPicture in _productPictureRepository.Get(x => x.ProductId.In(ids)) join picture in _pictureRepository.Table on productPicture.PictureId equals picture.Id select picture) .Set(x => x.StatusId, status.GetCode()) .Set(x => x.UpdatedById, updatedById) .Set(x => x.UpdatedDate, DateTimeOffset.UtcNow) .UpdateAsync(); return(true); }
public override string ToString() { var sb = new StringBuilder("Group("); bool __first = true; if (Id != null && __isset.id) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Id: "); Id.ToString(sb); } if (__isset.createdTime) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CreatedTime: "); CreatedTime.ToString(sb); } if (Name != null && __isset.name) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Name: "); Name.ToString(sb); } if (PictureStatus != null && __isset.pictureStatus) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PictureStatus: "); PictureStatus.ToString(sb); } if (__isset.preventedJoinByTicket) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PreventedJoinByTicket: "); PreventedJoinByTicket.ToString(sb); } if (GroupPreference != null && __isset.groupPreference) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("GroupPreference: "); GroupPreference.ToString(sb); } if (Members != null && __isset.members) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Members: "); Members.ToString(sb); } if (Creator != null && __isset.creator) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Creator: "); Creator.ToString(sb); } if (Invitee != null && __isset.invitee) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Invitee: "); Invitee.ToString(sb); } if (__isset.notificationDisabled) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("NotificationDisabled: "); NotificationDisabled.ToString(sb); } sb.Append(")"); return(sb.ToString()); }
public override string ToString() { var sb = new StringBuilder("Contact("); bool __first = true; if (Mid != null && __isset.mid) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Mid: "); Mid.ToString(sb); } if (__isset.createdTime) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CreatedTime: "); CreatedTime.ToString(sb); } if (__isset.type) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Type: "); Type.ToString(sb); } if (__isset.status) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Status: "); Status.ToString(sb); } if (__isset.relation) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Relation: "); Relation.ToString(sb); } if (DisplayName != null && __isset.displayName) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("DisplayName: "); DisplayName.ToString(sb); } if (PhoneticName != null && __isset.phoneticName) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PhoneticName: "); PhoneticName.ToString(sb); } if (PictureStatus != null && __isset.pictureStatus) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PictureStatus: "); PictureStatus.ToString(sb); } if (ThumbnailUrl != null && __isset.thumbnailUrl) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("ThumbnailUrl: "); ThumbnailUrl.ToString(sb); } if (StatusMessage != null && __isset.statusMessage) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("StatusMessage: "); StatusMessage.ToString(sb); } if (DisplayNameOverridden != null && __isset.displayNameOverridden) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("DisplayNameOverridden: "); DisplayNameOverridden.ToString(sb); } if (__isset.favoriteTime) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("FavoriteTime: "); FavoriteTime.ToString(sb); } if (__isset.capableVoiceCall) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CapableVoiceCall: "); CapableVoiceCall.ToString(sb); } if (__isset.capableVideoCall) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CapableVideoCall: "); CapableVideoCall.ToString(sb); } if (__isset.capableMyhome) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CapableMyhome: "); CapableMyhome.ToString(sb); } if (__isset.capableBuddy) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("CapableBuddy: "); CapableBuddy.ToString(sb); } if (__isset.attributes) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Attributes: "); Attributes.ToString(sb); } if (__isset.settings) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Settings: "); Settings.ToString(sb); } if (PicturePath != null && __isset.picturePath) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PicturePath: "); PicturePath.ToString(sb); } if (RecommendParams != null && __isset.recommendParams) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("RecommendParams: "); RecommendParams.ToString(sb); } if (__isset.friendRequestStatus) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("FriendRequestStatus: "); FriendRequestStatus.ToString(sb); } if (MusicProfile != null && __isset.musicProfile) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("MusicProfile: "); MusicProfile.ToString(sb); } if (VideoProfile != null && __isset.videoProfile) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("VideoProfile: "); VideoProfile.ToString(sb); } sb.Append(")"); return(sb.ToString()); }
public override string ToString() { var sb = new StringBuilder("Profile("); bool __first = true; if (Mid != null && __isset.mid) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Mid: "); Mid.ToString(sb); } if (Userid != null && __isset.userid) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Userid: "); Userid.ToString(sb); } if (Phone != null && __isset.phone) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Phone: "); Phone.ToString(sb); } if (Email != null && __isset.email) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Email: "); Email.ToString(sb); } if (RegionCode != null && __isset.regionCode) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("RegionCode: "); RegionCode.ToString(sb); } if (DisplayName != null && __isset.displayName) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("DisplayName: "); DisplayName.ToString(sb); } if (PhoneticName != null && __isset.phoneticName) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PhoneticName: "); PhoneticName.ToString(sb); } if (PictureStatus != null && __isset.pictureStatus) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PictureStatus: "); PictureStatus.ToString(sb); } if (ThumbnailUrl != null && __isset.thumbnailUrl) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("ThumbnailUrl: "); ThumbnailUrl.ToString(sb); } if (StatusMessage != null && __isset.statusMessage) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("StatusMessage: "); StatusMessage.ToString(sb); } if (__isset.allowSearchByUserid) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("AllowSearchByUserid: "); AllowSearchByUserid.ToString(sb); } if (__isset.allowSearchByEmail) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("AllowSearchByEmail: "); AllowSearchByEmail.ToString(sb); } if (PicturePath != null && __isset.picturePath) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("PicturePath: "); PicturePath.ToString(sb); } if (MusicProfile != null && __isset.musicProfile) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("MusicProfile: "); MusicProfile.ToString(sb); } if (VideoProfile != null && __isset.videoProfile) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("VideoProfile: "); VideoProfile.ToString(sb); } sb.Append(")"); return(sb.ToString()); }