Exemple #1
0
        protected internal void SaveCase(object sender, EventArgs e)
        {
            int caseID = int.Parse(CaseID.Text);
            thisCase = Case.Get(caseID);

            thisCase.CourtID = Convert.ToInt32(CourtID.Text);

            if (!string.IsNullOrEmpty(ReferralDate.Text))
                thisCase.ReferralDate = Convert.ToDateTime(ReferralDate.Text);
            else
                thisCase.ReferralDate = default(DateTime);

            thisCase.ReferralNumber = Convert.ToInt32(ReferralNumber.Text);

            if (!string.IsNullOrEmpty(CourtDate.Text))
                thisCase.CourtDate = Convert.ToDateTime(CourtDate.Text);
            else
                thisCase.CourtDate = default(DateTime);

            if (!string.IsNullOrEmpty(DateFinalConference.Text))
                thisCase.DateOfFinalConference = Convert.ToDateTime(DateFinalConference.Text);
            else
                thisCase.DateOfFinalConference = default(DateTime);

            if (!string.IsNullOrEmpty(DateCompletion.Text))
                thisCase.DateOfCompletion = Convert.ToDateTime(DateCompletion.Text);
            else
                thisCase.DateOfCompletion = default(DateTime);

            thisCase.District = Convert.ToInt32(District.Text);

            thisCase.Status = Status.InnerText;

            thisCase.Update();
            CaseUpdatedPanel.CssClass += " visible";
        }