コード例 #1
0
        private void gridMain_CellDoubleClick(object sender, UI.ODGridClickEventArgs e)
        {
            CustReference     refCur = CustReferences.GetOne(PIn.Long(RefTable.Rows[e.Row]["CustReferenceNum"].ToString()));
            FormReferenceEdit FormRE = new FormReferenceEdit(refCur);

            FormRE.ShowDialog();
            FillMain(true);
        }
コード例 #2
0
 private void FormReferenceEdit_Load(object sender, EventArgs e)
 {
     textCustomer.Text   = CustReferences.GetCustNameFL(CustRefEntryCur.PatNumCust);
     textReferredTo.Text = CustReferences.GetCustNameFL(CustRefEntryCur.PatNumRef);
     if (CustRefEntryCur.DateEntry.Year > 1880)
     {
         textDateEntry.Text = CustRefEntryCur.DateEntry.ToShortDateString();
     }
     textNote.Text = CustRefEntryCur.Note;
 }
コード例 #3
0
 private void FormReferenceEdit_Load(object sender, EventArgs e)
 {
     textName.Text       = CustReferences.GetCustNameFL(RefCur.PatNum);
     textNote.Text       = RefCur.Note;
     checkBadRef.Checked = RefCur.IsBadRef;
     if (RefCur.DateMostRecent.Year > 1880)
     {
         textRecentDate.Text = RefCur.DateMostRecent.ToShortDateString();
     }
     FillMain();
 }
コード例 #4
0
 private void butOK_Click(object sender, EventArgs e)
 {
     if (textRecentDate.errorProvider1.GetError(textRecentDate) != "")
     {
         MsgBox.Show(this, "Please enter a valid date.");
     }
     RefCur.DateMostRecent = PIn.Date(textRecentDate.Text);
     RefCur.IsBadRef       = checkBadRef.Checked;
     RefCur.Note           = textNote.Text;
     CustReferences.Update(RefCur);
     DialogResult = DialogResult.OK;
 }
コード例 #5
0
 private void butOK_Click(object sender, EventArgs e)
 {
     if (gridMain.SelectedIndices.Length < 1)
     {
         MsgBox.Show(this, "Select at least one reference.");
         return;
     }
     SelectedCustRefs = new List <CustReference>();
     for (int i = 0; i < gridMain.SelectedIndices.Length; i++)
     {
         CustReference custRef = CustReferences.GetOne(PIn.Long(RefTable.Rows[gridMain.SelectedIndices[i]]["CustReferenceNum"].ToString()));
         custRef.DateMostRecent = DateTime.Now;
         CustReferences.Update(custRef);
         SelectedCustRefs.Add(custRef);
     }
     DialogResult = DialogResult.OK;
 }
コード例 #6
0
        private void FillMain(bool limit)
        {
            int age = 0;

            try {
                age = PIn.Int(textAge.Text);
            }
            catch { }
            int superFam = 0;

            try {
                superFam = PIn.Int(textSuperFamily.Text);
            }
            catch { }
            long[] billingTypes = new long[listBillingType.SelectedIndices.Count];
            if (listBillingType.SelectedIndices.Count != 0)
            {
                for (int i = 0; i < listBillingType.SelectedIndices.Count; i++)
                {
                    billingTypes[i] = _listBillingTypeDefs[listBillingType.SelectedIndices[i]].DefNum;
                }
            }
            RefTable = CustReferences.GetReferenceTable(limit, billingTypes, checkBadRefs.Checked, checkUsedRefs.Checked, checkGuarOnly.Checked, textCity.Text, textState.Text,
                                                        textZip.Text, textAreaCode.Text, textSpecialty.Text, superFam, textLName.Text, textFName.Text, textPatNum.Text, age, textCountry.Text);
            gridMain.BeginUpdate();
            gridMain.Columns.Clear();
            ODGridColumn col = new ODGridColumn("PatNum", 50);

            gridMain.Columns.Add(col);
            col = new ODGridColumn("First Name", 75);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Last Name", 75);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("HmPhone", 90);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("State", 45);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("City", 80);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Zip Code", 60);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Country", 90);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Specialty", 90);
            gridMain.Columns.Add(col);
            col = new ODGridColumn("Age", 40);
            gridMain.Columns.Add(col);
            col           = new ODGridColumn("Super", 50);
            col.TextAlign = HorizontalAlignment.Center;
            gridMain.Columns.Add(col);
            col           = new ODGridColumn("Last Used", 70);
            col.TextAlign = HorizontalAlignment.Center;
            gridMain.Columns.Add(col);
            col           = new ODGridColumn("Times Used", 70);
            col.TextAlign = HorizontalAlignment.Center;
            gridMain.Columns.Add(col);
            if (checkBadRefs.Checked)
            {
                col           = new ODGridColumn("Bad", 50);
                col.TextAlign = HorizontalAlignment.Center;
                gridMain.Columns.Add(col);
            }
            gridMain.Rows.Clear();
            ODGridRow row;

            for (int i = 0; i < RefTable.Rows.Count; i++)
            {
                row = new ODGridRow();
                row.Cells.Add(RefTable.Rows[i]["PatNum"].ToString());
                row.Cells.Add(RefTable.Rows[i]["FName"].ToString());
                row.Cells.Add(RefTable.Rows[i]["LName"].ToString());
                row.Cells.Add(RefTable.Rows[i]["HmPhone"].ToString());
                row.Cells.Add(RefTable.Rows[i]["State"].ToString());
                row.Cells.Add(RefTable.Rows[i]["City"].ToString());
                row.Cells.Add(RefTable.Rows[i]["Zip"].ToString());
                row.Cells.Add(RefTable.Rows[i]["Country"].ToString());
                row.Cells.Add(RefTable.Rows[i]["Specialty"].ToString());
                row.Cells.Add(RefTable.Rows[i]["age"].ToString());
                row.Cells.Add(RefTable.Rows[i]["SuperFamily"].ToString());
                row.Cells.Add(RefTable.Rows[i]["DateMostRecent"].ToString());
                row.Cells.Add(RefTable.Rows[i]["TimesUsed"].ToString());
                if (checkBadRefs.Checked)
                {
                    row.Cells.Add(RefTable.Rows[i]["IsBadRef"].ToString());
                }
                gridMain.Rows.Add(row);
            }
            gridMain.EndUpdate();
            gridMain.SetSelected(0, true);
        }