Ejemplo n.º 1
0
 protected void DeleteMissionBtn_Click(object sender, EventArgs e)
 {
     using (DataContext db = new DataContext())
     {
         MissionData m = MissionData.GetMissionData((int)Cache["MissionData"], false, db);
         db.MissionData.Remove(m);
         db.SaveChanges();
     }
     LoadMissionView();
 }
Ejemplo n.º 2
0
        protected void ViewMis_Command(object sender, CommandEventArgs e)
        {
            MissionData mis = MissionData.GetMissionData(int.Parse(e.CommandArgument.ToString()));

            MissionTitleLbl.Text = mis.MissionName;
            MisDesLbl.Text       = mis.MissionDesc;

            Session["MissionData"] = mis;

            ScriptManager.RegisterStartupScript(this, this.GetType(), "attackSummaryModel", "showPopupattacksummary();", true);
        }
Ejemplo n.º 3
0
 protected void UpdateMissionInfoBtn_Click(object sender, EventArgs e)
 {
     using (DataContext db = new DataContext())
     {
         MissionData m = MissionData.GetMissionData((int)Cache["MissionData"], false, db);
         m.MissionName = EditMisName.Text;
         m.MissionIP   = EditMisIP.Text;
         m.MissionDesc = EditMisDesc.Text;
         m.MissionExp  = int.Parse(EditMisExp.Text);
         m.MissionCoin = int.Parse(EditMisCoin.Text);
         db.SaveChanges();
     }
 }
Ejemplo n.º 4
0
        protected void EditMisBtn_Command(object sender, CommandEventArgs e)
        {
            MissionData mission = MissionData.GetMissionData(int.Parse(e.CommandArgument.ToString()));

            Cache["MissionData"] = mission.MissionId;
            EditMisID.Text       = mission.MissionId.ToString();
            EditMisName.Text     = mission.MissionName;
            EditMisIP.Text       = mission.MissionIP;
            EditMisType.Text     = mission.MissionType.ToString();
            EditMisDesc.Text     = mission.MissionDesc;
            EditMisExp.Text      = mission.MissionExp.ToString();
            EditMisCoin.Text     = mission.MissionCoin.ToString();

            ScriptManager.RegisterStartupScript(this, this.GetType(), "EditMissionModel", "showEditMissionModel()", true);
        }