public MainViewModel(IOrderController orderController , IDialogService dialogService , IUserDialogs userArcDialogs , ISellerAuthService loginService , ISellerOrderService sellerOrderService) { this._orderController = orderController; this._loginService = loginService; this._sellerOrderService = sellerOrderService; this._dialogService = dialogService; this._userArcDialogs = userArcDialogs; _userArcDialogs.Loading("Загрузка").Hide(); this.OpenNexStackOrder += HomeViewModel_OpenNexStackOrder; this._sellerOrderService.OnNewPayedOrder += _sellerOrderService_OnNewPayedOrder; IsDelayFive = new NC <bool>(false, (e) => { if (e) { var timeOrder = TimeSpan.Parse(this._sendOrder.Time); this._sendOrder.Time = timeOrder.Add(TimeSpan.FromMinutes(5)).ToString(); } else { var timeOrder = TimeSpan.Parse(this._sendOrder.Time); this._sendOrder.Time = timeOrder.Add(TimeSpan.FromMinutes(-5)).ToString(); } }); }
private void NC__Click(object sender, EventArgs e) { NC frm = new NC(); frm.Show(); this.Hide(); }
// Use this for initialization void Start() { self = this; prefabPos = notifPrefab.transform.position; prefabPos.x -= 100f; StartCoroutine(update()); }
public async Task <Unit> Handle(Command request, CancellationToken cancellationToken) { var nc = new NC { Id = request.Id, NCStatement = request.NCStatement, RequirementClauseNo = request.RequirementClauseNo, RequirementDoc = request.RequirementDoc, ObjEvidence = request.ObjEvidence, Justify = request.Justify, DocRevDate = request.DocRevDate, DocRevNo = request.DocRevNo, DocReference = request.DocReference }; _context.NCs.Add(nc); var success = await _context.SaveChangesAsync() > 0; if (success) { return(Unit.Value); } throw new Exception("Problem saving changes"); }
void OnTriggerEnter(Collider col) { if (col.gameObject.name == "char") { NC.push(item.icon, item.count + "x " + item.name); StartCoroutine(GManager.inventory.addItem(item)); GameObject t = this.gameObject; Pos at = GManager.pickups.Where(pickup => pickup.myTile == t).First(); GManager.pickups.Remove(at); Destroy(this.gameObject); } }
public NC.Data.AccountUser AutoRegisterWhileCreatingPost(NC.Models.AccountUserModel accountUser) { //create an account user with given info PopulateAccountUser(accountUser); accountUser.GenerateActivationCode(); accountUser.GeneratePassword(); var dataAccountUser = Mapper.Map<NC.Data.AccountUser>(accountUser); accountUser = Mapper.Map<NC.Models.AccountUserModel>(_accountUserRepository.RegisterAccountUser(dataAccountUser)); var mailMessage = accountUser.GetAutoUserCreationMessage(); var email = new Email(mailMessage); email.Send(); return accountUser; }
public override string ToString() { return(NV.ToString() + NR.ToString() + NC.ToString() + NL.ToString() + N_BPT.ToString() + N_UPT.ToString() + NOA.ToString() + NT.ToString() + NIOA.ToString() + NTR.ToString()); }
public static void SaveHistory() { try { XmlDocument History = NameChange.CreateChangeset(); foreach (NameChange NC in NameChange.Applied) { NC.AddToChangeset(History); } string HistoryFolder = Path.GetDirectoryName(NameChange.HistoryFileName); if (!Directory.Exists(HistoryFolder)) { Directory.CreateDirectory(HistoryFolder); } History.Save(NameChange.HistoryFileName); } catch (Exception E) { MessageBox.Show(String.Format(I18N.GetText("Message:HistorySaveError"), E.Message), I18N.GetText("Title:HistorySaveError"), MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void CheckNC(string textStream) { string[] entries = textStream.Split(new char[] { '\n' }, System.StringSplitOptions.RemoveEmptyEntries); NCAchieveList = new NC[entries.Length]; for (int i = 0; i < entries.Length; i++) { string[] entryInfo = entries [i].Split(new char[] { '|' }); string username = entryInfo [0]; int noCollisions = int.Parse(entryInfo [1]); NCAchieveList [i] = new NC(username, noCollisions); if (PlayerPrefs.GetString("Username") + ncoll == NCAchieveList [i].username) { Debug.Log("Got User"); gotUserNC = true; if (NCAchieveList [i].noCollisions == 1) { Color c = collision.color; c.a = 1f; collision.color = c; Debug.Log("Worked NC"); } else { Color c = collision.color; c.a = 0.5f; collision.color = c; Debug.Log("Not Worked NC"); } } else if (gotUserNC == false) { Color c = collision.color; c.a = 0.5f; collision.color = c; } } }
public NC.Models.AccountUserModel PopulateAccountUser(NC.Models.AccountUserModel accountUser) { accountUser.FirstName = accountUser.FirstName ?? ""; accountUser.MiddleName = accountUser.FirstName == null ? "" : accountUser.MiddleName; accountUser.LastName = accountUser.LastName ?? ""; accountUser.Sex = accountUser.Sex ?? ""; accountUser.DOB = NcConstants.DefaultDOB; return accountUser; }
public ActionResult UpdateResetPassword(NC.Data.AccountUser users) { if (ModelState.IsValid) { var iduser = (int)TempData["userdata"]; // string cpass = Request["cresetpass"]; var match = passwordcheck(users.Password); if (match && _accountUserRepository.ResetPasswordByAccountUserId(users.Password, iduser)) { TempData["ResetSuccess"] = NcMessage.ResetSucceed; return RedirectToAction("AutoLogin", new { userid = iduser }); //return View("UpdateResetPassword"); } else ViewBag.Notmatch = NcMessage.InvalidPassword; } return View("ResetPassword"); }
public ActionResult RegisterUserAccount(NC.Data.AccountUser accountUser) { return View("Index"); }
public ActionResult RegisterAccount(NC.Models.AccountUserModel accountUser) { accountUser = PopulateAccountUser(accountUser); accountUser.AddressId = NcConstants.DefaultAddressId; if (ModelState.IsValid) { if (_accountUserRepository.IsDuplicateEmail(accountUser.Email)) { ViewBag.Error = NcMessage.EmailAlreadyExists; } //To do: Check for valid email id //else if (is valid email) //{ //} //To do: Check for valid password rule //else if (follows password rule) //{ //} else { accountUser.GenerateActivationCode(); var dataAccountUser = Mapper.Map<NC.Data.AccountUser>(accountUser); var user = Mapper.Map<NC.Models.AccountUserModel>(_accountUserRepository.RegisterAccountUser(dataAccountUser)); var mailMessage = user.GetUserActivationMessage(); var email = new Email(mailMessage); email.Send(); ViewBag.SuccessMessage = NcMessage.EmailSentNotification; } } return View("RegisterAccount"); }