|
Fortunately this has never happened to me because I saw the problem before I even wrote any code.
Other people I've worked with in the past, however, didn't see the problem even after their applications starting crapping all over themselves. Ask them what they changed and it's always "nothing" and then 20 minutes later the truth comes out and they changed and auto enum.
Enums are very simple things to understand but yet extremely difficult for some people for some reason.
|
|
|
|
|
For what it's worth - the way I set up drop down values is in one database table.
Below is an over-simplified example.
Doing this allows me to manage all the dropdowns, irrespective of application and control, for the whole ERP system within one reference table:
id application control_name item active position
17 proj proj_cmb Tier1 1 1
18 proj proj_cmb Tier2 1 2
19 proj proj_cmb Tier3 1 3
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
That concept is seductive, I had not considered it across apps, but I like my FKs too much to do that. We do 90% of our processing in the database so that always gets first consideration, nature of the beast (not ERP).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
As our ERP system grew, which is written in house (previously with the lead developer and me but now solely by me) we decided to split the different areas of the ERP into separate applications in order to make development/maintenance easier(the users did not appear to mind).
From the very early days I started shifting hard-coded lists, within the UI code, out into the back-end database. I have also written some tools to help me administer this database.
In practise what this means is that I can make quick changes to lists within applications without having to roll out new releases to users.
The example I gave above is an over-simplified version of what I have built.
The reference table, for lists, also allows stored procedures to be used for populating lists(with parameters being supplied from the client side) and even allows cascading dropdown design (e.g. country and state dropdowns).
This has made my life so much easier, so I can concentrate on developing new features rather than spending hours on amending the contents of dropdowns.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Thanks you guys are awesome
|
|
|
|
|
Unless there is a compelling reason to combine them, I'd keep the tables separate.
As others have also said, I can generate an enum from them. GenOmatic[^]
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
Hi All,
I use the rdcl report with c# web application and I have a 2 questions:
1. Is it possible to create the rdcl report with dynamic dataset.xsd, if yes how?
2. Is it possible to show the rows as header columns as the following:
we have Customers datatable with columns ID,Name and by default shown like this,
ID Name
1 zead
2 jan
but the customers datatable columns not have a static columns ID,Name..
it may be contains city, address, phone
(dynamic columns).
Please help me ASAP
|
|
|
|
|
|
Greetings,
I'm using a crystal report and using it to make a sales report and I want to sort the reports displayed based on the date of the sales order what I should do I create a parameter field and its type is Boolean what else I should do what is the formula to write to do such sorting
|
|
|
|
|
|
As an alternative to the other suggestion you might consider retrieving the data from the data store so it is already sorted.
|
|
|
|
|
Hey, I am trying to make an application that allows me to connect to a proxy server through a c# console application but I am not sure how.What I want to achieve is the program selects a random IP from the list in a text file and opens up google using the chosen proxy IP, I want to use it in school because the website restrictions are completely broken, most websites are blocked for either sales or occult. I've been looking around on the web and I found a few things like HttpWebRequest and HttpWebResponse but I don't know how to use it, could someone link me to a website that explains this kind of thing or explain it on here please.
I've got this but its probably completely wrong.
In ProxyIps.txt there is a large list of proxy IP addresses.
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Text;<br />
using System.IO;<br />
using System.Net;<br />
<br />
namespace FirstWebProxy<br />
{<br />
class Program<br />
{<br />
static void Main(string[] args)<br />
{<br />
Console.WriteLine("Available proxys:");<br />
<br />
string[] lines = System.IO.File.ReadAllLines(@"C:\Users\user0\Documents\Visual Studio 2010\Projects\FirstWebProxy\ProxyIps.txt");<br />
<br />
foreach (string line in lines)<br />
{<br />
<br />
Console.WriteLine("\t" + line);<br />
}<br />
<br />
Console.WriteLine("Would you like to connect to a random server? Type Y or N");<br />
string r = Console.ReadLine();<br />
<br />
if (r =="Y" || r =="y") {<br />
<pre lang="cs">var p = new Random();<br />
var randomLineNumber = p.Next(0, lines.Length - 1);<br />
var host = lines[randomLineNumber];<br />
<br />
string url = "http://www.google.com/";<br />
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);<br />
WebProxy myproxy = new WebProxy(host, false);<br />
request.Proxy = myproxy;<br />
request.Method = "GET";<br />
HttpWebResponse response = (HttpWebResponse)request.GetResponse();<br />
}<br />
<br />
}<br />
}<br />
}<br />
<br />
Thanks in advance.
|
|
|
|
|
Member 10521793 wrote: but its probably completely wrong. Why do you think so? What does happen instead of what you expect to happen? Any error messages? Any missing functionality?
|
|
|
|
|
HttpWebResponse response = (HttpWebResponse)request.GetResponse(); - unable to connect to remote server.And how do I open chrome using the proxy I'm requesting?
Thanks in advance.
|
|
|
|
|
Unable to connect: is the IP address of the proxy correct? Does the proxy need credentials?
Chrome: That's a question of how to configure Chrome, not a question of C# coding!
|
|
|
|
|
Hello everyone,
I am looking for script which online convert Kurti dev to uni code and uni code yo kurti dev convert by script in C#.
Please help me for the script. how to write or anyone have ready made script.
|
|
|
|
|
|
Thanks but I already checked it but it is not complete script so if you have complete script then let me know?
|
|
|
|
|
Nope. Better ask that author & also Google.
|
|
|
|
|
Hello,
I am asking myself for a couple of hours how I can work around the following problem.
It seems that I need to create my PDF by using "Document" instead of PdfStamper to get the size and rotation. But there are two problems I have with this.
- The Opacity seems not to work (Docu //Overlay Transperency)
- I can't figure out how I can decide if the overlay is in background or foreground.
With
PdfContentByte cb1 = outputWriter.DirectContent; it seems always to be in the foreground. I can also create the PdfContentByte with
PdfContentByte cb1 = outputWriter.DirectContentUnder;
but I can't figure out how I can do something like this ...
if (<condition>)
PdfContentByte cb1 = outputWriter.DirectContentUnder;
else
PdfContentByte cb1 = outputWriter.DirectContent;
This is my code.
string TempFileName = "";
TempFileName = Path.GetTempFileName();
FilePdfReader = new PdfReader(FileMemoryStream);
Document inputDoc = new Document(FilePdfReader.GetPageSizeWithRotation(1));
using (FileStream fs = new FileStream(TempFileName, FileMode.Create))
{
PdfWriter outputWriter = PdfWriter.GetInstance(inputDoc,fs);
inputDoc.Open();
PdfContentByte cb1 = outputWriter.DirectContent;
PdfReader overlayReader = new PdfReader(OverlayMemoryStream);
PdfImportedPage overLay = outputWriter.GetImportedPage(overlayReader, 1);
PdfGState GState = new PdfGState();
int overlayRotation = overlayReader.GetPageRotation(1);
int n = FilePdfReader.NumberOfPages;
int i = 1;
while (i <= n)
{
inputDoc.SetPageSize(FilePdfReader.GetPageSizeWithRotation(i));
inputDoc.NewPage();
PdfImportedPage page = outputWriter.GetImportedPage(FilePdfReader, i);
int rotation = FilePdfReader.GetPageRotation(i);
if ( (OverlayFillOpacity != 0f) || (OverlayStrokeOpacity != 0f) )
{
GState.FillOpacity = OverlayFillOpacity;
GState.StrokeOpacity = OverlayStrokeOpacity;
cb1.SaveState();
cb1.SetGState(GState);
}
if (overlayRotation == 90 || overlayRotation == 270)
{
cb1.AddTemplate(overLay, 0, -1f, 1f, 0, 0,
FilePdfReader.GetPageSizeWithRotation(i).Height);
}
else
{
cb1.AddTemplate(overLay, 1f, 0, 0, 1f, 0, 0);
}
if (rotation == 90 || rotation == 270)
{
cb1.AddTemplate(page, 0, -1f, 1f, 0, 0,
FilePdfReader.GetPageSizeWithRotation(i).Height);
}
else
{
cb1.AddTemplate(page, 1f, 0, 0, 1f, 0, 0);
}
i++;
}
inputDoc.Close();
overlayReader.Close();
|
|
|
|
|
Hi,
I have a form for the user to enter how many passengers to add.
I would like to enter txtFirstName, txtLastName, cbodateOfBrith and txtPassportNumber for the x number of passengers entered in the previous form.
so if the user choosed 4 then 4 rows of the controls should be added.
how can I do this in WinForm?
Technology News @ www.JassimRahma.com
|
|
|
|
|
Doesn't sound like a good design.
You'll never get very far if all you do is follow instructions.
|
|
|
|
|
There are quite a few ways to do this, depending on your skill level and abilities:
1) You could create each control individually and add them in a row inside a panel
2) You could create a UserControl which has one of each of the controls you need and then add one of that for each passenger
3) You could use some grid based control instead - such as a DataGridView
But what you want is a bit...um...odd. The first thing which looks like a silly idea is "cbodateOfBrith" which I assume is a combobox for the date of birth. How many dates do you propose to put in that? 120 years worth?
Would you want to try and enter the date from that? Because I wouldn't! Consider a DateTimePicker instead...
And I wouldn't do it that way either: Instead of asking for the number of passengers, use a grid based control that the user can edit directly and let them add all the rows they need. This shows how to create a Calender control within a DataGridView: http://msdn.microsoft.com/en-us/library/7tas5c80.aspx[^]
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
When I am changing my design of my program and then run the program it's still using the previous design. I just seem to get it working, can someone help me cause I don't have a clue
Thanks
|
|
|
|
|
Are you rebuilding (i.e. recompiling) your app after you change it?
/ravi
|
|
|
|