|
Please clarify your question
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
I guess you want to load the texts shown on your pages from a database. Normally, localization uses resource files, and then things are handled by the resource manager. Hence, you will have to implement lots of things on your own.
First, determine the language desired by the user (e.g. accepted languages in the header of the web request, or implied by a selection on your web site) - do not forget a fallback if that language is not available in your database.
Set CurrentUICulture to the appropriate value - that will do a lot of formatting for you.
For all the elements on your page, load the texts from the database by querying each one. Then set the element's text to that value.
|
|
|
|
|
Dear All,
I am developing a windows application which has a feature that when press on some button, it will do an outlook task, my code is C#:
using Microsoft.Office.Core;
using Microsoft.Office.Interop.Outlook;
private void button1_Click(object sender, EventArgs e)
{
Microsoft.Office.Interop.Outlook.TaskItem OutlookTask = new Microsoft.Office.Interop.Outlook.TaskItem();
OutlookTask.Actions.Application.CreateItem(OlItemType.olTaskItem);
OutlookTask.Assign();
OutlookTask.Recipients.Add("email@domain.ps");
OutlookTask.Subject = "Testing The Tasks from my application";
OutlookTask.Body = "Body: Testing The Tasks from my application";
OutlookTask.DueDate = DateTime.Today;
OutlookTask.ReminderTime = OutlookTask.DueDate;
OutlookTask.Save();
}
The Error: Retrieving the COM class factory for component with CLSID {00061032-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
note: I added the reference to use Outlook which is: Microsoft Outlook 14.0 Object Library
I am using VS 2010, and my outlook is Outlook 2010
Any ideas Plz???
Kind Regards
OBarahmeh
|
|
|
|
|
Please edit your post and format the code snippets appropriately, i.e. use the "code block" toolbar item. You will get a better response if you follow the guidelines here.
Might be a silly question, but you do have the proper version of Outlook on the machine you are running this on correct? Which line is throwing the exception?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Good morning,
First, I am sorry for posting in two places.
The exception is thrown in the following line:
TaskItem OutlookTask = new TaskItem();
And thank you for your replies.
Regards
Kind Regards
OBarahmeh
|
|
|
|
|
|
This problem is related with your outlook installation, please check if you are able to search ‘00061032-0000-0000-C000-000000000046’ in your registry if not then run the outlook setup again
|
|
|
|
|
Hi friends,
I want to set corners of buttons rounded and backcolor of TabControl is transperent but i don't find any backcolor property for TabControl.
I have tried with control.region for Rounded corners but ooops.. it fails for me.
So please guide me how can i do this two things.
Thank in advance.
|
|
|
|
|
|
In addition to Luc's TabControl recommendation there are plenty of articles about drawing your own buttons.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
OK, I am asking this here because it is more general architecture based than language specific based...
I have a design I am working on that involves a Silverlight wizard style interface on a web form that makes calls out to a series of web services hosted in a windows service application.
I have a design decision to make…
The UI is a type of wizard style, multiple screens for each area of the process, and the process can be based upon some specific HW that is installed on the client machine that the website is viewed on. The main page makes a service call to the hosted application to get a device capabilities list and from there it knows what HW is available and then makes more service calls to talk to the HW and get a response back. All this because I can’t use an out of bowser Silverlight application to talk to the HW. Not a big deal but it poses a question for me…
My original thought was to use a single Webservice method for the interface, pass in a series of commands and arguments formed as general Strings and KeyValuePairs, do some processing and then the web method returns a general set of KeyValuePairs again as the process results.
In one way this sounds good for me because it allows me to make changes as I need to add functionality latter on, keep the older string values and just add new ones as I need without altering the code interface at all. It takes away some nice Intellisense in the editor but in the long run I was thinking that the flexibility was worth it.
One other way I was considering was just biting the bullet and create a separate generic web method for each major functional part and then use the ability in the app.config file to select and load satellite assemblies dynamically based upon the requested version of the HW/Component/etc… Keeps the code a bit cleaner, allows for more use of Intellisense as I edit code and maybe even offers a bit more flexibility to add new devices, but places a heavier load on the use of the app.config file than I was looking for.
Anyone here have a personal preference or some feedback about these methods, or maybe a third alternative that I had not considered yet?
|
|
|
|
|
With the first method you end up with a monolithic interface that will be difficult to maintain over time. You don't have to give up Intellisense if the objects being passed are serialized/deserialized representations rather than just generic name/value pairs.
However, you do have the added complexity in the other method of creating/maintaining all of the assemblies but I think it would be the better approach, or at least the one I would try.
In either case Intellisense support wouldn't be a concern. We programmed without just fine for many years.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Mark Nischalke wrote: In either case Intellisense support wouldn't be a concern. We programmed without just fine for many years.
Yeah, I know, me too...
|
|
|
|
|
I had a similar decsion to make earlier this year, and went with a single method in the web service. My method accepts the stored proc to call and all parameters for that stored proc in the form of a XML string. When I call the method, the service takes the xml string containing the parameters, and creates SQLParameter objects. I can pass any type of parameter necessary, and the method returns data back as XML. It's all very slick, and the web service itself is the lowest maintenance part of the whole system. We haven't had to add *anything* to it since it was originally implemented over eight months ago. I wrote a tip/trick about it:
Pass Dynamic List of Parameters to Web Service[^]
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
Very cool… going to have to consider looking into that...
I was also running into issues with returning a KeyValuePair from a webservice. It seems like no matter what I did I could never get at the KVP data.... I could see it when I drilled down into the debug window but I had to go like 5-6 layers deep and no matter what I did in code I could not get there.
The best option I could come up with was creating a custom class with a key and value method and then just returning a generic list of these. That seemed to work fine.
Thanks.
|
|
|
|
|
Ray Cassick wrote: creating a custom class with a key and value method and then just returning a generic list of these
In my experience you shouldn't be sending generic types over the wire! This has only applied to WCF in my experience, specifically, but it seems to be a problem with parsing serialised generic objects on deserialisation, so I'm going to assume it's a bad idea in general.
Plus seeing it in a service contract just gives me the heeby-jeebies, couldn't tell you why. Why not just a KeyValue[] ??
|
|
|
|
|
I didn't really mean use generics per-se... I meant just to keep the list simple. I define a basic class that allows you define a Key and Value pair of Key = int, Value = object, wrap that is a small class, provide some accessors and generic initialize, then build a list of those:
List<keyvaluepair> kvp = new List<keyvalurpair>
|
|
|
|
|
Ah, ok, generic as in the normal meaning, not the specific programming meaning (i.e. List<KeyValuePair> or List(Of KeyValuePair)), right, sorry - misunderstood you.
In that case, if both ends are WCF, you should be able to cast the Value property objects when they come out the other end to their specific types (assuming you have access to them, i.e. you've included the assembly on the other end). If not I believe you would have to do some funky deserialisation code and manipulation of raw XML, yuck!
I would stick with the D.A.D.S. principle when talking about objects going over the wire:
[DataContract]
public class KeyValuePair
{
[DataMember]
public string Key { get; set; }
[DataMember]
public string Value { get; set; }
}
I agree with Mark, though - why not use WCF? You get all the data types on the receiving end as "real" objects, no loss of Intellisense. Plus, it feels safer
As for your original question/situation, that is a tough one - I'd need to think that one through for a while. I like to use role-play (just leave it ) Walk yourself through the maintenance cycle with a pencil and paper, "you rolled a 5, new HW support required" or "you rolled a 2, implementation of HW type X changes" (no need for a die, that was purely for example). I find working through these situations helps me choose the easier path.
Don't really know if that's what you're looking for... I have emptystomachitis, off to lunch!
|
|
|
|
|
I still think my way of doing it is easier and much less maintenance intensive.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
hi,
i am doing one task in my project.i need to update the holidays in the frontend(ASP.NET).but when i am entering the data it is not getting saved and displaying data as "holiday id cannot allow null values".
i checked in the backend there is no problem in that it is displaying correctly.
only problem is front end.
In the holiday id identity specifications i incremented the properties.eventhough error is coming.
insert into HolidayList(Holiday,Date,Day)
values
(@Holiday,@Date,@Day);
select HolidayId = SCOPE_IDENTITY();
the query used in the sqlserver.in this we are not declaring the holidayid but when we are executing it automatically gets incremented.suppose there are 6 values in table if we enter the next value it automatically displays as 7 value and getting exeuted.
but when coming to the front end it is not saving the data.when we are clicking on the save the page is getting refreshed.
please give me the solution.it is very urgent for me.
thanks
Amala
modified on Tuesday, December 28, 2010 10:11 AM
|
|
|
|
|
You need to post some code here. Until then, it is virtually impossible to figure out the exact problem.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
mandarapuamala wrote: the query used in the sqlserver
And how does the table-definition look? What columns and datatypes does it have?
mandarapuamala wrote: "holiday id cannot allow null values".
i checked in the backend there is no problem in that it is displaying correctly.
Any triggers that are defined on the table?
mandarapuamala wrote: but when coming to the front end it is not saving the data.when we are clicking on the save the page is getting refreshed.
Are you doing an insert or an update at that point?
mandarapuamala wrote: please give me the solution.it is very urgent for me.
This is a free site and questions are answered by volunteers like you, in their spare time. Demanding them to hurry would be inappropriate.
You could also plough through the SCOPE_IDENTITY [^]-documentation on MSDN
I are Troll
|
|
|
|
|
I would suggest to use relevant title so that other people can benefit it
|
|
|
|
|
"Callback" is the delegate. I have a calculated string which give the function name and I want to pass this string to delegate. How can I achive this. Please advice
String FunctionName ="Myfunction"
String FunctionID="5679"
FunctionName = FunctionName + "_" +FunctionID
cbk->m_pCallBack = gcnew Callback(this, FunctionName);
Please advice
|
|
|
|