• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Service1Client类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Service1Client的典型用法代码示例。如果您正苦于以下问题:C# Service1Client类的具体用法?C# Service1Client怎么用?C# Service1Client使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Service1Client类属于命名空间,在下文中一共展示了Service1Client类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: TestSync

 public void TestSync()
 {
     using (Service1Client proxy = new Service1Client())
     {
         proxy.GetDataUsingDataContract(new CompositeType());
     }
 }
开发者ID:Code2Read,项目名称:PruebaConcepto,代码行数:7,代码来源:UnitTest1.cs


示例2: CallService1

        private async void CallService1(object sender, EventArgs e)
        {
            BasicHttpBinding binding = DataModel.CreateBasicHttp();

            //Service1Client client = new Service1Client(binding, new EndpointAddress("http://localhost:59074/Service1.svc"));
            Service1Client client = new Service1Client(binding, new EndpointAddress("http://192.168.1.96:59075/Service1.svc"));

            count++;

            CompositeType parm = new CompositeType();
            parm.BoolValue = true;
            parm.StringValue = "Hello " + count.ToString() + " ";

            try
            {
                CompositeType s = await Task<CompositeType>.Factory.FromAsync((asyncCallback, asyncState) => client.BeginGetDataUsingDataContract(parm, asyncCallback, asyncState),
                                                                       (asyncResult) => client.EndGetDataUsingDataContract(asyncResult), null);

                MyText.Text = s.StringValue;
            }
            catch(Exception ex)
            {
                Android.Util.Log.Debug("", ex.ToString());
            }


        }
开发者ID:JimWilcox3,项目名称:XamarinAsyncTest,代码行数:27,代码来源:MainActivity.cs


示例3: inputButton_Click

 private void inputButton_Click(object sender, RoutedEventArgs e)
 {
     string str = inputbox.Text;
     Service1Client client1 = new Service1Client();
     client1.SeePatientDataCompleted += new EventHandler<SeePatientDataCompletedEventArgs>(client1_SeePatientDataCompleted);
     client1.SeePatientDataAsync(str);
 }
开发者ID:cloudscrubs,项目名称:azureprototype,代码行数:7,代码来源:Test1.xaml.cs


示例4: AddJefe

        // GET: Jerarquia
        public ActionResult AddJefe()
        {
            if (Session["User"] != null)
            {
                Service1Client client = new Service1Client();
                var query = client.getTbl_usuarios();
                List<string> emple = new List<string>();
                foreach (var item in query)
                {
                    emple.Add(item.primer_nombre + " " + item.primer_apellido + "|" + item.talento_humano);
                }
                ViewBag.Empleados = emple;

                var quer = client.getTbl_departamentos();
                List<string> depto = new List<string>();
                foreach (var item in quer)
                {
                    depto.Add(item.descripcion+ "|" + item.departamentoid);
                }
                client.Close();
                ViewBag.Empleados = emple;
                ViewBag.Departamentos = depto;

                return View();
            }

            else
                return RedirectToAction("Login", "Home");
        }
开发者ID:DannyelPerez,项目名称:ASKI-SISTEMA_VACACIONES,代码行数:30,代码来源:JerarquiaController.cs


示例5: GridBagla

    /*
    protected void GridBagla(int FirmaId)
    {
        //rdgvFairmadanGelenIstekler.DataSource = spFirmaIDdenIstekleriDon(FirmaId);
        //rdgvFairmadanGelenIstekler.DataBind();
        using (Service1Client client = new Service1Client())
        {
            rdgvFairmadanGelenIstekler.DataSource = client.FirmaIddenFirmayaAitIstekleriDon(FirmaId);
            rdgvFairmadanGelenIstekler.DataBind();
        }
    }
     */
    protected void GridBagla(int FirmaId,int Yil, int IstekNo)
    {
        using (Service1Client client = new Service1Client())
        {
            //if (txtFilterYil.Text.Trim() == string.Empty && txtFilterIstekNo.Text.Trim() == string.Empty)//Tüm istekler
            //    rdgvFairmadanGelenIstekler.DataSource = client.FirmaIddenFirmayaAitIstekleriDon(FirmaId);
            //if (txtFilterYil.Text.Trim() != string.Empty && txtFilterIstekNo.Text.Trim() == string.Empty)//Belli bir yıl
            //    rdgvFairmadanGelenIstekler.DataSource = client.FirmaIDdenFirmadanGelenIstekleriDonGenel(FirmaId,int.Parse(txtFilterYil.Text),0);
            //if (txtFilterYil.Text.Trim() != string.Empty && txtFilterIstekNo.Text.Trim() == string.Empty)//Belli bir yıl ve belli bir istekno
            //    rdgvFairmadanGelenIstekler.DataSource = client.FirmaIDdenFirmadanGelenIstekleriDonGenel(FirmaId, int.Parse(txtFilterYil.Text), int.Parse(txtFilterIstekNo.Text));

            //int Yil = 0;
            //int IstekNo = 0;
            if (txtFilterYil.Text.Trim() != string.Empty)
            {
                Yil = int.Parse(txtFilterYil.Text.Trim());
            }
            else
            {
                Yil = 0;
            }
            if (txtFilterIstekNo.Text.Trim() != string.Empty)
            {
                IstekNo = int.Parse(txtFilterIstekNo.Text.Trim());
            }
            else
            {
                IstekNo = 0;
            }
            int FirmID = int.Parse(Session["IstekleriGosterilecekFirmaId"].ToString());
            rdgvFairmadanGelenIstekler.DataSource = client.FirmaIDdenFirmadanGelenIstekleriDonGenel(FirmID, Yil,IstekNo);

            rdgvFairmadanGelenIstekler.DataBind();
        }
    }
