示例#1
0
 private void butOK_Click(object sender, EventArgs e)
 {
     if (textPayerID.Text == "")
     {
         MsgBox.Show(this, "Payer ID cannot be blank.");
         return;
     }
     if (textCarrierName.Text == "")
     {
         MsgBox.Show(this, "Carrier name cannot be blank.");
         return;
     }
     electIDCur.PayorID     = textPayerID.Text;
     electIDCur.CarrierName = textCarrierName.Text;
     electIDCur.Comments    = textComments.Text;
     electIDCur.IsMedicaid  = checkIsMedicaid.Checked;
     if (electIDCur.ElectIDNum == 0)
     {
         ElectIDs.Insert(electIDCur);
     }
     else
     {
         ElectIDs.Update(electIDCur);
     }
     DialogResult = DialogResult.OK;
 }
示例#2
0
        private void FillElectIDs(long electIDSelect)
        {
            ElectIDs.RefreshCache();
            _listElectIDs = ElectIDs.GetDeepCopy();
            gridElectIDs.BeginUpdate();
            gridElectIDs.Columns.Clear();
            ODGridColumn col = new ODGridColumn(Lan.g("TableApptProcs", "Carrier"), 320);

            gridElectIDs.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableApptProcs", "Payer ID"), 80);
            gridElectIDs.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableApptProcs", "Is Medicaid"), 70, HorizontalAlignment.Center);
            gridElectIDs.Columns.Add(col);
            col = new ODGridColumn(Lan.g("TableApptProcs", "Comments"), 390);
            gridElectIDs.Columns.Add(col);
            gridElectIDs.Rows.Clear();
            ODGridRow row;
            int       selectedIndex = -1;

            for (int i = 0; i < _listElectIDs.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(_listElectIDs[i].CarrierName);
                row.Cells.Add(_listElectIDs[i].PayorID);
                row.Cells.Add(_listElectIDs[i].IsMedicaid?"X":"");
                row.Cells.Add(_listElectIDs[i].Comments);
                gridElectIDs.Rows.Add(row);
                if (_listElectIDs[i].ElectIDNum == electIDSelect)
                {
                    selectedIndex = i;
                }
            }
            gridElectIDs.EndUpdate();
            gridElectIDs.SetSelected(selectedIndex, true);
        }