Exemple #1
0
        private void show_ClientExist()
        {
            //pix_login.Visible = true;
            String          enteredUsername = xamlTextBoxUsername.Text.Trim();
            individual_data strResponse     = null;

            //Task.Run(() =>
            {
                {
                    // displayMessage("Verifying Template File.....", Utils.COLOR_DERMALOG_RED);
                    //string externalAPI = Properties.Settings.Default.ExternalAPIAddress;
                    //string servNAME = string.Format("infometriq-partner-api/individuals/{0}/username", enteredUsername);
                    //strResponse = Utils.call_External_WEBAPI_GETService(servNAME);
                    using (tranxDataContext tx = new tranxDataContext())
                    {
                        tx.Connection.ConnectionString = Utils.getConnection();
                        var ds = tx.individual_datas.FirstOrDefault(s => s.username == enteredUsername);
                        strResponse = ds;
                        //strResponse = Newtonsoft.Json.JsonConvert.SerializeObject(ds);
                    }
                    //strResponse = Utils.call_WEBAPI_GETService("infometriq-partner-api/individuals");
                }
            }
            //).Wait();


            //AlertForm1 fmm = new AlertForm1("Client Data Received Successfully.....");
            //fmm.ShowDialog();

            //pix_login.Visible = false;


            winforms.Form_data fm = new winforms.Form_data(strResponse, true);
            fm.ShowDialog();
        }
Exemple #2
0
        public static void show_ClientExist(String enteredUsername)
        {
            //pix_login.Visible = true;
            //String enteredUsername = xamlTextBoxUsername.Text.Trim();
            //individual_data strResponse = null;
            dynamic strResponse = new ExpandoObject();
            //Task.Run(() =>
            {
                {
                    using (tranxDataContext tx = new tranxDataContext())
                    {
                        tx.Connection.ConnectionString = Utils.getConnection();
                        var ds = tx.individual_datas
                                 .FirstOrDefault(s => s.username == enteredUsername);

                        if (ds != null)
                        {
                            strResponse = ds;
                            winforms.Form_data fm = new winforms.Form_data(strResponse, true);
                            fm.ShowDialog();
                        }
                        else
                        {
                            AlertForm1 al = new AlertForm1("Individual Data noavailable Locally",
                                                           AlertForm1.AlertOptions.OK, AlertForm1.AlertType.error);
                            al.ShowDialog();
                        }
                        //strResponse = Newtonsoft.Json.JsonConvert.SerializeObject(ds);
                    }
                    //strResponse = Utils.call_WEBAPI_GETService("infometriq-partner-api/individuals");
                }
            }
            //).Wait();


            //AlertForm1 fmm = new AlertForm1("Client Data Received Successfully.....");
            //fmm.ShowDialog();

            //pix_login.Visible = false;
        }
Exemple #3
0
        public static void show_ClientExist_Online(String enteredUsername)
        {
            //pix_login.Visible = true;
            string strResponse = "";

            Task.Run(() =>
            {
                {
                    // displayMessage("Verifying Template File.....", Utils.COLOR_DERMALOG_RED);
                    //string externalAPI = Properties.Settings.Default.ExternalAPIAddress;
                    string servNAME = string.Format("customer/{0}", enteredUsername);
                    // string servNAME = string.Format("infometriq-partner-api/individuals/{0}/username", enteredUsername);
                    strResponse = call_External_WEBAPI_GETService(servNAME);
                    //strResponse = Utils.call_WEBAPI_GETService("infometriq-partner-api/individuals");
                }
            }
                     ).Wait();

            // pix_login.Visible = false;

            winforms.Form_data fm = new winforms.Form_data(strResponse);
            fm.ShowDialog();
        }