|
|
Could you evaluate WarehouseId1 in the getWarehouseModel method instead. It sounds like the logic would be better placed there
"You get that on the big jobs."
|
|
|
|
|
I can see three ways:
1. Do what you have now.
2. Have the separate relation table PIEBALD suggested.
3. Have a special warehouse, a real entry in the database, however it corresponds to "no warehouse" with values (stock, staff count, ...) that match that (probably just all zero, and a dummy address).
|
|
|
|
|
If you are strictly modelling what's in the database, then I would simplify this by making it so that Warehouse1 and Warehouse2 were nullable, and I would let getWarehouseModel return null if the warehouse id was null. Also, are you sure that your logic for getWarehouseModel is correct with regards to what you are evaluating? You seem to be using WarehouseId1 in both cases and it seems redundant evaluating it twice.
|
|
|
|
|
hi
i should create a data base by c# that save employee imformashion and save their salary list. . . ????
|
|
|
|
|
Before you can actually progress with this project, you really need to flesh out your requirements. What employee information do you need? Do you require security in place? How are you going to present this to the user? Is it browser based? Is it Silverlight, Windows Forms, WPF? Do you need to audit changes?
As you can see, there's a lot that you need to do before you go any further.
|
|
|
|
|
tnx a lot for your explanation i khow but it's my homework and i have not enough time 
|
|
|
|
|
fafal wrote: i have not enough time
So, how did you assume others here have enough time to do "your" homework.
|
|
|
|
|
yeah your righ but i never think like you when someone need help , and i dont khow why here all are furious tnx anyway
|
|
|
|
|
Because we do not do homework for you.
And of course, we are ready to help you if you have tried something on your own and come here with specific questions. But that doesn't seem to be the case.
|
|
|
|
|
ok give in 
|
|
|
|
|
I don't think anyone here is furious - if they had been the tone of the messages you got would have been very different, I think.
But, most of us here have worked hard to get where we are, and we know that doing your homework would not help us and would not help you. All it would do is reinforce the idea you seem to have that "deadlines are for other people" and that someone will drag your backside out of the fire if you can't be bothered to plan your time.
Unfortunately, the real world is not like that.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
fafal wrote: i dont khow why here all are furious
Because there's way too many Copy'N'Paste coder idiots in this field who don't know what they're doing and getting paid to write production code.
|
|
|
|
|
I don't think everybody is furious. The tone would be far nastier if they were. What you have to understand, though, is that your original statement was far too vague, and far too broad. We don't know what technology (other than C#) you are using, and we don't know what you've done so far - it's up to you to help us help you.
Have you got any code in place at all?
|
|
|
|
|
In that case, you're screwed! Nobody is going to do your homework for you. If you didn't make the time to do your own work, why should we do it for you??
|
|
|
|
|
read this[^]
fafal wrote: and i have not enough time
What makes you think we do?
Try it out for yourself first. You can get directions here if you're stuck (follow guidelines in the link), but nobody's going to give you code or do your homework for you.
V.
|
|
|
|
|
ok tnx 
|
|
|
|
|
You're welcome. And seriously, if you do run into problems, return here (with the rules in mind) and you'll certainly get response.
V.
|
|
|
|
|
|
Are you thinking out loud?
|
|
|
|
|
You're half right. 
|
|
|
|
|
Hey,
Im trying to insert cross reference into a word document, the document itself is consists of 2 headings:
1.1.1 SUBJECT1
1.1.2 SUBJECT2
while trying to iterate through all the subjects with GetCrossReferenceItems(ref oRefType); function I do get both of the subjects, however, when I use the InsertCrossReference function, it always inserts the last subject into the document (meaning, I get duplicate SUBJECT2 cross references)
See below simplified example:
object file = @"c:\somefile.docx";
object oRefHyperlink = true;
object oRefType = WdReferenceType.wdRefTypeHeading;
object arr_r = doc.GetCrossReferenceItems(ref oRefType);
Array arr = ((Array)(arr_r));
Microsoft.Office.Interop.Word.Application document = new Microsoft.Office.Interop.Word.Application();
Document doc = document.Documents.Open(ref file, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj);
object oRefItem = arr.GetValue(arr.Length);
doc.Application.Selection.InsertCrossReference(ref oRefType, WdReferenceKind.wdContentText, ref oRefItem, ref oRefHyperlink, ref InsertPosition, ref SeperateNumbers, ref nullobj);
oRefItem = arr.GetValue(1);
doc.Application.Selection.InsertCrossReference(ref oRefType, WdReferenceKind.wdContentText, ref oRefItem, ref oRefHyperlink, ref InsertPosition, ref SeperateNumbers, ref nullobj);
has anyone came crossed into this problem?
Thank you for your response.
|
|
|
|
|
Before when I used the vb.net I faced the similar problem. Then I remember instead of using the Cross Reference, I used the Paragraphs.And then I found a solution to my problem...
In richTextBox you can append the text easily, and save as document file....

|
|
|
|
|
Unfortunately there are alot of actions I need to do over the document , in fact, the entire application is based on word document so I can't do these actions over the rich text box
can you please expand alittle about the Paragraphs thingy ? how did you do it ?
|
|
|
|
|
Shine..actually its vb.net2008 code..I don't have time to convert to c#..so you need to convert it.
Dim OPara1 As Microsoft.Office.Interop.Word.Paragraph
Dim Rng As Microsoft.Office.Interop.Word.Range = WrdDcmt.Paragraphs(1).Range
OPara1 = WrdDcmt.Paragraphs.Add
OPara1.Format.SpaceBefore = 50
OPara1.Range.Text = "REFERENCE No. : AMC/" + Dprt + "/" + DvPoint + "/MPR-" + TextBox1.Text + vbCrLf
OPara1.Range.Text = "DATE : " + QtRqt
OPara1.Format.SpaceAfter = 6
OPara1.Range.InsertParagraphAfter()
For RichTextBox
RichTextBox4.AppendText("DATE : " + QtRqt)
RichTextBox4.AppendText(" " + vbCrLf)
RichTextBox4.AppendText("To" + vbCrLf)
RichTextBox4.AppendText("Some of Your Text" + vbCrLf)
// Simply you can copy the rtb Text and can Paste to your Range and can add to your document..
RichTextBox4.SelectAll()
RichTextBox4.Copy()
Rng.Paste()
I hope this can helps a bit for your search 
|
|
|
|