Esempio n. 1
0
        protected void btnSaveCharDeath_Click(object sender, EventArgs e)
        {
            oCharSelect.LoadInfo();

            if (oCharSelect.SkillSetID.HasValue)
            {
                int iDeathID;
                if (int.TryParse(hidDeathID.Value, out iDeathID))
                {
                    Classes.cCharacterDeath cDeath = new Classes.cCharacterDeath();
                    cDeath.CharacterDeathID = iDeathID;
                    cDeath.CharacterID      = oCharSelect.CharacterID.Value;
                    cDeath.Comments         = tbDeathComments.Text;
                    DateTime dtDeathDate;
                    if (DateTime.TryParse(tbDeathDate.Text, out dtDeathDate))
                    {
                        cDeath.DeathDate = dtDeathDate;
                    }
                    cDeath.DeathPermanent = cbxDeathPerm.Checked;
                    cDeath.RecordStatus   = Classes.RecordStatuses.Active;
                    cDeath.StaffComments  = tbDeathStaffComments.Text;

                    cDeath.Save(Master.UserID);
                    _Reload = true;
                }
            }
        }
Esempio n. 2
0
        protected void btnDeleteDeath_Click(object sender, EventArgs e)
        {
            int iDeathID;

            if (int.TryParse(hidDeleteDeathID.Value, out iDeathID))
            {
                Classes.cCharacterDeath cDeath = new Classes.cCharacterDeath();
                cDeath.CharacterDeathID = iDeathID;
                cDeath.RecordStatus     = Classes.RecordStatuses.Delete;
                cDeath.Save(Master.UserID);
                _Reload = true;
            }
        }