private void ExecuteDelete(object parameter) { Collection <CorporationModel> deleteditems = new Collection <CorporationModel>(); IMessageBoxService msg = new MessageBoxService(); string title = "Deleting Corporation"; string confirmtxt = "Do you want to delete the selected item"; if (Corporations.Count(x => x.Selected) > 1) { title = title + "s"; confirmtxt = confirmtxt + "s"; } if (msg.ShowMessage(confirmtxt + "?", title, GenericMessageBoxButton.OKCancel, GenericMessageBoxIcon.Question).Equals(GenericMessageBoxResult.OK)) { foreach (CorporationModel si in Corporations) { if (si.Selected) { if (si.ID > 0) { DeleteItem(si.ID, "Corporations"); } deleteditems.Add(si); } } foreach (CorporationModel pm in deleteditems) { Corporations.Remove(pm); } deleteditems.Clear(); } msg = null; }
public void LoadCorporations(IEnumerable <long> corporationIds) { corporationIds = corporationIds.Distinct().Where(w => !Corporations.Select(s => s.Id).ToList().Contains(w)); corporationIds.ToList().ForEach(f => Corporations.Add(_mapper.Map <Devpack.ESI.Models.Corporation.Summary>( new Devpack.ESI.Models.Corporation.Detail(f)))); }
public static void RefreshUser() { if (Securities != null) { Securities.Clear(); } if (Users != null) { Users.Clear(); } if (Accounts != null) { Accounts.Clear(); } if (Blocs != null) { Blocs.Clear(); } if (Corporations != null) { Corporations.Clear(); } if (Departments != null) { Departments.Clear(); } if (Employees != null) { Employees.Clear(); } User.MenuProvider.RefreshMenus(); }
private void ExecuteAddNew(object parameter) { Corporations.Add(new CorporationModel() { ID = 0, Name = string.Empty, LogoID = 0 }); ScrollToSelectedItem = Corporations.Count - 1; }
public Schema() : base() { InstanceType = typeof(__Corporat__); Properties.ClearExposed(); Html = Add <__TString__>("Html"); Html.DefaultValue = "/tatiana/CorporationListJson.html"; Html.SetCustomAccessors((_p_) => { return(((__Corporat__)_p_).__bf__Html__); }, (_p_, _v_) => { ((__Corporat__)_p_).__bf__Html__ = (System.String)_v_; }, false); Corporations = Add <__TArray__>("Corporations", bind: "Corporations"); Corporations.SetCustomGetElementType((arr) => { return(__Corporat1__.DefaultTemplate); }); Corporations.SetCustomAccessors((_p_) => { return(((__Corporat__)_p_).__bf__Corporations__); }, (_p_, _v_) => { ((__Corporat__)_p_).__bf__Corporations__ = (__Arr__)_v_; }, false); }
public void AddParentCorporation() { ParentCorporation = new Devpack.ESI.Models.Corporation.Detail(Properties.Settings.Default.CorporationId); Corporations.Add(_mapper.Map <Devpack.ESI.Models.Corporation.Summary>(ParentCorporation)); }
public IEnumerable <Character> GetCharacterMembers() { return(Corporations.SelectMany(c => c.GetCharacterMembers())); }
private static Corporations GetObject(DataRow dr) { Corporations objCorporations = new Corporations { Id = (Int64)dr["Id"], CorpCode = (String)dr["CorpCode"], CorpName = (String)dr["CorpName"], Address = (String)dr["Address"], ContactNo = (String)dr["ContactNo"], ContactPerson = (String)dr["ContactPerson"], Designation = (String)dr["Designation"], CPContactNo = (String)dr["CPContactNo"], Email = (String)dr["Email"], DiscountPcnt = (Decimal)dr["DiscountPcnt"], PaymentMethodId = (Int64)dr["PaymentMethodId"], IsActive = (Boolean)dr["IsActive"], }; return objCorporations; }
public Corporations GetCorporationsById(Int64 Id) { Hashtable lstItems = new Hashtable(); lstItems.Add("@Id", Id); DataTable dt = dal.GetAllCorporationsById(lstItems); Corporations objCorporations = new Corporations(); DataRow dr = dt.Rows[0]; return GetObject(dr); }
private bool IsDuplicateName(string name) { return(Corporations.Count(x => x.Name == name) > 1); }
private bool CanExecuteDelete(object obj) { return(Corporations.Count(x => x.Selected) > 0); }