public override void Load(Dao.SuperDao dao) { //if (ReqAccount.Instance.Logout(AppSettings.Instance.Ticket).ret) //{ // AppSettings.Instance.Account = string.Empty; // AppSettings.Instance.Ticket = string.Empty; //} //Ctrl.Init(null); }
/// <summary> /// データベースアクセスクラスを取得します。 /// </summary> /// <param name="iInfo">情報インターフェース</param> /// <returns>データベースアクセスクラスのインスタンス</returns> protected Dao GetDbAccess(IInfo iInfo) { ConnectionStringSettings setting = iInfo.GetConnectionString(); Dao db = new Dao(new DBLog(iInfo), setting); db.Connect(); return db; }
public void Show(UCFregments fregment, Dao.SuperDao dao) { ISuperBusiness next = _businesses.Find(b => b.Code == fregment); if (next == null) return; next.SetParent(_currentBusiness); _currentBusiness = next; _currentBusiness.Show(); _currentBusiness.Load(dao); }
/// <summary> /// Deserialize a Dao object /// </summary> /// <param name="node"></param> /// <param name="configScope"></param> /// <returns></returns> public static Dao Deserialize(XmlNode node, ConfigurationScope configScope) { Dao dao = new Dao(); NameValueCollection prop = NodeUtils.ParseAttributes(node, configScope.Properties); dao.Implementation = NodeUtils.GetStringAttribute(prop, "implementation"); dao.Interface = NodeUtils.GetStringAttribute(prop, "interface"); return dao; }
public override void Init(Dao.SuperDao dao) { if (dao != null) { base.Init(dao); chattingwith = dao as Contact; lvChatting.SetContact(chattingwith); this.lbChattingFriend.Text = chattingwith.Name; this.lbChattingFriend.Tag = chattingwith.Account; } lvChatting.Clear(); }
private void BunifuThinButton23_Click(object sender, EventArgs e) { label15.Text = "data not selected yet"; label22.Text = "data not selected yet"; label23.Text = "data not selected yet"; label24.Text = "data not selected yet"; label25.Text = "data not selected yet"; label26.Text = "data not selected yet"; bunifuGradientPanel2.Hide(); bunifuGradientPanel1.Show(); { if (comboBox2.Text == "DeputyGenaralManager" || comboBox2.Text == "GenaralManager") { Manager man = new Manager() { Id = textBox1.Text, Department = comboBox1.Text, Designation = comboBox2.Text, Telephone = textBox2.Text, Email = textBox3.Text, Address = textBox4.Text, Mobile = textBox5.Text, NumberOfChild = textBox6.Text }; Dao ca = new Dao(); ca.Connect(); ca.UpdateManager(man); MessageBox.Show("success fully updated employee"); textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; textBox5.Text = ""; textBox6.Text = ""; comboBox2.Text = ""; comboBox1.Text = ""; ca.Disconnect(); loadMTable(); } else { Employee em = new Employee() { Id = textBox1.Text, Department = comboBox1.Text, Designation = comboBox2.Text, Telephone = textBox2.Text, Email = textBox3.Text, Address = textBox4.Text, Mobile = textBox5.Text, NumberOfChild = textBox6.Text }; Dao cs = new Dao(); cs.Connect(); cs.UpdateEmployee(em); MessageBox.Show("success fully updated employee"); textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; textBox5.Text = ""; textBox6.Text = ""; loadTable(); } } }
private void BunifuThinButton21_Click(object sender, EventArgs e) { bunifuGradientPanel1.Show(); label4.Hide(); textBox1.Hide(); if (comboBox2.Text == "DeputyGenaralManager" || comboBox2.Text == "GenaralManager") { label4.Show(); textBox1.Show(); Manager man = new Manager() { Id = textBox1.Text, Designation = comboBox2.Text }; Dao cs = new Dao(); cs.Connect(); cs.FindManager(man); comboBox1.Text = man.Department; comboBox2.Text = man.Designation; textBox2.Text = man.Telephone; textBox3.Text = man.Email; textBox4.Text = man.Address; textBox5.Text = man.Mobile; textBox6.Text = man.NumberOfChild; label15.Text = "data not selected yet"; label22.Text = "data not selected yet"; label23.Text = "data not selected yet"; label24.Text = "data not selected yet"; label25.Text = "data not selected yet"; label26.Text = "data not selected yet"; cs.Disconnect(); loadMTable(); } else { Employee em = new Employee() { Id = textBox1.Text, Designation = comboBox2.Text }; Dao cs = new Dao(); cs.Connect(); cs.FindEmployee(em); label15.Text = "data not selected yet"; label22.Text = "data not selected yet"; label23.Text = "data not selected yet"; label24.Text = "data not selected yet"; label25.Text = "data not selected yet"; label26.Text = "data not selected yet"; //comboBox1.Text = em.Department; //comboBox2.Text = em.Designation; //textBox2.Text = em.Telephone; //textBox3.Text = em.Email; //textBox4.Text = em.Address; //textBox5.Text = em.Mobile; //textBox6.Text = em.NumberOfChild; cs.Disconnect(); loadTable(); } }
public ManterArquivoResponsavel() { oDao = new Dao(); }
public TimerCollection(DataTable table, Dao dao = null, string rc = null) : base(table, dao, rc) { }
public AppAction GetActionById(int appActionId) { return(Dao.Single <AppAction>(x => x.Id == appActionId)); }
public TesteAsc(Dao dado) { data = dado; }
protected AbstractEventRepository(Dao <EventEntity> dao, SegmentDao segmentDao) : base(dao) { _segmentDao = segmentDao; }
public IEnumerable <PaymentType> GetPaymentTypes() { return(Dao.Query <PaymentType>(x => x.PaymentTypeMaps, x => x.AccountTransactionType, x => x.Account)); }
public IEnumerable <PrintJob> GetPrintJobs() { return(Dao.Query <PrintJob>(x => x.PrinterMaps)); }
public IEnumerable <State> GetStates() { return(Dao.Query <State>()); }
public IEnumerable <AccountTransactionDocumentType> GetAccountTransactionDocumentTypes() { return(Dao.Query <AccountTransactionDocumentType>(x => x.TransactionTypes, x => x.AccountTransactionDocumentTypeMaps, x => x.AccountTransactionDocumentAccountMaps)); }
public IEnumerable <AccountType> GetAccountTypes() { return(Dao.Query <AccountType>().OrderBy(x => x.SortOrder)); }
protected virtual void Execute(COM.TIGER.TASK.DAT.Synchronization.Dao.DataHandler dbFrom, Dao.DataHandler dbTarget, string dataFromCmdString) { }
public Eixo(Dao dao) { oDao = dao; }
public IEnumerable <Entity> GetEntities(int entityTypeId) { return(Dao.Query <Entity>(x => x.EntityTypeId == entityTypeId)); }
public static LoadBillReconciliation GetByLoadBillNum(string loadBillNum) { return(Dao.GetByLoadBillNum(loadBillNum)); }
public IEnumerable <string> GetAutomationCommandNames() { return(Dao.Distinct <AutomationCommand>(x => x.Name)); }
public static IPageOfList <LoadBillReconciliation> GetByMonthPayOffFilter(ParameterFilter filter) { return(Dao.GetByMonthPayOffFilter(filter)); }
public TimerCollection(Query <TimerColumns, Timer> q, Dao dao = null, string rc = null) : base(q, dao, rc) { }
public static IPageOfList <LoadBillReconciliation> GetByMonthPayOffExportFilter(LBRForMonthPayOffExportFilter filter) { return(Dao.GetByMonthPayOffFilter(filter)); }
public ManterArquivoResponsavel(string connectionString, DataBaseTypes dataBaseType) { oDao = new Dao(connectionString, dataBaseType); }
public SettingCollection(Database db, DataTable table, Dao dao = null, string rc = null) : base(db, table, dao, rc) { }
private void BunifuThinButton22_Click(object sender, EventArgs e) { if (comboBox2.Text == "DeputyGenaralManager" || comboBox2.Text == "GenaralManager") { Manager man = new Manager() { Id = textBox1.Text, }; Dao cs = new Dao(); cs.Connect(); cs.RemoveManager(man); MessageBox.Show("success fully removed employee"); textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; textBox5.Text = ""; textBox6.Text = ""; comboBox2.Text = ""; comboBox1.Text = ""; label15.Text = "data removed"; label22.Text = "data removed"; label23.Text = "data removed"; label24.Text = "data removed"; label25.Text = "data removed"; label26.Text = "data removed"; loadMTable(); } else { Employee em = new Employee() { Id = textBox1.Text, }; Dao cs = new Dao(); cs.Connect(); cs.RemoveEmployee(em); MessageBox.Show("success fully removed employee"); textBox1.Text = ""; textBox2.Text = ""; textBox3.Text = ""; textBox4.Text = ""; textBox5.Text = ""; textBox6.Text = ""; comboBox2.Text = ""; comboBox1.Text = ""; label15.Text = "data removed"; label22.Text = "data removed"; label23.Text = "data removed"; label24.Text = "data removed"; label25.Text = "data removed"; label26.Text = "data removed"; loadTable(); } }
public SettingCollection(Query <SettingColumns, Setting> q, Dao dao = null, string rc = null) : base(q, dao, rc) { }
public static void UpdateCollectionsForTitle(Dao.Title title) { if (title.UpdatedActors != null) { IEnumerable<string> originalActors = from a in title.People where a.Role == (byte)PeopleRole.Actor select a.MetaData.FullName; List<string> added = new List<string>(title.UpdatedActors.Where(t => !originalActors.Contains(t.PersonName)).Select(t => t.PersonName)); List<string> removed = new List<string>(originalActors.Where(t => !title.UpdatedActors.Select(r => r.PersonName).Contains(t))); // remove ones no longer used foreach (string remove in removed) { Dao.Person person = title.People.SingleOrDefault(p => p.MetaData.FullName == remove && p.Role == (byte)PeopleRole.Actor); if (person != null) title.People.Remove(person); } Dictionary<string, string> actorLookup = new Dictionary<string, string>(); title.UpdatedActors.ForEach(t => actorLookup.Add(t.PersonName, t.RoleName)); // add the new ones foreach (string add in added) { AddActorToTitle(title, add, actorLookup[add], PeopleRole.Actor); } } if (title.UpdatedDirectors != null) { ProcessPersonList(title, title.UpdatedDirectors, PeopleRole.Director); } if (title.UpdatedWriters != null) { ProcessPersonList(title, title.UpdatedWriters, PeopleRole.Writer); } if (title.UpdatedProducers != null) { ProcessPersonList(title, title.UpdatedProducers, PeopleRole.Producers); } // if the genres were modified see how they've changed if (title.UpdatedGenres != null) { // see if there are any genres to add // grab all the original genres IEnumerable<string> originalGenres = from g in title.Genres select g.MetaData.Name; List<string> added = new List<string>(title.UpdatedGenres.Where(t => !originalGenres.Contains(t))); List<string> removed = new List<string>(originalGenres.Where(t => !title.UpdatedGenres.Contains(t))); // remove ones no longer used foreach (string remove in removed) { Dao.Genre genre = title.Genres.SingleOrDefault(g => g.MetaData.Name == remove); if (genre != null) title.Genres.Remove(genre); } // add the new ones foreach (string add in added) { AddGenreToTitle(title, add); } } if (title.UpdatedTags != null) { IEnumerable<string> originalTags = from t in title.Tags select t.Name; List<string> added = new List<string>(title.UpdatedTags.Where(t => !originalTags.Contains(t))); List<string> removed = new List<string>(originalTags.Where(t => !title.UpdatedTags.Contains(t))); foreach (string remove in removed) { Dao.Tag tag = title.Tags.SingleOrDefault(t => t.Name == remove); if (tag != null) title.Tags.Remove(tag); } foreach (string add in added) { Dao.Tag daoTag = new OMLEngine.Dao.Tag(); daoTag.TitleId = title.Id; daoTag.Name = add; title.Tags.Add(daoTag); } } }
/// <summary> /// Adds a genre to a title /// </summary> /// <param name="title"></param> /// <param name="genre"></param> private static void AddGenreToTitle(Dao.Title title, string genre) { if (string.IsNullOrEmpty(genre)) return; // see if the genre exists Dao.GenreMetaData meta = Dao.TitleCollectionDao.GetGenreMetaDataByName(genre); if (meta == null) { meta = new OMLEngine.Dao.GenreMetaData(); meta.Name = genre; // save the genre Dao.DBContext.Instance.GenreMetaDatas.InsertOnSubmit(meta); } title.Genres.Add(new Dao.Genre { MetaData = meta }); }
public Account GetAccountById(int accountId) { return(Dao.SingleWithCache <Account>(x => x.Id == accountId)); }
public IEnumerable <EntityType> GetEntityTypes() { return(Dao.Query <EntityType>(x => x.EntityCustomFields).OrderBy(x => x.SortOrder)); }
private static void AddActorToTitle(Dao.Title title, string actor, string role, PeopleRole type) { if (actor.Length > 255) throw new FormatException("Actor must be 255 characters or less."); if (role != null && role.Length > 255) throw new FormatException("Role must be 255 characters or less."); if (string.IsNullOrEmpty(actor)) return; Dao.BioData bioData = Dao.TitleCollectionDao.GetPersonBioDataByName(actor); if (bioData == null) { bioData = new OMLEngine.Dao.BioData(); bioData.FullName = actor; Dao.DBContext.Instance.BioDatas.InsertOnSubmit(bioData); Dao.DBContext.Instance.SubmitChanges(); } Dao.Person person = new OMLEngine.Dao.Person(); person.MetaData = bioData; person.CharacterName = role; person.Role = (byte)type; title.People.Add(person); }
public Entity GetEntityById(int accountId) { return(Dao.SingleWithCache <Entity>(x => x.Id == accountId)); }
private static void ProcessPersonList(Dao.Title title, List<OMLEngine.Person> updatedList, PeopleRole role) { IEnumerable<string> originals = from a in title.People where a.Role == (byte)role select a.MetaData.FullName; List<string> added = new List<string>(updatedList.Where(t => !originals.Contains(t.full_name)).Select(t => t.full_name)); List<string> removed = new List<string>(originals.Where(t => !updatedList.Select(r => r.full_name).Contains(t))); // remove ones no longer used foreach (string remove in removed) { Dao.Person person = title.People.SingleOrDefault(p => p.MetaData.FullName == remove && p.Role == (byte)role); if (person != null) title.People.Remove(person); } // add the new ones foreach (string add in added) { if (!string.IsNullOrEmpty(add)) { AddActorToTitle(title, add, null, role); } } }
protected ApiControllerBase(ISessionFactory sessionFactory) { dao = new Dao(sessionFactory); }
internal Disk(Dao.Disk disk) { _disk = disk; }
public AutomationDao() { ValidatorRegistry.RegisterDeleteValidator <AppAction>(x => Dao.Exists <ActionContainer>(y => y.AppActionId == x.Id), Resources.Action, Resources.Rule); }
public Dictionary <string, string> GetScripts() { return(Dao.Query <Script>().ToDictionary(x => x.HandlerName, x => x.Code)); }
public IEnumerable <AccountTransactionType> GetAccountTransactionTypes() { return(Dao.Query <AccountTransactionType>()); }