how to validate that a name entered using mvc doesn't exist in database - asp.net-mvc

i am using sql server which is case sensitive. How can i convert the data so that it may be validated without being case sensitive
CODE:-
using (var kk = new TeamRepository(context))
{
var data = new Team();
var find = kk.GetAll().ToString();
if (find.Any(x => x.TeamName == apview.TeamName))
{
return false;
}
else
{
var _pointrepo = new PointsRepositotry(context);
if (image != null)
{
apview.ImageMimeType = image.ContentType;
apview.TeamLogo = new byte[image.ContentLength];
image.InputStream.Read(apview.TeamLogo, 0, image.ContentLength);
}
data.TeamLogo = apview.TeamLogo;
data.TeamName = apview.TeamName;
data.TeamEmail = apview.TeamEmail;
data.Contact_Number = apview.ContactNumber;
data.TeamNickName = apview.TeamNickName;
data.YearEstablished = apview.YearEstablished;
var points = new Points();
points.TeamName = apview.TeamName;
data.ImageMimeType = apview.ImageMimeType;
return kk.Insert(data);
//_pointrepo.Insert(points);
}

you can use ToLower
find.Any(x => x.TeamName.ToLower() == apview.TeamName.ToLower())
https://msdn.microsoft.com/en-us/library/e78f86at%28v=vs.110%29.aspx

Related

how to save list of data in memory?

I have an ajax function which is called by the jquery-datatable and ve two responsibility.
To get data from the database.
To serve the search, sort, pagination like functional work.
Now all I need is I just wanna get data once and save it in memory so that when user type something in the search box it performs the search from stored data directly.
Here the code.
public ActionResult AjaxOil(JQueryDataTableParamModel param)
{
//To get data and should be run only once.
IEnumerable<Oil> allOils = _context.Oils.ToList();
//All others function.
IEnumerable<Oil> filteredOils;
if (!string.IsNullOrEmpty(param.sSearch))
{
filteredOils = allOils
.Where(c => c.CommonName.Contains(param.sSearch)
||
c.BotanicalName.Contains(param.sSearch)
||
c.PlantParts.Contains(param.sSearch)
||
c.Distillation.Contains(param.sSearch));
}
else
{
filteredOils = allOils;
}
var sortColumnIndex = Convert.ToInt32(Request["iSortCol_0"]);
Func<Oil, string> orderingFunction = (c => sortColumnIndex == 1 ? c.CommonName :
sortColumnIndex == 2 ? c.BotanicalName :
c.PlantParts);
var distillationFilter = Convert.ToString(Request["sSearch_4"]);
var commonFilter = Convert.ToString(Request["sSearch_1"]);
var botanicalFilter = Convert.ToString(Request["sSearch_2"]);
var plantFilter = Convert.ToString(Request["sSearch_3"]);
if (!string.IsNullOrEmpty(commonFilter))
{
filteredOils = filteredOils.Where(c => c.CommonName.Contains(commonFilter));
}
if (!string.IsNullOrEmpty(botanicalFilter))
{
filteredOils = filteredOils.Where(c => c.BotanicalName.Contains(botanicalFilter));
}
if (!string.IsNullOrEmpty(plantFilter))
{
filteredOils = filteredOils.Where(c => c.PlantParts.Contains(plantFilter));
}
if (!string.IsNullOrEmpty(distillationFilter))
{
filteredOils = filteredOils.Where(c => c.Distillation.Contains(distillationFilter));
}
var sortDirection = Request["sSortDir_0"];
if (sortDirection == "asc")
filteredOils = filteredOils.OrderBy(orderingFunction);
else
filteredOils = filteredOils.OrderByDescending(orderingFunction);
var displayedOils = filteredOils
.Skip(param.iDisplayStart)
.Take(param.iDisplayLength);
var result = from c in displayedOils
select new[] { Convert.ToString(c.OilId), c.CommonName, c.BotanicalName, c.PlantParts, c.Distillation };
return Json(new
{
sEcho = param.sEcho,
iTotalRecords = allOils.Count(),
iTotalDisplayRecords = filteredOils.Count(),
aaData = result
},
JsonRequestBehavior.AllowGet);
On first load save the data in cache/session/static field. On next search check if the cache/session/static field is not null and read from there, not from db, else take again from db..
Example:
private static ObjectCache _cache = new MemoryCache("MemoryCache");
public List<Oils> GetDataFromCache(string keyName)
{
//private static ObjectCache _cache = new MemoryCache("keyName");
var data = _cache.Get(keyName);
if (data != null) return data as List<Oils>;
data = _context.Oils.ToList();
//keep the cache for 2h
_cache.Add(keyName, data, DateTimeOffset.Now.AddHours(2));
return data;
}
(didn't test the code, but that's the logic) or you can use Session if you prefer
Session example:
if(Session["Data_Oils"] != null) { return Session["Data_Oils"] as List<Oils; } else { var temp = _context.Oils.ToList(); Session["Data_Oils"] = temp; return temp; }

How to speed up ASP.NET MVC Excel file upload data validation against a stored procedure

I have an ASP.NET MVC application that uploads an Excel file with items that need to be validated against a stored procedure. This process works well if the Excel file has a few records, but now if I have more than over a hundred lines, it's very slow to validate.
Is there a way I can speed up his process somehow? Basically I write the data from the Excel file to a SQL Server database where I validate the data against a stored procedure. When I have about 50 records, it executes faster, as soon as I have over 100, it's very slow. Please see my code below and advise.
public ActionResult ValidateClaims()
{
var domainNameOfficial = Session["domainName"];
int sessionIdentifier = (int)Session["sessionID"];
var claimsRecords = db.CleanSupplierClaims.Where(x => x.CleanSupplierClaimsUploadSessionID == sessionIdentifier).ToList();
List<CleanSupplierClaim> supplierClaimsData = claimsRecords; //(List<CleanSupplierClaim>)TempData["supplierClaimsData"]; //= new List<CleanSupplierClaim>();// = claimsRecords;// My issue is here, I get all records and not the ones the user just uploaded
CleanSupplierClaimData supplierClaimUplaod = new CleanSupplierClaimData();
var sqlConnection = "data source=XXXXX;initial catalog=Embrace; User ID=XXXXX; Password=XXXXXXXX;";
using (SqlConnection conn = new SqlConnection(sqlConnection))
{
try
{
foreach (var claim in supplierClaimsData)
{
SqlCommand cmd = new SqlCommand();
cmd.CommandTimeout = 60;
cmd.CommandText = "CRM.Supplier_Claim_Upload";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add("#Invoice", SqlDbType.NVarChar).Value = claim.Line_Number;
cmd.Parameters.Add("#Amount", SqlDbType.Decimal).Value = claim.Total_Claim;
cmd.Connection = conn;
conn.Open();
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
claim.ST_Key = reader.GetString(reader.GetOrdinal("ST_Key"));
claim.Error_1 = reader.GetString(reader.GetOrdinal("Error1"));
string lineNumberDoesNotExist = "Error: Invoice line number does not exist";
if (claim.Error_1.StartsWith(lineNumberDoesNotExist))
{
continue;
}
claim.Warning = reader.GetString(reader.GetOrdinal("Warning"));
claim.Error_2 = reader.GetString(reader.GetOrdinal("Error2"));
string warningCleanInclusion = "Warning";
if (claim.ST_Key != null && string.IsNullOrEmpty(claim.Warning) && string.IsNullOrEmpty(claim.Error_1) && string.IsNullOrEmpty(claim.Error_2))
{
var existingClaimCount = db.GPClaimsReadyToImports.Count(a => a.ST_Key == claim.ST_Key && a.CleanSupplierClaimSessionID == claim.CleanSupplierClaimsUploadSessionID);
if (existingClaimCount == 0)
db.GPClaimsReadyToImports.Add(new GPClaimsReadyToImport
{
Id = claim.Id,
ST_Key = claim.ST_Key,
Warning = claim.Warning,
Action = claim.Action,
Claim_Reference = claim.ClaimReference,
Currency = claim.Currency,
Error_1 = claim.Error_1,
Error_2 = claim.Error_2,
Line_Number = claim.Line_Number,
Total_Claim = claim.Total_Claim,
Domain_Username = domainNameOfficial.ToString(),//claim.Domain_Username,
DateCreated = DateTime.Now,
ImportFlag = true,
ReadyForImport = true,
CleanSupplierClaimSessionID = sessionIdentifier
});
db.SaveChanges();
}
}
foreach (CleanSupplierClaim saveToDBClaim in supplierClaimsData)
{
db.CleanSupplierClaims.Attach(saveToDBClaim);
var entry = db.Entry(saveToDBClaim);
entry.Property(aa => aa.Line_Number).IsModified = true;
entry.Property(aa => aa.Total_Claim).IsModified = true;
entry.Property(aa => aa.Currency).IsModified = true;
entry.Property(aa => aa.ClaimReference).IsModified = true;
entry.Property(aa => aa.Action).IsModified = true;
entry.Property(aa => aa.Domain_Username).IsModified = true;
entry.Property(aa => aa.Error_1).IsModified = true;
entry.Property(aa => aa.Error_2).IsModified = true;
entry.Property(aa => aa.Warning).IsModified = true;
entry.Property(aa => aa.ImportFlag).IsModified = true;
entry.Property(aa => aa.ReadyForImport).IsModified = true;
db.Entry(saveToDBClaim).State = System.Data.Entity.EntityState.Modified;
db.SaveChanges();
}
conn.Close();
}
}
catch (Exception ex)
{
ViewBag.Error = ex.Message + ex.InnerException;
}
var warningCount = "Warning";
var errorOneCont = "Error";
var errorTwo = "ErrorTwo";
var countWarning = supplierClaimsData.Select(x => x.Warning).Count();
var countErrorOne = supplierClaimsData.Select(x => x.Error_1).Count();
var countErrorTwo = supplierClaimsData.Select(x => x.Error_2).Count();
var officialWarning = String.Concat("Warning", countWarning);
ViewBag.WarningCount = officialWarning;
ViewBag.ErrorOneCount = countErrorOne;
ViewBag.ErrorTwoCount = countErrorTwo;
Session["supplierClaimsData"] = supplierClaimsData;
return View("ValidateClaims", supplierClaimsData);
}
}
I would recomend to use EPPLUS Plugin, available of NuGet.
https://www.nuget.org/packages/EPPlus/
I had used it for my large excel and its working perfect and speedy and OLEDB is not required at Runtime.
You can find a quick tutorial here :
http://zeeshanumardotnet.blogspot.com/2011/06/creating-reports-in-excel-2007-using.html

TestManagementHttpClient Create Test Run

I am trying below C# code to create TFS test run. But every time I am getting below error. Though I have given test plan details. I couldnt even find documentations on this.
Error
An exception of type 'Microsoft.TeamFoundation.TestManagement.WebApi.TestObjectNotFoundException' occurred in mscorlib.dll but was not handled in user code
Additional information: Test plan {0} not found.
Code
public async Task CreateTestRun()
{
TestManagementHttpClient witClient = connection.GetClient<TestManagementHttpClient>();
TestCaseResultUpdateModel TestCaseResultUpdateModel = new TestCaseResultUpdateModel();
ShallowReference testPlanReference = new ShallowReference();
testPlanReference.Id = "{TestPlanId}";
testPlanReference.Name = "{TestPlanName}";
testPlanReference.Url = "http://{TFSInstance}/{Project}/_apis/test/plans/{TestPlanID}";
RunCreateModel RunCreateModel = new RunCreateModel("SWAT-Run","",new int[] {2304187},testPlanReference,
null,0,"",false,"Error Message","","","","","comment","","", "",
null, null, null, null,null,"","","","",new TimeSpan(0,0,10,0,0),"",null);
TestRun testRun = await witClient.CreateTestRunAsync(this.Project, RunCreateModel, null);
}
I have done it succssful with below code, hope it can be helpful to you.
var tfsRun = _testPoint.Plan.CreateTestRun(false);
tfsRun.DateStarted = DateTime.Now;
tfsRun.AddTestPoint(_testPoint, _currentIdentity);
tfsRun.DateCompleted = DateTime.Now;
tfsRun.Save(); // so results object is created
var result = tfsRun.QueryResults()[0];
result.Owner = _currentIdentity;
result.RunBy = _currentIdentity;
result.State = TestResultState.Completed;
result.DateStarted = DateTime.Now;
result.Duration = new TimeSpan(0L);
result.DateCompleted = DateTime.Now.AddMinutes(0.0);
var iteration = result.CreateIteration(1);
iteration.DateStarted = DateTime.Now;
iteration.DateCompleted = DateTime.Now;
iteration.Duration = new TimeSpan(0L);
iteration.Comment = "Run from TFS Test Steps Editor by " + _currentIdentity.DisplayName;
for (int actionIndex = 0; actionIndex < _testEditInfo.TestCase.Actions.Count; actionIndex++)
{
var testAction = _testEditInfo.TestCase.Actions[actionIndex];
if (testAction is ISharedStepReference)
continue;
var userStep = _testEditInfo.SimpleSteps[actionIndex];
var stepResult = iteration.CreateStepResult(testAction.Id);
stepResult.ErrorMessage = String.Empty;
stepResult.Outcome = userStep.Outcome;
foreach (var attachmentPath in userStep.AttachmentPaths)
{
var attachment = stepResult.CreateAttachment(attachmentPath);
stepResult.Attachments.Add(attachment);
}
iteration.Actions.Add(stepResult);
}
var overallOutcome = _testEditInfo.SimpleSteps.Any(s => s.Outcome != TestOutcome.Passed)
? TestOutcome.Failed
: TestOutcome.Passed;
iteration.Outcome = overallOutcome;
result.Iterations.Add(iteration);
result.Outcome = overallOutcome;
result.Save(false);

Change colors in devexpress charts

I am drawing a pie chart using Devexpress in my MVC project.
While doing it by default my chart generated with three colors, as below
but my client is not satisfied, with the colors of it and wanted me to change them which match with our application background, so please help me, how to do this.
Thanks in advance.
Here is my code.
settings.Name = "chart";
settings.Width = 600;
settings.Height = 250;
settings.BorderOptions.Visible = false;
Series series1 = new Series("Type", DevExpress.XtraCharts.ViewType.Pie3D);
settings.Series.Add(series1);
series1.ArgumentScaleType = ScaleType.Qualitative;
series1.ArgumentDataMember = "ClassName";
series1.ValueScaleType = ScaleType.Numerical;
series1.ValueDataMembers.AddRange(new string[] { "PercentageValues" });
series1.LegendPointOptions.PointView = PointView.ArgumentAndValues;
series1.LegendPointOptions.ValueNumericOptions.Format = NumericFormat.Percent;
series1.LegendPointOptions.ValueNumericOptions.Precision = 0;
series1.Label.ResolveOverlappingMode = ResolveOverlappingMode.Default;
series1.Label.Visible = false;
Please refer the following code. I have successfully implemented the same for giving custom color for rangebar. I guess it will work for your case also
settings.CustomDrawSeriesPoint = (s, ev) =>
{
BarDrawOptions drawOptions = ev.SeriesDrawOptions as BarDrawOptions;
if (drawOptions == null)
return;
Color colorInTarget = Color.Blue;
double x = ev.SeriesPoint.Values[0];
double y = ev.SeriesPoint.Values[1];
if (x == 0)
{ //Do starting
colorInTarget = Color.FromArgb(159,125, 189);
}
else{
//Red - price Increase
// Green price Decrease
if (y > previousYValue)
{
colorInTarget = Color.Red; ;
}
else
{
colorInTarget = Color.Green;
}
}
previousYValue = y;
drawOptions.Color = colorInTarget;
drawOptions.FillStyle.FillMode = FillMode.Solid;
drawOptions.Border.Color = Color.Transparent;
};
you can set the theme and palette properties of the chart control. follow the links below to devexpress documentation. although the examples refers to winform application they are still avaliable in asp.net mvc controls.
http://documentation.devexpress.com/#WindowsForms/CustomDocument7433
http://documentation.devexpress.com/#WindowsForms/CustomDocument5538
// Define the chart's appearance and palette.
barChart.AppearanceName = "Dark";
barChart.PaletteName = "Opulent";
private List<StudentClass.ChartsPointsSummary> GetStudentSummaryResults()
{
var StudentId = Convert.ToInt32(Request.Params["StudentID"]);
var StudentDetailsP = CtxSM.SMISGet_StudentAttendanceDetailsByStudentId(StudentId, SessionDataManager.SessionData.LoginUserId, SessionDataManager.SessionData.AcademicYearID, SessionDataManager.SessionData.BusinessUnitId, ref outError).ToList();
var Presents = StudentDetailsP.Select(p => new { p.Months, p.Presents});
var CountsP = StudentDetailsP.Count();
List<StudentClass.ChartsPointsSummary> MT = new List<StudentClass.ChartsPointsSummary>();
foreach (var ab in Presents)
{
MT.Add(new StudentClass.ChartsPointsSummary { PresentSummaryX = ab.Months, PresentSummaryY = Convert.ToInt32(ab.Presents) });
}
var StudentDetailsA = CtxSM.SMISGet_StudentAttendanceDetailsByStudentId(StudentId, SessionDataManager.SessionData.LoginUserId, SessionDataManager.SessionData.AcademicYearID, SessionDataManager.SessionData.BusinessUnitId, ref outError).ToList();
var Absents = StudentDetailsP.Select(p => new { p.Months, p.Absents });
var CountsA = StudentDetailsA.Count();
foreach (var ab in Absents)
{
MT.Add(new StudentClass.ChartsPointsSummary { AbsentSummaryX = ab.Months, AbsentSummaryY = Convert.ToInt32(ab.Absents) });
}
var StudentDetailsL = CtxSM.SMISGet_StudentAttendanceDetailsByStudentId(StudentId, SessionDataManager.SessionData.LoginUserId, SessionDataManager.SessionData.AcademicYearID, SessionDataManager.SessionData.BusinessUnitId, ref outError).ToList();
var CountL = StudentDetailsL.Count();
var Leaves = StudentDetailsP.Select(p => new { p.Months, p.Leaves });
foreach (var ab in Leaves)
{
MT.Add(new StudentClass.ChartsPointsSummary { LeaveSummaryX = ab.Months, LeaveSummaryY = Convert.ToInt32(ab.Leaves) });
}
return MT;
}
#Html.DevExpress().Chart(settings =>
{
settings.Name = "SummaryDetailsById";
settings.Width = 1032;
settings.Height = 250;
Series chartSeries = new Series("Presents", DevExpress.XtraCharts.ViewType.Bar);
chartSeries.ArgumentDataMember = "PresentSummaryX";
chartSeries.ValueDataMembers[0] = "PresentSummaryY";
settings.Series.Add(chartSeries);
Series chartSeries2 = new Series("Absents", DevExpress.XtraCharts.ViewType.Bar);
chartSeries2.ArgumentDataMember = "AbsentSummaryX";
chartSeries2.ValueDataMembers[0] = "AbsentSummaryY";
settings.Series.Add(chartSeries2);
Series chartSeries3 = new Series("Leaves", DevExpress.XtraCharts.ViewType.Bar);
chartSeries3.ArgumentDataMember = "LeaveSummaryX";
chartSeries3.ValueDataMembers[0] = "LeaveSummaryY";
settings.Series.Add(chartSeries3);
settings.CrosshairEnabled = DefaultBoolean.Default;
settings.BackColor = System.Drawing.Color.Transparent;
settings.BorderOptions.Visibility = DefaultBoolean.True;
settings.Titles.Add(new ChartTitle()
{
Text = "Student Attendance Summary"
});
XYDiagram diagram = ((XYDiagram)settings.Diagram);
diagram.AxisX.Label.Angle = -30;
diagram.AxisY.Interlaced = true;
}).Bind(Model).GetHtml()

