protected void cargarGV1() { Service1 webservice = new Service1(); DataTable dbResultado = webservice.Querry("Select * from CEPUBLICACIONES"); GridView1.DataSource = dbResultado; GridView1.DataBind(); }
protected void Button1_Click(object sender, EventArgs e) { localhost.Service1 ws = new Service1(); ws.verLibros(); GridView1.DataSource = ws.verLibros(); GridView1.DataBind(); }
protected void Submitter_Click(object sender, EventArgs e) { Service1 retrive = new Service1(); retrive.fnlName(fname.Text.ToString(),lname.Text.ToString()); Response.Redirect("~/t1.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { String uname = name.Value; String pas = pass.Value; try { String val = ""; Service1 ser=new Service1(); val = ser.Login(uname, pas); val = "True"; if(val.Contains("True")) { Session["Name"] = uname; Response.Redirect("Default.aspx"); } else { Response.Write("Login Failed ... ! Please Check your Usename and password..!"); } } catch (Exception e1) { Console.WriteLine("Error" + e1.ToString()); } }
static GS() { petDatas = null; playerID = -100; petDetails = null; service = new Service1(); }
private void Main_Load(object sender, EventArgs e) { Service1 insConsultar = new Service1(); DataTable películas = new DataTable(); películas = insConsultar.ConsultarPelículas(-1, ""); GVPelículas.DataSource = películas; }
public void Service1_GetDataUsingDataContract_ExceptionThrownWhenCompositeTypeNull() { // Arrange Wcf.Service1 service = new Service1(); // Act var result = service.GetDataUsingDataContract(null); }
protected void Button1_Click(object sender, EventArgs e) { int number = int.Parse(TextBox1.Text); var command = new Command {Id = number}; var service = new Service1(); var result = service.Process(command); Label1.Text = Enum.GetName(typeof (ErrorCodes), result); }
public IndexModel( Service1 service1, Service2 service2, IService3 service3, ILogger <IndexModel> logger) { _service1 = service1; _service2 = service2; _service3 = service3; _logger = logger; }
public void SetConfing(Service1.Configurations config) { HomeDomain = config.DomainName; AuthDisabled = !config.IsAuthorizationEnabled; ActiveDirectoryMode = config.IsActiveDirectoryUsersEnabled; ActiveDirectoryGroup = config.ActiveDirectoryUsersGroup; EnableTracing = config.IsTracingEnabled; TracingPath = config.TracingFileName; oldConfig = config; }
public void GetAllStudentsTest() { // Arrange Service1 sClient = new Service1(); // Act sClient.GetAllStudents(); // Assert Assert.AreEqual(2, sClient.GetAllStudents().Count); }
public void FindStudentTest() { // Arrange Service1 sClient = new Service1(); // Act var s1 = sClient.AddStudent("Lasse", "J105", "3F", "240995-XXXX"); var foundStudent = sClient.FindStudent("240995-XXXX"); // Assert Assert.AreEqual("Lasse", foundStudent.StudentName); }
public Request_a_reply_for_a_single_message() { Website1.Registry.Channel(x => x.Service1) .AcceptsMessage <OneMessage>(); Service1.Handles <OneMessage>() .Raises <TwoMessage>(); Website1.Requests <OneMessage>("original request") .ExpectReply <TwoMessage>().From(Service1); }
public ClienteLogado(Cliente EntCliente) { Service = new Service1(); this.EntCliente = new Cliente(); this.EntContrato = new Contrato(); this.EntCliente = EntCliente; InitializeComponent(); }
public GUIAluno() { InitializeComponent(); servico = new Service1(); CarregarListView(); //Faz com que as colunas da List View ocupem o espaço que precisar sem cortar listViewAluno.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); listViewAluno.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); }
public void getMyEmailTest() { //Arrange var service1 = new Service1(); //act string email = service1.getMyEmail(); //Assert Assert.AreEqual("*****@*****.**", email); }
public void GetNameTest() { //arrange var service1 = new Service1(); //act string name = service1.GetName(); //assert Assert.AreEqual("Allan", name); }
public void ItShouldCreateTheFirstFactoredService() { // Arrange string expectedExtraData = Guid.NewGuid().ToString(); // Act Service1 actual = Context.GetService <Service1>(expectedExtraData); // Assert actual.Should().NotBeNull(); }
public void Add_WeaveTest1() { Service1 s1 = new Service1(); Service2 s2 = new Service2(); ew.Add(s1); ew.Add(s2); s1.Trigger(); Assert.AreEqual(1, s2.EventCount); }
//Construtor Padrão public GUIEnsino() { InitializeComponent(); servico = new Service1(); //Já abre o form jogando a Consulta na List View CarregarListView(); //Faz com que as colunas da List View ocupem o espaço que precisar sem cortar listViewEnsinos.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); listViewEnsinos.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); }
public void GetMyNameTest() { //arrange var service1 = new Service1(); //act string navn = service1.GetMyName(); //assert Assert.AreEqual("Martin", navn); }
static void Main(string[] args) { Service1 service = new Service1(); Console.WriteLine("Volume: 1*2*5 "); Console.WriteLine(service.GetVolume(1, 2, 5)); Console.WriteLine("/n"); Console.WriteLine("Missing side: 20/(2*2) "); Console.WriteLine(service.GetSide(20, 2, 2)); Console.ReadLine(); }
public void TestCacheWithImplicitName() { Assert.AreEqual(0, cache1.Hits); Assert.AreEqual(0, cache1.Misses); var service = new Service1(); var result = service.MethodToCache1(); Assert.AreEqual(0, cache1.Hits); Assert.AreEqual(2, cache1.Misses); }
public void TestKeyGenerationLambdaFromStaticField() { const double doubleVal = 5.0; TestObj.StaticDoubleField = doubleVal; var service = new Service1(); Action cachedAction = () => service.MethodToCache1(TestObj.StaticDoubleField); Func <string> cacheKeyGetter = () => CacheKey.GetKey((Service1 s) => s.MethodToCache1(TestObj.StaticDoubleField)); AssertCacheWithClear(cache1, cachedAction, cacheKeyGetter); }
public void GetMyEmailTest() { //arrange var service1 = new Service1(); //act string email = service1.GetMyEmail(); //assert Assert.AreEqual("*****@*****.**", email); }
public void GetPrisTest() { // Arrange Service1 b1 = new Service1(); int expectedResult = 240; // Act var actualResult = b1.GetPrisBil(); // Assert Assert.AreEqual(expectedResult, actualResult); }
public void GetAllTemperaturesTest() { // Arrange Service1 svc1 = new Service1(); // Act var mTemperatures = svc1.GetAllTemperatures().ToList(); var count = mTemperatures.Count; // Assert Assert.AreEqual(40, count); }
public void KøretøjForBilTest() { // Arrange Service1 b2 = new Service1(); string expectedResult = "Bil"; // Act var actualResult = b2.GetBil(); // Assert Assert.AreEqual(expectedResult, actualResult); }
public void PrisForMCTest() { // Arrange Service1 mc1 = new Service1(); int expectedResult = 125; // Act var actualResult = mc1.GetPrisMC(); // Assert Assert.AreEqual(expectedResult, actualResult); }
public void AddRequestNull() { string ProjectName = "Test"; var service = new Service1(); bool expected = true; Service1.Request req = new Service1.Request { ProjectName = "Test" }; service.AddRequest(req); Assert.AreEqual(expected, service.MoreThanNull); }
public void GetAllInfoTest_ersamme() //tester listen { //arrange Service1 minService1 = new Service1(); //service henter en liste //act var minliste = minService1.GetAllInfo(); //Assert Assert.AreSame(minliste, minService1.GetAllInfo()); }
public void GetSideTest_VolumeZero() { //arrange Service1 service = new Service1(); double expected = 0.0; //act double actual = service.GetSide(0, 3, 3); //assert Assert.AreEqual(expected, actual); }
public void AddCompetitionNull() { string Name = "Test"; var service = new Service1(); bool expected = true; Service1.Competition comp = new Service1.Competition { Name = "Test" }; service.AddCompetition(comp); Assert.AreEqual(expected, service.MoreThanNull); }
public void GetVolumeTest_NormalNumbers() { //arrange Service1 service = new Service1(); double expected = 100.0; //act double actual = service.GetVolume(5, 5, 4); //assert Assert.AreEqual(expected, actual); }
public void GetVolumeTest_OneZero() { //arrange Service1 service = new Service1(); double expected = 0; //act double actual = service.GetVolume(5, 5, 0); //assert Assert.AreEqual(expected, actual); }
protected void Page_Load(object sender, EventArgs e) { Service1 service = new Service1(); string datos = service.ListarHabitacion(); XmlSerializer ser = new XmlSerializer(typeof(Modelo.HabitacionCollection)); StringReader reader = new StringReader(datos); Modelo.HabitacionCollection listaHabitacion = (Modelo.HabitacionCollection)ser.Deserialize(reader); reader.Close(); gvHabitacion.DataSource = listaHabitacion; gvHabitacion.DataBind(); }
private void button2_Click(object sender, EventArgs e) { try { Service1 webservice = new Service1(); MessageBox.Show(webservice.AppointmentPlugin()); webservice.Dispose(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public void TestKeyGenerationLambdaFromProperty() { const double doubleVal = 5.0; var testObject = new TestObj { DoubleProperty = doubleVal }; var service = new Service1(); Action cachedAction = () => service.MethodToCache1(testObject.DoubleProperty); Func <string> cacheKeyGetter = () => CacheKey.GetKey((Service1 s) => s.MethodToCache1(testObject.DoubleProperty)); AssertCacheWithClear(cache1, cachedAction, cacheKeyGetter); }
public void GetSideTest_NormalNumbers() { //arrange Service1 service = new Service1(); double expected = 3.0; //act double actual = service.GetSide(27, 3, 3); //assert Assert.AreEqual(expected, actual); }
public Send_a_single_message_to_the_correct_node() { Website1.Registry.Channel(x => x.Service1) .AcceptsMessage <OneMessage>(); Service1.Handles <OneMessage>(); Service2.Handles <OneMessage>(); Service3.Handles <OneMessage>(); Website1.Sends <OneMessage>("first message").ShouldBeReceivedBy(Service1); }
protected void btnSubmitRegister_Click(object sender, EventArgs e) { string theUser = txtUserName.Text.Trim(); string thePass = txtPassword.Text.Trim(); string thePassConfirmation = txtPasswordConfirmation.Text.Trim(); string first = txtFirstName.Text.Trim(); string last = txtLastName.Text.Trim(); string email = txtEmailAddress.Text.Trim(); string city = txtCity.Text.Trim(); string state = txtState.Text.Trim(); string country = txtCountry.Text.Trim(); string telephone = txtTelephoneNumber.Text.Trim(); Service1 retrieve = new Service1(); Service1Client datamine = new Service1Client(); if (validationcheck(theUser, thePass, thePassConfirmation, email, telephone) == true) { //string newPass = passHash(thePass); retrieve.userRegister(theUser, thePass, first, last, email, city, state, country, telephone); int profid = datamine.getprofileID(theUser); Session["user"] = theUser; Session["id"] = profid; MailMessage mail = new MailMessage(); mail.To.Add(email); mail.From = new MailAddress("*****@*****.**"); mail.Subject = "Welcome!" + first; mail.Body = "Hello!"; mail.IsBodyHtml = true; SmtpClient smtp = new SmtpClient(); smtp.Host = "smtp.gmail.com"; smtp.Port = 587; smtp.Credentials = new System.Net.NetworkCredential ("*****@*****.**", "421Team3Joe"); smtp.EnableSsl = true; smtp.Send(mail); datamine.createuserAchievements(profid, 1121, "0"); datamine.createuserAchievements(profid, 2212, "0"); datamine.createuserAchievements(profid, 3234, "0"); datamine.createuserAchievements(profid, 3333, "0"); datamine.createuserAchievements(profid, 4444, "0"); datamine.createuserAchievements(profid, 5555, "0"); datamine.createuserAchievements(profid, 6666, "0"); datamine.createuserAchievements(profid, 7777, "0"); datamine.createuserAchievements(profid, 8888, "0"); datamine.createuserAchievements(profid, 9999, "0"); Response.Redirect("~/Pages/UserPage.aspx#Link1"); } }
public RootClass(Service1 service1, Service2 service2, string stringProperty, int intProperty) { if (service1 == null) throw new ArgumentNullException("service1"); if (service2 == null) throw new ArgumentNullException("service2"); this.service1 = service1; this.service2 = service2; StringProperty = stringProperty; IntProperty = intProperty; }
protected void Button2_Click(object sender, EventArgs e) { String[] ret = new String[300]; Service1 ser = new Service1(); ret=ser.run(); Label1.Text = "Executing .. "; Thread.Sleep(2000); Label1.Text = " "; foreach (String t in ret) { Label1.Text += (t+"\n"); } }
public void GetMedal(string fStr) { medals = new List<Medal>(); string[] lMedal = fStr.Split('|'); Service1 ser = new Service1(); foreach(string str in lMedal) { string rs = ser.GetMedal(int.Parse(str)); Medal tMedal = new Medal(); tMedal.SetData(rs); medals.Add(tMedal); } }
//ITennis TennisService; public Page() { InitializeComponent(); PlayerListBox.ItemsSource = Player.GetList(); BasicHttpBinding basicHttpBinding = new BasicHttpBinding(); EndpointAddress endpointAddress = new EndpointAddress("http://localhost/TennisWCF/Tennis.svc"); TennisService = new ChannelFactory<Service1>(basicHttpBinding, endpointAddress).CreateChannel(); //TennisService = new TennisClient(); //TennisService.BeginGetData(5,GetDataCallback,null); }
protected void submit(object sender, EventArgs e) { //com.fidestin.core.Service1 wsFidestin = new com.fidestin.core.Service1(); Service1 wsFidestin = new Service1(); int userID = wsFidestin.CheckLogon(this.emailB.Text, passwordB.Text); if (userID > 0) { Session["userID"] = userID; Response.Redirect("storelist.aspx"); } }
private void Page_Load(object sender, System.EventArgs e) { myService = new Service1(); AuthenticationToken header = new AuthenticationToken(); if (ViewState["AuthenticationTokenHeader"] != null) { header.InnerToken = (Guid)ViewState["AuthenticationTokenHeader"]; } else { header.InnerToken = Guid.Empty; } myService.AuthenticationTokenValue = header; }
private void Consultar_Click(object sender, EventArgs e) { int código; string nombre; try { código = Convert.ToInt32(TBCódigo.Text); } catch (Exception) { código = -1; } nombre = TBNombre.Text; Service1 insConsultar = new Service1(); DataTable películas = new DataTable(); películas = insConsultar.ConsultarPelículas(código, nombre); GVPelículas.DataSource = películas; }
public void SetSkill() { Service1 ser = new Service1(); int[] moves = ser.GetListMovement(petID); foreach(int move in moves) { string str = ""; str = ser.GetMovement(move); Skill tSkill = new Skill(); tSkill.SetData(str); lSkill.Add(tSkill); } }
static void Main(string[] args) { Service1 s = new Service1(); //List<GraphCoOrdinate> gcord; //GraphCoOrdinate gco; //gcord=s.GetDiseasePrevalance("Thyroid"); //foreach (GraphCoOrdinate a in gcord) { // gco = a; // Console.Write(a.item, a.value); //} Console.WriteLine(s.getgpid()); Console.Read(); }
public void Service1_GetDataUsingDataContract_CompositTypeBoolValueFalse_DoNotAppendSuffix() { // Arrange Wcf.Service1 service = new Service1(); string testString = "Test"; CompositeType ct = new CompositeType() { BoolValue = false, StringValue = testString }; // Act var result = service.GetDataUsingDataContract(ct); // Assert Assert.AreEqual(testString, result.StringValue); }
private void BAlquilar_Click(object sender, EventArgs e) { int cliente, película; // Chequeos if (int.TryParse(TBCódigoCliente.Text, out cliente) && int.TryParse(TBCódigoPelícula.Text, out película)) { Service1 service = new Service1(); try { service.RegistrarAlquiler(película, cliente); MessageBox.Show("El alquiler se efectuó correctamente el pedido llega a su casa"); } catch (Exception ex) { MessageBox.Show(ex.Message); } } }
public void Add_WeaveDelegateTest() { int called = 0; Service1 s1 = new Service1(); ew.Add(s1); ew.Add( new EventHandler(delegate(object o, EventArgs e) { ++called; } )); s1.Trigger(); Assert.AreEqual(1, called); }
public void Service1_GetDataUsingDataContract_CompositTypeBoolValueTrue_AppendSuffix() { // Arrange Wcf.Service1 service = new Service1(); string testString = "Test"; CompositeType ct = new CompositeType() { BoolValue = true, StringValue = testString }; var expected = testString + "Suffix"; // Act var result = service.GetDataUsingDataContract(ct); // Assert Assert.AreEqual(expected, result.StringValue); }
public void CreateNewPet() { string sendStr = ""; sendStr += GS.playerID.ToString() + '_'; sendStr += curPetDetails[selectingPet].typeName + '_'; sendStr += curPetDetails[selectingPet].id.ToString() + '_'; sendStr += "1" + '_'; sendStr += "1" + '_'; sendStr += "200" + '_'; sendStr += "200" + '_'; sendStr += "400" + '_'; sendStr += "400" + '_'; sendStr += "10" + '_'; sendStr += "0" + '_'; Service1 ser = new Service1(); ser.CreateNewPet(sendStr); GS.GetPetData(); }
public void ServiceManager_Test01() { PropertyOwner propertyOwner = new PropertyOwner(); Service1 s1 = new Service1(); bool added = false; bool removed = false; ServiceManager.AdviseServiceAdded<IService1>(propertyOwner, null, s => { added = true; }); // Verify notifications not sent out when advising added.Should().BeFalse(); // Verify notifications not sent out after adding other service ServiceManager.AddService<Service1>(s1, propertyOwner, null); added.Should().BeFalse(); // Verify added notification sent out after adding this service ServiceManager.AddService<IService1>(s1, propertyOwner, null); added.Should().BeTrue(); added = false; ServiceManager.AdviseServiceRemoved<IService1>(propertyOwner, null, s => { removed = true; }); // Verify notifications not sent out after removing other service ServiceManager.RemoveService<Service1>(propertyOwner); removed.Should().BeFalse(); // Verify removed notification sent out after adding this service ServiceManager.RemoveService<IService1>(propertyOwner); removed.Should().BeTrue(); // Verify we aren't still listening to advised events ServiceManager.AddService<IService1>(s1, propertyOwner, null); added.Should().BeFalse(); // Verify notification sent out when advising to existing service ServiceManager.AdviseServiceAdded<IService1>(propertyOwner, null, s => { added = true; }); added.Should().BeTrue(); }
private void BAlquilar_Click(object sender, EventArgs e) { int cliente, película; // Chequeos try { cliente = Convert.ToInt32(TBCódigoCliente.Text); } catch { cliente = -1; } try { película = Convert.ToInt32(TBCódigoPelícula.Text); } catch (Exception) { MessageBox.Show("Se debe seleccionar la película"); return; } Service1 service = new Service1(); try { service.RegistrarVenta(película, cliente); MessageBox.Show("La compra se ha registrado correctamente pronto entregaremos su pedido"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
protected void Button1_Click(object sender, EventArgs e) { String[] ret=new String[300]; try { Text_Field= ta.Value; if (Text_Field.Length <= 0) { Label1.Text="Code Please .. !"; } else{ String[] err = new String[200]; Service1 ser = new Service1(); ret=ser.Compile(Text_Field,Login_Name); StringBuilder sw = new StringBuilder(); sw.Append(err); if (ret.Length > 0) { foreach (String t in ret) { Label1.Text += t; } } else { run.Visible = true; } } } catch (Exception e1) { Label1.Text = e1.ToString(); } }
public Disposable1(Service1 service1, Disposable3 disposable3) { this.service1 = service1; this.disposable3 = disposable3; }
public RootClass(Service1 service1, Service2 service2) : this(service1, service2, "DEFAULT", 1976) { }