开发者ID:inancakcan,项目名称:kalibrasyon,代码行数:47,代码来源:FirmadanGelenIstekler.ascx.cs


示例6: Login

        public ActionResult Login(Login_Data LD)
        {
            if (ModelState.IsValid)
            {

                Service1Client client = new Service1Client();
                LoginData auth = new LoginData();
                auth.Email = LD.Email;
                auth.Password = LD.Password;
                if (client.AuthenticateUser(auth))
                {
                    Session["Email"] = LD.Email;
                    return index();
                }
                else
                {
                    string error_message = "Wrong Email or Password";
                    ViewBag.LoginError = error_message;
                    return View();
                }

            }
            else
            {
                return View();
            }
        }
开发者ID:NimerA,项目名称:VacationProject,代码行数:27,代码来源:HomeController.cs


示例7: RadComboBoxFirma_ItemsRequested

    protected void RadComboBoxFirma_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
    {
        if (e.Text.Length > 3)
        {
            using (Service1Client client = new Service1Client())
            {
                intBolgeKodu = client.BolgeKoduDon(Context.User.Identity.Name);
            }
            string BolgeKodu = intBolgeKodu.ToString();
            string sqlSelectCommand = "";
            sqlSelectCommand = "SELECT [FIRMAID],[MUSTNO], [FIRMAADI], [IL_ILCE] from [firma] WHERE [FIRMAADI] LIKE '%'+ @text + '%' and SILINDI=0 and BOLGEKODU=" + BolgeKodu + " ORDER BY [FIRMAADI]";
            SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString);
            adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text);
            DataTable dataTable = new DataTable();
            adapter.Fill(dataTable);

            RadComboBoxFirma.Items.Clear();
            foreach (DataRow dataRow in dataTable.Rows)
            {
                string IlIlce = "";
                RadComboBoxItem item = new RadComboBoxItem();
                item.Text = (string)dataRow["MUSTNO"].ToString();
                item.Value = dataRow["FIRMAID"].ToString();
                string FirmaAdi = (string)dataRow["FIRMAADI"];
                if (dataRow["IL_ILCE"] != System.DBNull.Value)
                    {
                        IlIlce = (string)dataRow["IL_ILCE"];
                    }
                item.Attributes.Add("FIRMAADI", FirmaAdi);
                item.Attributes.Add("IL_ILCE", IlIlce);
                RadComboBoxFirma.Items.Add(item);
                item.DataBind();
            }
        }
    }
开发者ID:inancakcan,项目名称:kalibrasyon,代码行数:35,代码来源:YapilanProtokollerGetAll.ascx.cs


示例8: SaveButton_Click

 private void SaveButton_Click(object sender, EventArgs e)
 {
     List<Car> a = new List<Car>();
     Car b = new Car();
     Service1Client client = new Service1Client();
     bool success = true;
     for(int i=0; i<Table1.RowCount-1; i++)
     {
         try
         {
             b.manufacturer = (string)Table1.Rows[i].Cells[0].Value;
             b.model = (string)Table1.Rows[i].Cells[1].Value;
             b.dat = DateTime.Parse((string)Table1.Rows[i].Cells[2].Value);
             string str = (string)Table1.Rows[i].Cells[3].Value;
             str = str.Replace('.', ',');
             b.volume = double.Parse(str);
             b.power = Int32.Parse((string)Table1.Rows[i].Cells[4].Value);
             b.trancemission = (string)Table1.Rows[i].Cells[5].Value;
             a.Add(b);
             b = new Car();
         }
         catch (Exception ex) { MessageBox.Show(ex.Message+" в строке "+ (i+1)); success = false; }
     }
     if (success)
         if (client.save(a.ToArray()))
             MessageBox.Show("сохранение успешно");
         else MessageBox.Show("что то пошло не так");
     else MessageBox.Show("сохранение работает только если нет ошибок в таблице");
 }