Set a binding programmatically between a component and a value from a list

I'm developing a application in Silverlight 3 and I have a dynamic form, I generate this form from a list of attributes (key-value) I'd like to know, how can I set a binding between the component (CheckBox, TextBox, ...) and the value of the attribute?
This code is only the first approximation to the solution, no the definitive code:
int numeroFila = 0;
MainPage rootPage = ((App)Application.Current).RootVisual as MainPage;
rootPage.NuevoElementoWindowInstance.NuevoElementoInstance.ListadoAtributos.Children.Clear();
foreach (var atributo in ListaAtributos)
{
string tipoAtributo = ObtenerDefinicionAtributo(atributo.Key);
FrameworkElement campoDatos;
TextBlock bloqueTexto = new TextBlock();
bloqueTexto.Text = atributo.Key;
bloqueTexto.Margin = new Thickness(10,3,0,0);
switch (tipoAtributo)
{
case "Boolean":
CheckBox campoBooleano = new CheckBox();
campoBooleano.Name = atributo.Key;
campoBooleano.IsChecked = ObtenerValorCampoBooleano(atributo.Value);
campoDatos = campoBooleano;
break;
case "DateTime":
DatePicker campoFecha = new DatePicker();
try
{
campoFecha.DisplayDate = DateTime.Parse(atributo.Value);
}
catch (Exception)
{
campoFecha.DisplayDate = DateTime.Now;
}
campoDatos = campoFecha;
break;
default:
TextBox campoTexto = new TextBox();
campoTexto.Text = atributo.Value == null ? "" : atributo.Value;
campoDatos = campoTexto;
break;
}
campoDatos.Margin = new Thickness(0,1,10,1);
rootPage.NuevoElementoWindowInstance.NuevoElementoInstance.ListadoAtributos.RowDefinitions.Add(new RowDefinition());
Grid.SetColumn(campoDatos, 1);
Grid.SetColumn(bloqueTexto, 0);
Grid.SetRow(campoDatos, numeroFila);
Grid.SetRow(bloqueTexto, numeroFila);
rootPage.NuevoElementoWindowInstance.NuevoElementoInstance.ListadoAtributos.Children.Add(bloqueTexto);
rootPage.NuevoElementoWindowInstance.NuevoElementoInstance.ListadoAtributos.Children.Add(campoDatos);
numeroFila++;
}
}
I have found the solution. This is the code:
int numeroFila = 0;
MainPage rootPage = ((App)Application.Current).RootVisual as MainPage;
rootPage.NuevoElementoWindowInstance.NuevoElementoInstance.ListadoAtributos.Children.Clear();
foreach (var atributo in ListaAtributos)
{
string tipoAtributo = ObtenerDefinicionAtributo(atributo.Key);
FrameworkElement campoDatos;
TextBlock bloqueTexto = new TextBlock();
bloqueTexto.Margin = new Thickness(10,3,0,0);
Binding bind = new Binding();
bind.Source = atributo;
bind.Path = new PropertyPath("Key");
bind.Mode = System.Windows.Data.BindingMode.TwoWay;
bloqueTexto.SetBinding(TextBlock.TextProperty, bind);
switch (tipoAtributo)
{
case "Boolean":
CheckBox campoBooleano = new CheckBox();
campoBooleano.Name = atributo.Key;
campoBooleano.IsChecked = ObtenerValorCampoBooleano(atributo.Value);
bind = new Binding();
bind.Source = atributo;
bind.Path = new PropertyPath("Value");
bind.Mode = System.Windows.Data.BindingMode.TwoWay;
campoBooleano.SetBinding(CheckBox.IsCheckedProperty, bind);
campoDatos = campoBooleano;
break;
case "DateTime":
DatePicker campoFecha = new DatePicker();
try
{
campoFecha.DisplayDate = DateTime.Parse(atributo.Value);
}
catch (Exception)
{
campoFecha.DisplayDate = DateTime.Now;
}
bind = new Binding();
bind.Source = atributo;
bind.Path = new PropertyPath("Value");
bind.Mode = System.Windows.Data.BindingMode.TwoWay;
campoFecha.SetBinding(DatePicker.TextProperty, bind);
campoDatos = campoFecha;
break;
default:
TextBox campoTexto = new TextBox();
atributo.Value = atributo.Value == null ? "" : atributo.Value;
bind = new Binding();
bind.Source = atributo;
bind.Path = new PropertyPath("Value");
bind.Mode = System.Windows.Data.BindingMode.TwoWay;
campoTexto.SetBinding(TextBox.TextProperty, bind);
campoDatos = campoTexto;
break;
}
//this.GetType().GetProperty("").GetGetMethod().Invoke(new Object(), null);
campoDatos.Margin = new Thickness(0,1,10,1);
rootPage.NuevoElementoWindowInstance.NuevoElementoInstance.ListadoAtributos.RowDefinitions.Add(new RowDefinition());
Grid.SetColumn(campoDatos, 1);
Grid.SetColumn(bloqueTexto, 0);
Grid.SetRow(campoDatos, numeroFila);
Grid.SetRow(bloqueTexto, numeroFila);
rootPage.NuevoElementoWindowInstance.NuevoElementoInstance.ListadoAtributos.Children.Add(bloqueTexto);
rootPage.NuevoElementoWindowInstance.NuevoElementoInstance.ListadoAtributos.Children.Add(campoDatos);
numeroFila++;
}
However now, I need to set a Converter to the CheckBox, because al "Values" are string and I need to convert string-boolean

Resources