コード例 #1
0
    protected void LoadPolicyCombo(Ticket tck)
    {
        string desc = "";

        rdcbPolicy.Items.Clear();
        if (tck != null)
        {
            foreach (Policy p in tck.Policy.Customer.Policies)
            {
                desc = String.Format("{0} [{1} - {2}]", p.Insurance.Name
                                     , CntAriCli.DateNullFormat(p.BeginDate)
                                     , CntAriCli.DateNullFormat(p.EndDate));
                rdcbPolicy.Items.Add(new RadComboBoxItem(desc, p.PolicyId.ToString()));
            }
            rdcbPolicy.SelectedValue = tck.Policy.PolicyId.ToString();
        }
        else
        {
            if (cus != null)
            {
                foreach (Policy p in cus.Policies)
                {
                    desc = String.Format("{0} [{1} - {2}]", p.Insurance.Name
                                         , CntAriCli.DateNullFormat(p.BeginDate)
                                         , CntAriCli.DateNullFormat(p.EndDate));
                    rdcbPolicy.Items.Add(new RadComboBoxItem(desc, p.PolicyId.ToString()));
                    if (p.Type == Resources.ConstantsResource.Primary)
                    {
                        rdcbPolicy.SelectedValue = p.PolicyId.ToString();
                    }
                }
            }
        }
    }
コード例 #2
0
 protected void LoadData(Patient pat)
 {
     txtPatientId.Text = pat.PersonId.ToString();
     txtName.Text      = pat.Name;
     txtSurname1.Text  = pat.Surname1;
     txtSurname2.Text  = pat.Surname2;
     if (String.Format("{0:dd/MM/yy}", pat.BornDate) != "01/01/01")
     {
         rddpBornDate.SelectedDate = pat.BornDate;
     }
     txtAge.Text        = CntAriCli.CalulatedAge(pat.BornDate).ToString();
     txtLastUpdate.Text = CntAriCli.DateNullFormat(pat.LastUpdate);
     LoadSexCombo(pat);
     LoadSourceCombo(pat);
     LoadClinicCombo(pat);
     txtComments.Text = pat.Comments;
     if (pat.Customer != null)
     {
         txtVATIN.Text = pat.Customer.VATIN;
     }
     txtFrn.Text = String.Format("{0:0}", pat.OftId);
     txtInsuranceInformation.Text = pat.InsuranceInformation;
     if (!CntAriCli.OaDateNull(pat.OpenDate))
     {
         rdtOpenDate.SelectedDate = pat.OpenDate;
     }
 }