|
To get "Totale" to update as the other properties change, you need to add RaisePropertyChanged("Totale") statements to both the setters for "Manifattura" and "Ricambi". e.g.
public double Manifattura
{
get { return _Manifattura; }
set { _Manifattura = value;
RaisePropertyChanged("Manifattura");
RaisePropertyChanged("Totale"); }
}
In this case, the "setter" in "Totale" makes no sense and contradicts the "getter".
Alternatively, set the "value" of "Totale" in BOTH the other properties: e.g.
public double Manifattura
{
get { return _Manifattura; }
set { _Manifattura = value;
RaisePropertyChanged("Manifattura");
Totale = Manifattura + Ricambi;
}
... and change the "getter" in "Totale" to return "value".
|
|
|
|
|
hanks to all of you have been to me for help and best wishes happy holidays
|
|
|
|
|
how to host the asp.net website with database and which file we have to hosted on the server and like that how to mention the connection string with in the web.config.and how the asp.net will interconnected with database
balu
|
|
|
|
|
|
Since you're asking about ASP.NET, I would like you to go to this very link and surf it thoroughly.
http://www.asp.net/hosting[^]
Secondly, did you try to search or Google for this problem? I am sure, there are more than hundreds of solutions and services present for you, at your own very budget ready for you to use them. I remember, when I wanted a service I was able to get a service after choosing a service from more than hundreds over hundreds services that fit my budget and requirements.
Good luck!
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
hi,
i am trying to update my application while using my .msi installation file through command line. my question is how do i use my .msi file to reinstall the application? through command line?
i tried msiexec.exe with /p and /update and /i already
but it shows me error that the patch package is not valid
please help.
|
|
|
|
|
|
hi,
thanks for the reply. i think i found out why.
originally i was trying to distinguish my application installer so that if a higher version comes the major update can take place.
but i dont think the default msi installer can support that. i am gonna try wix or install shield.
|
|
|
|
|
I guess a custom action can handle your requirement.
|
|
|
|
|
I have a game app that has a window in it and was designed to be interacted with using only the keyboard. I find it very difficult to do this and was wondering if it was possible to write an app that would allow me to use the mouse on this first app to control it?
I'm thinking, if this is possible at all, that my small app would detect mouse clicks on the game app and feed into its keyboard buffer the keys it 'thinks' it is receiving from the keyboard.
Is this possible at all?
Thanks...
|
|
|
|
|
|
hi,
i am running a service in a window 7 computer and using it to run a msi installer in silent mode. the problem is that i want it to show a prompt to the user when the installation succeeded. is this possible?
|
|
|
|
|
neodeaths wrote: is this possible? Easiest way to do so is by writing a normal windows-application that checks for a "done" flag. You can set the flag from the service, in a database of your choice - or an XML file or similar. Have the application check the file and display a status if required.
Services do not run as user-applications; they're started before a user logs in, and may be running when there's no user to view the dialogs. A small application that starts in the normal user-space would be the easiest way to communicate.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello to all I can not understand how to recover from model year when the property is not mistakes, I use this class for validation:
public class ValidatableModel : INotifyDataErrorInfo, INotifyPropertyChanged
{
private ConcurrentDictionary<string, List<string>> _errors = new ConcurrentDictionary<string, List<string>>();
public event PropertyChangedEventHandler PropertyChanged;
public void RaisePropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(propertyName));
ValidateAsync();
}
public event EventHandler<DataErrorsChangedEventArgs> ErrorsChanged;
public void OnErrorsChanged(string propertyName)
{
var handler = ErrorsChanged;
if (handler != null)
handler(this, new DataErrorsChangedEventArgs(propertyName));
}
public IEnumerable GetErrors(string propertyName)
{
List<string> errorsForName;
_errors.TryGetValue(propertyName, out errorsForName);
return errorsForName;
}
public bool HasErrors
{
get { return _errors.Any(kv => kv.Value != null && kv.Value.Count > 0); }
}
public Task ValidateAsync()
{
return Task.Run(() => Validate());
}
private object _lock = new object();
public void Validate()
{
lock (_lock)
{
var validationContext = new ValidationContext(this, null, null);
var validationResults = new List<ValidationResult>();
Validator.TryValidateObject(this, validationContext, validationResults, true);
foreach (var kv in _errors.ToList())
{
if (validationResults.All(r => r.MemberNames.All(m => m != kv.Key)))
{
List<string> outLi;
_errors.TryRemove(kv.Key, out outLi);
OnErrorsChanged(kv.Key);
}
}
var q = from r in validationResults
from m in r.MemberNames
group r by m into g
select g;
foreach (var prop in q)
{
var messages = prop.Select(r => r.ErrorMessage).ToList();
if (_errors.ContainsKey(prop.Key))
{
List<string> outLi;
_errors.TryRemove(prop.Key, out outLi);
}
_errors.TryAdd(prop.Key, messages);
OnErrorsChanged(prop.Key);
}
}
}
}
This is Model:
public class Busta : ValidatableModel
{
int _BustaID;
string _DescrizioneBusta;
int _NegozioID;
public string _nomeCliente;
[Key]
public int ID { get; set; }
[Required]
[CustomValidation(typeof(Busta), "unicoBustaID")]
public int BustaID
{
get { return _BustaID; }
set { _BustaID = value; RaisePropertyChanged ("BustaID"); }
}
[Required]
[CustomValidation(typeof(Busta), "nullNegozio")]
public int NegozioID
{
get { return _NegozioID; }
set { _NegozioID = value; RaisePropertyChanged("NegozioID"); }
}
[StringLength(20)]
public string NomeCliente { get; set; }
[MaxLength(20)]
[Required]
public string DescrizioneBusta
{
get { return _DescrizioneBusta; }
set { _DescrizioneBusta = value; RaisePropertyChanged("DescrizioneBusta"); }
}
public static ValidationResult unicoBustaID(object obj, ValidationContext context)
{
var user = (Busta)context.ObjectInstance;
if (user.BustaID <= 0 )
{
return new ValidationResult("Codice errato", new List<string> { "BustaID","" });
}
return ValidationResult.Success;
}
public static ValidationResult nullNegozio(object obj, ValidationContext context)
{
var user = (Busta)context.ObjectInstance;
if (user.NegozioID <= 0)
{
return new ValidationResult("Selezionare Un Negozio", new List<string> { "NegozioID", "" });
}
return ValidationResult.Success;
}
}
Then I wanted to make in the ViewModel to recover if the properties of the Model has no Envelope errors but I just always deactivated the button:
SaveCommand = new RelayCommand<Busta>(SalvaBusta,CanSave);
public bool CanSave(object parameter)
{
if (Busta.HasErrors == false )
return true;
else
return false;
}
|
|
|
|
|
Dear Friends
This is my first post, I hope is published in the correct section.
I am really stuck to get a specific text inside a web table from a webbrowser control.
html code:
<tr>
<td class = "text" width = "50%"> e-mail: </ td>
<td class = "text"> target@email.com </ td>
</ tr>
I need to get the email address and display it in a label control.
I tried unsuccessfully several convinations with:
WebBrowser1.Document.GetElementsByTagName
and
WebBrowser1.Document.GetElementsByTagId
I would appreciate any guidance
Regards
Update: developing in VB.Net (VS 2010-2012)
modified 10-Dec-14 10:59am.
|
|
|
|
|
|
Hello everyone,
I am developing a application that will display all instances of Microsoft exchanger servers and sql servers that are running on LAN.
I found the solution for sql servers but could not find any way for exchange server.
Language of my program is c#.
Thanks in advance.
Regards,
Jitendra Singh
|
|
|
|
|
JSingh_Freelancer wrote: I found the solution for sql servers
I doubt it. Not every system may have the SQL Server Browser running (mine isn't) and there may be other impediments. But, if you did find a way, write an article.
I think you will find the task impossible.
|
|
|
|
|
I will write article on that. But right now i am concerned over how to find all instances of exchange servers.
Beacuse as per my understanding many exchange servers can be run on LAN.
Plese correct me if i am somewhere wrong.
Thanks & Regards
Jitendra Singh
|
|
|
|
|
It'd be nice if I could get a list of all targets when I'm on a strange network
A sysop can enter the address manually if there's a need to configure your app.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
How to update image in database using stored procedure in Asp.Net using gridview?
|
|
|
|
|
|
Hello I have a combobox binding to a ObservableCollection of a table, where I fetch the ID field that deposit in another table, so everything is right, the problem arises when I want my ValidatesOnNotifyDataErrors doing its job, but it does the property in question is set to [Required] will post the code I hope you can help out:
Combobox:
<pre lang="xml"><ComboBox HorizontalAlignment="Left" Margin="327,116,0,0" VerticalAlignment="Top" Width="120" ItemsSource="{Binding NegozioObser}" SelectedItem="{Binding NegozioSelezionato, ValidatesOnNotifyDataErrors=True}">
<ComboBox.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding RagioneSociale}"/>
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
property destination in the table Envelope:
[Required]
public int NegozioID
{
get { return _NegozioID; }
set { _NegozioID = value; RaisePropertyChanged("NegozioID"); }
}
withdrawal from the property NegozioID table Shop through this ObservableCollections:
ObservableCollection<Negozio> _Negozios;
public ObservableCollection<Negozio> NegozioObser
{
get { return _Negozios; }
set
{
_Negozios = value;
RaisePropertyChanged("NegozioObser");
}
}
|
|
|
|
|
You've marked NegozioID as required, but you're binding to the NegozioSelezionato property. Have you marked NegozioSelezionato as required?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I did it so I did:
<ComboBox HorizontalAlignment="Left" Margin="327,116,0,0" VerticalAlignment="Top" Width="120" ItemsSource="{Binding NegozioObser, ValidatesOnNotifyDataErrors=True}" SelectedItem="{Binding NegozioSelezionato,ValidatesOnNotifyDataErrors=True}" SelectedValue="{Binding Busta.NegozioID, ValidatesOnNotifyDataErrors=True}" SelectedValuePath="NegozioID" DisplayMemberPath="RagioneSociale"/>
|
|
|
|