Пример #1
0
 public CRSchemeLeadForm()
 {
     InitializeComponent();
     XLAPI.Result result = XLAPI.GetDataFromAPI("http://localhost:49485/Scheme/GetList");
     if (result.WasSuccessful)
     {
         SchemeDdl.DataSource    = (JArray)result.Data;
         SchemeDdl.ValueMember   = "Id";
         SchemeDdl.DisplayMember = "Name";
         SchemeDdl.SelectedIndex = 0;
     }
     else
     {
         MessageBox.Show(result.Message);
     }
 }
Пример #2
0
        private void CRClaimsExperienceBtn_Click(object sender, RibbonControlEventArgs e)
        {
            CRSchemeLeadForm form = new CRSchemeLeadForm();

            form.ShowDialog();
            if (form.SchemeId != null)
            {
                //get the data from the API
                string url = "http://localhost:49485/ClaimsExperience/Get?schemeId=" + form.SchemeId;
                if (form.LeadId != null)
                {
                    url += "&leadId=" + form.LeadId;
                }
                XLAPI.Result result  = XLAPI.GetDataFromAPI(url);
                JObject      package = (JObject)result.Data;
                XLSheet.HandleClaimsExperience(package);
            }
        }
Пример #3
0
        private void SchemeDdl_SelectedIndexChanged(object sender, EventArgs e)
        {
            dynamic selectedScheme = new JObject();
            int     id             = HandleSelectedValue(SchemeDdl.SelectedValue);

            if (id != 0)
            {
                XLAPI.Result result = XLAPI.GetDataFromAPI("http://localhost:49485/Firm/GetLeadForScheme?schemeId=" + id);
                if (result.WasSuccessful)
                {
                    leadDdl.DataSource    = (JArray)result.Data;
                    leadDdl.ValueMember   = "Id";
                    leadDdl.DisplayMember = "FirmName";
                    leadDdl.SelectedIndex = -1;
                }
                else
                {
                    MessageBox.Show(result.Message);
                }
            }
        }