Пример #1
0
 internal static void UpdateCourtInformation(CourtInformation courtInfo, string fileID)
 {
     string query = string.Format(Constants.EXISTS_COURT_INFORMATION_QUERY, fileID);
     object isPresent = DBHelper.GetScalarValue(query);
     int result = 0;
     if (isPresent == null)
     {
         query = string.Format(Constants.INSERT_COURT_INFORMATION_QUERY, fileID, courtInfo.CaseNumber, courtInfo.Court, courtInfo.Address, courtInfo.City, courtInfo.State, courtInfo.Zip);
         result = DBHelper.ExecuteNonQuery(query);
     }
     else
     {
         query = string.Format(Constants.UPDATE_COURT_INFORMATION_QUERY, fileID, courtInfo.CaseNumber, courtInfo.Court, courtInfo.Address, courtInfo.City, courtInfo.State, courtInfo.Zip);
         result = DBHelper.ExecuteNonQuery(query);
     }
 }
Пример #2
0
        private void btnSaveCourtInfo_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (string.IsNullOrEmpty(txtCourtInfoCaseNumber.Text) &&
                       string.IsNullOrEmpty(txtCourtInfoCourt.Text) &&
                       string.IsNullOrEmpty(txtCourtInfoAddress.Text) &&
                       string.IsNullOrEmpty(txtCourtInfoCity.Text) &&
                       string.IsNullOrEmpty(txtCourtInfoState.Text) &&
                       string.IsNullOrEmpty(txtCourtInfoZip.Text))
                {
                    return;
                }
                CourtInformation courtInfo = new CourtInformation();
                courtInfo.CaseNumber = txtCourtInfoCaseNumber.Text;
                courtInfo.Court = txtCourtInfoCourt.Text;
                courtInfo.Address = txtCourtInfoAddress.Text;
                courtInfo.City = txtCourtInfoCity.Text;
                courtInfo.State = txtCourtInfoState.Text;
                courtInfo.Zip = txtCourtInfoZip.Text;

                BusinessLogic.UpdateCourtInformation(courtInfo, txtFileNo.Text);

                UpdateStatusClientCourtInfo(true);
                dgClientFileList.SelectedIndex = -1;
                dgClientFileList.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                Helper.LogException(ex);
            }
        }
Пример #3
0
 internal static void SaveCourtInformation(CourtInformation courtInfo, string fileID)
 {
     string query = string.Format(Constants.INSERT_COURT_INFORMATION_QUERY, fileID, courtInfo.CaseNumber, courtInfo.Court, courtInfo.Address, courtInfo.City, courtInfo.State, courtInfo.Zip);
     int result = DBHelper.ExecuteNonQuery(query);
 }
Пример #4
0
        private void SaveCourtInformation()
        {
            try
            {
                if (string.IsNullOrEmpty(txtCourtInfoCaseNumber.Text) &&
                    string.IsNullOrEmpty(txtCourtInfoCourt.Text) &&
                    string.IsNullOrEmpty(txtCourtInfoAddress.Text) &&
                    string.IsNullOrEmpty(txtCourtInfoCity.Text) &&
                    string.IsNullOrEmpty(txtCourtInfoState.Text) &&
                    string.IsNullOrEmpty(txtCourtInfoZip.Text))
                {
                    return;
                }
                CourtInformation courtInfo = new CourtInformation();
                courtInfo.CaseNumber = txtCourtInfoCaseNumber.Text;
                courtInfo.Court = txtCourtInfoCourt.Text;
                courtInfo.Address = txtCourtInfoAddress.Text;
                courtInfo.City = txtCourtInfoCity.Text;
                courtInfo.State = txtCourtInfoState.Text;
                courtInfo.Zip = txtCourtInfoZip.Text;

                BusinessLogic.SaveCourtInformation(courtInfo, txtFileNo.Text);
            }
            catch (Exception ex)
            {
                Helper.LogException(ex);
            }
        }