开发者ID:Mitsuder,项目名称:CarShop,代码行数:29,代码来源:Form1.cs


示例9: CreateTutoringTimeBtn_Click

        protected void CreateTutoringTimeBtn_Click(object sender, EventArgs e)
        {
            DateTime date = Calendar.SelectedDate.Date;
            string time = TimesCB.SelectedValue.ToString();
            int teacherId = securityHelper.Id;

            Service1Client client = new Service1Client();
            TutoringTime existingTt = client.GetExactTutoringTime(date, time, teacherId);
            if (existingTt == null)
            {
                int i = client.CreateTutoringTime(date, time, teacherId);

                if (i == 1)
                {
                    Response.Write("<script>alert('Tutoring time successufully created')</script>");
                }
                else
                {
                    Response.Write("<script>alert('Something went wrong. Please try again.')</script>");
                }
            }
            else
            {
                Response.Write("<script>alert('There is a tutoring time already created with the specified date and time')</script>");
            }
        }
开发者ID:cosmin71,项目名称:Online-Homework-Platform,代码行数:26,代码来源:CreateTutoringTime.aspx.cs


示例10: Main

        static void Main(string[] args)
        {
            //wcf

            IUtilsService iu = new UtilsServiceClient();
            iu.DoWork("a");

            IService1 i1 = new Service1Client();
            i1.DoWork();
            //ITestSrvice

            //CommonHelper.DES des = new CommonHelper.DES();
            //string key = des.GenerateKey();
            //string s0 = "中国软件 - csdn.net";
            //string s1 = des.EncryptString(s0, key);

            //string key1 = des.GenerateKey();

            //string s2 = des.DecryptString(s1, key);

            //var result= System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile("12345678", "MD5");

            //var ss = result == "25d55ad283aa400af464c76d713c07ad".ToUpper();

            //ThreadPool.QueueUserWorkItem(new WaitCallback(o => { Write(); }));

            //ThreadPool.QueueUserWorkItem(new WaitCallback(o => { Read(); }));

            //IUtilsService svic = new UtilsServiceClient();
            //svic.DoWork("cipher_by_randy");
            var sss = "qerqwerwqr".GetHashCode();
            var sss1 = "qerqwerwqr".GetHashCode();
            var q1 = "1".GetHashCode();
            Console.ReadLine();
        }
开发者ID:RandyCode,项目名称:MyFramework,代码行数:35,代码来源:Program.cs


示例11: Eventos

        public ActionResult Eventos(EventosModel calendario)
        {
            if (Session["User"] != null)
            {
                if (ModelState.IsValid)
                {
                    Service1Client client = new Service1Client();
                    client.addTipo_dia(calendario.descripcion);
                    List<string> fecha = splitCadenaID(calendario.Fecha);
                    calendario.Tipo_dia_id = client.getultimoid_tipodia();
                    int talento = int.Parse(Session["Talento_Humano"].ToString());

                    foreach (var item in fecha)
                    {
                        string fechas = getFecha(item);
                        client.addCalendario(talento,fechas, calendario.Tipo_dia_id);

                    }
                   client.Close();
                }
                return View();
            }
            else
            {
                return RedirectToAction("Login", "Home");
            }
        }
开发者ID:DannyelPerez,项目名称:ASKI-SISTEMA_VACACIONES,代码行数:27,代码来源:EventosController.cs


示例12: Button1_Click

        protected void Button1_Click(object sender, EventArgs e)
        {
            Service1Client ip = new Service1Client();
            int t1 = 0;
            string name = null;
            string t = TextBox1.Text;         //Stores the input string

            if (t.Trim() == "" || t.Trim() == "." || t.Trim() == "-")
            {

                RegisterStartupScript("startupScript", "<script language=JavaScript>alert('Please enter a valid ZipCode or Address');</script>");

            }
            else
            {
                string d = String.Join("", ip.GetData(name,t,t1));
                if (string.IsNullOrEmpty(d))     //If no store available
                {
                    Label4.Text = "No station available";
                    //ViewState["Acc"] = 1;
                }
                else
                {
                    Label4.Text = d;
                   // ViewState["Acc"] = 1;
                }
            }
        }
