Inheritance: UnrealBuildTool.ModuleRules
コード例 #1
0
        public void AddWorship(Worship worship)
        {
            context.Worships.Add(worship);
            SetAuditFields(worship);

            context.SaveChanges();
        }
コード例 #2
0
		private static void Main(string[] args)
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			
			Worship worship=new Worship();
			worship.Load();
			Application.Run(new MainForm());
		}
コード例 #3
0
		public MainForm()
		{
			InitializeComponent();
			
			SetLiveFormScreen();
			
			this.worship = new Worship();
			this.settings= new Settings();
			
			liveForm.Show();
		}
コード例 #4
0
 public ActionResult Create(FormCollection form, CreateEditViewModel model)
 {
     try
     {
         var worship = new Worship();
         Mapper.DynamicMap(model, worship);
         worshipProvider.AddWorship(worship);
     }
     catch (Exception ex)
     {
         HandleException(ex);
         return(RedirectToAction("Create"));
     }
     return(RedirectToAction("Index"));
 }
コード例 #5
0
        public string GetLastNotes(int currentWorshipId)
        {
            IQueryable <Worship> queryLastWorship = context.Worships;

            if (currentWorshipId > 0)
            {
                queryLastWorship = queryLastWorship.Where(worship => worship.Id < currentWorshipId);
            }

            queryLastWorship = queryLastWorship.OrderByDescending(worship => worship.ChangedWhen);

            Worship lastKnownWorship = queryLastWorship.FirstOrDefault();

            return(lastKnownWorship != null ? lastKnownWorship.Notes : String.Empty);
        }
コード例 #6
0
        public override void Select(MainForm frm)
        {
            frm.grpLeader.Text = this.ToString();
            frm.grpLeader.Show();

            frm.lblLeaderName.Text          = ToString();
            frm.lblLeaderType.Text          = LeaderType;
            frm.lblLeaderRace.Data          = Race;
            frm.lblLeaderLife.Text          = Birth == null ? "" : (Birth.ToString() + " – " + (Death == WorldTime.Present ? "" : Death.ToString()));
            frm.lblLeaderReignBegan.Text    = ReignBegan == null ? "" : ReignBegan.ToString();
            frm.lblLeaderInheritance.Text   = Inheritance;
            frm.lblLeaderInheritedFrom.Data = InheritedFrom;
            frm.lblLeaderCivilization.Data  = Civilization;
            frm.lblLeaderSite.Data          = Site;
            frm.lblLeaderGod.Data           = Worship;
            if (Worship != null)
            {
                frm.lblLeaderGod.Text = Worship.ToString() + " (" + WorshipPercent + "%)";
            }
            frm.lblLeaderHF.Data = HF;

            Program.MakeSelected(frm.tabLeader, frm.lstLeader, this);
        }
コード例 #7
0
 public void UpdateWorship(Worship worship)
 {
     SetAuditFields(worship);
     context.SaveChanges();
 }