Posts by Cezar • 816 points
32 posts
-
-4
votes2
answers181
viewsA: Return a similar path value
Use a class like this: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication2 { public class Dir { public string DirPath { get; private…
-
0
votes1
answer1603
viewsA: Error while listing Data via Json
The Proxycreationenabled is enabled, put a line so it will work: db.Configuration.ProxyCreationEnabled = false; Total example: public ActionResult GetDados() { int codigoVenda = 2; try {…
-
0
votes3
answers1208
viewsA: How to use ng-class conditional in Angularjs?
Example: I made a decision here ng-class="$index%2==0?'css2':'css1'": var app = angular.module("app", []); app.controller("ctrl", function($scope) { $scope.list = [ {'Id': 1,'Name': 'Nome 1'},…
-
0
votes2
answers690
viewsA: How to get the data typed in the Textbox that was created dynamically?
As reported in your comment with Request.Form you can recover, but it’s not the right way for features like this, use components like Repeater that are lightweight and can bring much more…
-
0
votes2
answers322
viewsA: Read document array of word bytes in browser
To work the document display in your browser is through the plugin, as with your PDF. There is one to google Chrome Office Editing for Docs, Sheets & Slides .…
-
1
votes1
answer94
viewsA: Make changes to a website developed in Laravel 4.2
You will create a model (Eloquent) with all settings relevant to the table that refers to your model. Example <?php class Log extends Eloquent { public $table = 'logs'; public $primaryKey = 'id';…
-
4
votes2
answers2945
viewsA: Popular a table with form data in Angularjs
You did it wrong, but from what I understand you want to record a list of students, deciding whether or not he was approved by the average. Study the angular in a progressive way, that gradually you…
-
2
votes3
answers533
views -
1
votes1
answer718
viewsA: How to convert an Array of Bytes to a Direct Image in Listview?
Base class for the two examples: namespace Img.Db { using System; using System.Collections.Generic; public partial class Imagens { public int Id { get; set; } public byte[] Imagem { get; set; }…
-
0
votes1
answer373
viewsA: Problems with Lambda and Datetime consultation
Use Dbfunctions, with the method Truncatetime: Regardless of the Time you want to pick up all the dates before the reported period and must inform the Entity Framework you only want for the date (I…
-
1
votes1
answer390
viewsA: Routes Laravel / Angular $routeProvider
David, Your conception is wrong. The routes created in Laravel (PHP Framework) has nothing to do with the routes created with Angularjs (Javascript Framework), already established communication…
-
2
votes1
answer3589
viewsA: How to assemble a page for printing within the application code?
Create a form with a button to execute the creation and printing procedure on your report screen: When clicking the button make the following code: private void BtnImprimir_Click(object sender,…
-
5
votes1
answer1780
viewsA: 'Copy text' button in C#
Use Clipboard: private void BtnCsharp_Click(object sender, EventArgs e) { Clipboard.SetText(((Button)sender).Text); //ou //Clipboard.SetText(BtnCsharp.Text); } If it is a contentious fixed in your…
-
1
votes1
answer409
viewsA: ASP.NET MVC: Automapper and Nhibernate
Examples: There are two ways and it’s them: 1) First form In these two People and Phone classes (1 person can have multiple phones), public class People { public People() { Phone = new…
-
0
votes1
answer116
viewsA: Custom Element Web Forms
Create a User Control as follows: Click on your project and add a new image item below: After you put your name he will open one design and a code concerning this UserControl and you can add the…
-
1
votes2
answers874
viewsA: I can’t update a reference
In the error itself is saying that the versão 4.0.0.1 of Operador.Infrastructure.Data is greater than System.Web.Mvc 4.0.0.0. You can only have one of these references in your project. Really…
-
0
votes1
answer69
viewsA: Codeigniter config set_item
The value is assigned dynamically (a value can be created or the value loaded changed), and its value will only be present within that request. It does not change the file originial nor its values…
codeigniteranswered Cezar 816 -
0
votes2
answers2151
viewsA: How to shift the focus from one Textbox to the next?
Code: private void textBox1_KeyUp(object sender, KeyEventArgs e) { if (textBox1.Text.Length == 2) { SendKeys.Send("{Tab}"); } } Reference: Control.Keyup Event…
-
0
votes2
answers478
viewsA: Hybrid Web Application (MVC and Web API)
I don’t see a problem with working together, and that won’t lead to poor performance. But everything in systems development has to be analyzed in depth, if it is a large MVC project with a diversity…
-
3
votes3
answers9903
viewsA: Get the last N characters from a string
If it’s in that format: string telefone = "+55 34 98989898"; Console.WriteLine(telefone.Substring(telefone.Length - 8)); Link to the Demo…
-
0
votes3
answers3309
viewsA: Generate PDF with Asp.Net MVC
When we work with development . NET (although most today have it) has a package repository that is called in the world . NET NUGET. There are several, I would recommend this: Razorpdf for MVC -…
-
1
votes1
answer61
viewsA: Load view by parameter
By answering the question : How to send 2 objects from Controller to View in C# ASP.NET MVC?, do the following In his controller: public ActionResult View() { ViewBag.Parametro = 1; return View(); }…
-
3
votes1
answer1323
viewsA: Read XML attribute
Try it like this: echo $xmlsimple->attributes()['versao']; Source: php.net The Simplexmlelement class…
-
4
votes3
answers17415
viewsA: Mysql field type change
Create a backup table and save a copy of the current data which can be only the primary key and the situation field. Because, if any inconvenience happens you have a backup of the current data. Put…
-
0
votes2
answers206
viewsA: Mysqli multi_query INSERT + insert_id multiples tables autoincrement + Foreign key
An example you can translate for your project: Diagram of the two tables (product and items) Source Code Code 1: (I would indicate that code) <?php $con = new mysqli('localhost', 'root', 'senha',…
-
2
votes2
answers141
viewsA: Error while trying to pass an ordered collection to a View
These two forms as example below are correct: @Html.DropDownList("TituloDeCortesia", String.Empty) @Html.DropDownList("TituloDeCortesia", (SelectList)ViewBag.TituloDeCortesia) That is, your code is…
-
3
votes5
answers446
viewsA: How can I capture a favicon from a site via PHP?
In a half-manual way I could see by the attribute rel="shortcut icon", that is to say, I caught everyone who is tag link ($dom->getElementsByTagName('link');) and then I check your attribute rel…
-
9
votes3
answers6925
viewsA: How to send 2 Controller objects to the View in C#?
You can send via Viewbag, Viewdata or make a class that contains the information (list, item) to be consumed in your View (ViewModel) You can use any of the 3 correctly, for example, load a…
-
3
votes2
answers422
viewsA: Correct use of Laravel Mutators 5.1. Is it possible to use it in this way described below?
You must create a $appends in his model (Eloquent) following an example given by the website Laravel. Create an item within your model this way protected $appends = ['is_admin']; Now create your…
-
2
votes2
answers676
viewsA: HTML element inside an Actionlink
You can create an extension method in your Htmlhelper and format your element the way you need it! What an extension of Taghelper would look like: namespace System.Web.Mvc { public static class…
-
10
votes2
answers1211
viewsA: What is the difference between using (int)variable or Convert.Toint32(variable)?
The (int)variável is a cast, that in the case of your question will not work for String (string), giving this error message: CS0030 Cannot Convert type 'string' to 'double' In case you can use the…
-
2
votes2
answers3335
viewsA: Select with angular loading blank value
I believe something is missing in your javascript (angular) to work. Example: var app = angular.module("app", []); app.controller("ctrl", function($scope) { $scope.id = {'id': 1}; $scope.list = […