开发者ID:agupt103,项目名称:Tour-guide-application,代码行数:28,代码来源:BusForm.aspx.cs


示例13: Button2_Click

        protected void Button2_Click(object sender, EventArgs e)
        {
            int t3 = 1;

            if (Label4.Text==null)
            {
                RegisterStartupScript("startupScript", "<script language=JavaScript>alert('Please find the Bus stations first....');</script>");
            }
            Service1Client ip1 = new Service1Client();
            string t1 = TextBox1.Text;
            string t2 = TextBox2.Text;         //Stores the input string
            string d=null;
            if (t2.Trim() == "" || t2.Trim() == "." || t2.Trim() == "-")
            {
                RegisterStartupScript("startupScript", "<script language=JavaScript>alert('Please enter a valid name from the list');</script>");
            }
            else
            {
                 d = String.Join("", ip1.GetData(t2,t1,t3));
            }
            if (string.IsNullOrEmpty(d))     //If no store available
            {
                Label6.Text = "No station available";

            }
            else
            {
                Label6.Text = d;

            }
        }
开发者ID:agupt103,项目名称:Tour-guide-application,代码行数:31,代码来源:BusForm.aspx.cs


示例14: invoke_Click

 protected void invoke_Click(object sender, EventArgs e)
 {
     Service1Client s = new Service1Client();
     int send = Convert.ToInt32(tb1.Text.ToString());
     double ans = s.taxCalculator(send);
     tb2.Text = ans.ToString();
 }
开发者ID:sreeshprakash,项目名称:Web_Services,代码行数:7,代码来源:Tax.aspx.cs


示例15: JSonEvento

        public ActionResult JSonEvento()
        {
            string json = "";
            Service1Client client = new Service1Client();
            var query = client.get_eventos();

            if (query == null)
            {
                json += "{" + String.Format("\"descripcion\":\"{0}\",\"fecha\":\"{1}\"", "0", "Null") + "}";
                json = "{\"draw\": 1,\"recordsTotal\": 1,\"recordsFiltered\": 1,\"data\": [" + json + "]}";
                return Content(json);
            }
            for (int i = 0; i < query.Count(); i++)
            {
                var f = client.get_fecha_eventos(query.ElementAt(i));
                List<string> fechas = new List<string>();
                foreach (var item in f) {
                    fechas.Add(item);
                }
                string cadenaf = concatenar_fechas(fechas);
                if (!json.Equals("")) { json += ","; }
                json += "{" + String.Format("\"descripcion\":\"{0}\",\"fecha\":\"{1}\"", query.ElementAt(i), cadenaf) + "}";
            }

            json = "{\"draw\": 1,\"recordsTotal\": 1,\"recordsFiltered\": 1,\"data\": [" + json + "]}";
            return Content(json);
        }
开发者ID:DannyelPerez,项目名称:ASKI-SISTEMA_VACACIONES,代码行数:27,代码来源:EventosController.cs


示例16: CheckPvMessage

 void CheckPvMessage()
 {
     if (Context.User.Identity.IsAuthenticated)
     {
         using (Service1Client proxy = new Service1Client())
         {
             try
             {
                 Guid UserId = proxy.UserNamedenUserIdDon(Context.User.Identity.Name);
                 //Guid UserId = proxy.UserNamedenUserIdDon("hhhhhhhhhhh");
                 List<kal_RecievedPvMessages_Result> OkunmamisMesajlar = proxy.OkunmamisPvtMesajlariDon(UserId).ToList();
                 if (OkunmamisMesajlar.Count > 0)
                 {
                     imgMsgOkunmamis.Visible = true;
                     imgMsgOkunmamis.ToolTip = OkunmamisMesajlar.Count.ToString() + " adet okunmamış özel mesajınız var";
                     lblMessageUyari.Text = OkunmamisMesajlar.Count + " adet  mesajınız var.";
                     string url = HttpContext.Current.Request.Url.AbsoluteUri;
                     if (url.IndexOf("OzelMesajOku") == -1)
                     {
                         RadNotification1.Text = " <font color='red'>" + OkunmamisMesajlar.Count.ToString() + " adet okunmamış özel mesajınız var.<br>Mesajlarınızı online kullanıcılar kısmının hemen üzerinde yer alan özel mesajlarım linkine tıklayarak okuyabilirsiniz." + "</font>";
                         RadNotification1.Show();
                     }
                 }
             }
             catch (CommunicationException e)
             {
                 proxy.Abort();
             }
         }
     }
 }
开发者ID:inancakcan,项目名称:kalibrasyon,代码行数:31,代码来源:CheckPvMessage.ascx.cs


示例17: Main

 static void Main(string[] args)
 {
     var client = new Service1Client();
     var a = client.GetData(43);
     Console.WriteLine(a);
     Console.ReadLine();
 }
开发者ID:ajinkya1221,项目名称:HelloWcf,代码行数:7,代码来源:Program.cs


示例18: ConvidarEvento

		public ConvidarEvento()
		{
			InitializeComponent();
			ws = new Service1Client();
			ws.EventoAbrirCompleted += Ws_EventoAbrirCompleted;
			ws.EventoConvidarParticipanteCompleted += Ws_EventoConvidarParticipanteCompleted;
		}
开发者ID:Marcos1994,项目名称:InterfacesRicas,代码行数:7,代码来源:ConvidarEvento.xaml.cs


示例19: grdFaturaTarihce_ItemDataBound

    protected void grdFaturaTarihce_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridDataItem)
        {
            GridDataItem dataItem = e.Item as GridDataItem;

            using (Service1Client proxy = new Service1Client())
            {
                if (!proxy.IstIdDahaOnceBolunmusBirFaturaKapsaminaAlinmimi(int.Parse(dataItem["ISTID"].Text)))
                {
                    dataItem["Cikart"].Enabled = false;
                    dataItem["Cikart"].ToolTip = "Bölünmüş fatura kapsamında değil. Çıkartma işlemi yapılamaz!";
                }
            }

            if (dataItem["EkBolgemi"].Text == "False")
            {
                dataItem["EkBolgemi"].BackColor = System.Drawing.Color.Bisque;
                dataItem["EkBolgemi"].Text = "Hayır";
                dataItem["EkBolgemi"].ToolTip = "Ek bölge değil";
            }
            if (dataItem["EkBolgemi"].Text == "True")
            {
                dataItem["EkBolgemi"].BackColor = System.Drawing.Color.LightSalmon;
                dataItem["EkBolgemi"].Text = "Evet";
                dataItem["EkBolgemi"].ToolTip = "Ek bölge";
            }
            //dataItem["PAKETNOID"].ForeColor = System.Drawing.Color.Red;
        }
    }
开发者ID:inancakcan,项目名称:kalibrasyon,代码行数:30,代码来源:MasrafInceleme.aspx.cs


示例20: ach_Click

        protected void ach_Click(object sender, EventArgs e)
        {
            int compostAchievemetn = Convert.ToInt32(txtVan.Text);
            int showPowAchievement = Convert.ToInt32(txtTruck.Text);
            int teleAchievement = Convert.ToInt32(txtBus.Text);
            int forestSaverAch = Convert.ToInt32(TextBox2.Text);
            int cruisAch = Convert.ToInt32(TextBox3.Text);
            int profid = Convert.ToInt32(Session["id"]);

            int addCompost = Convert.ToInt32(compost.Text);
            int sumCompost = addCompost + compostAchievemetn;
            int addShowPow = Convert.ToInt32(shower.Text);
            int sumShowPow = showPowAchievement + addShowPow;
            int addTele = Convert.ToInt32(telecommute.Text);
            int sumTele = teleAchievement + addTele;
            int addForest = Convert.ToInt32(forest.Text);
            int sumForest = forestSaverAch + addForest;
            int addCruis = Convert.ToInt32(cruise.Text);
            int sumCruise = cruisAch + addCruis;

            Service1Client datamine = new Service1Client();
            datamine.updateAchievements(profid, 2212, sumCompost.ToString());
            datamine.updateAchievements(profid, 3234, sumShowPow.ToString());
            datamine.updateAchievements(profid, 3333, sumTele.ToString());
            datamine.updateAchievements(profid, 6666, sumForest.ToString());
            datamine.updateAchievements(profid, 7777, sumCruise.ToString());
            Response.Redirect("~/Pages/UserPage.aspx#Link2");
        }
开发者ID:IST421,项目名称:GreenLiving,代码行数:28,代码来源:UserPage.aspx.cs



注:本文中的Service1Client类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ServiceCallOptions类代码示例发布时间:2022-05-24
下一篇:
C# Service类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap