|
found another issue... I insert 3 6 fg and get an output of 4 7....
|
|
|
|
|
Im guessing you had been round the for loop a couple of times before you put the right input in?
I would suggest scrapping the user input code and starting again, sometimes its easier than fixing something.
You might want to break it down into smaller chunks, i.e get the input and store as a string, then try parsing it to an int and then if that works add it to the array, if not ask the user again. Repeat the above 3 times and bingo!
The code will be more verbose but it will be easier to debug and understand and once you have it working you can always go back over it and refactor it.
Terse code can look better but it can also be hard to understand and maintain.
|
|
|
|
|
I will do just that...
Going to go to the school and see if I can work on it there and get some more help.
Thanks everyone for trying to help me out, if anyone else can help out still that would be great, will pop in here often, C# is killing me
|
|
|
|
|
You'll get your head round it eventually! Its just a matter of getting used to the way of thinking. I'm assuming this is your first programming language?
|
|
|
|
|
we learned C and C++ but I was never very good at it, and every time we learn a new language the problems become more difficult. Also, we only study each language up to 2 or 3 months, its a 2 year college.
|
|
|
|
|
well, thanks to everyone for their help, I finished the assingment and now just hoping I did it well...
got things done easier but don't think it was a very efficiant way.
well, lets hope for the best
|
|
|
|
|
Hi all
I am trying to understand the Evidence class, but I am missing some point.
If I use the AddAssembly() method below in the main of my program,
am I supposed to expect to have my program signed with that strong name?
What's main use case for Evidence class?
Thanks
Mn
<br />
string sPubKeyBlob = "00240000048000009400000006020000" +<br />
"00240000525341310004000001000100" +<br />
"19390E945A40FB5730204A25FA5DC4DA" +<br />
"B18688B412CB0EDB87A6EFC50E2796C9" +<br />
"B41AD3040A7E46E4A02516C598678636" +<br />
"44A0F74C39B7AB9C38C01F10AF4A5752" +<br />
"BFBCDF7E6DD826676AD031E7BCE63393" +<br />
"495BAD2CA4BE03B529A73C95E5B06BE7" +<br />
"35CA0F622C63E8F54171BD73E4C8F193" +<br />
"CB2664163719CA41F8159B8AC88F8CD3";<br />
Byte[] pubkey = HexsToArray(sPubKeyBlob);<br />
<br />
StrongName sn = new StrongName(<br />
new System.Security.Permissions.StrongNamePublicKeyBlob(pubkey),<br />
"Manu",new Version(2,1,1,0));<br />
<br />
object[] z = new object[]{ <br />
new Zone(SecurityZone.Internet), sn };<br />
Evidence ev = new Evidence();<br />
ev.AddAssembly(z);<br />
|
|
|
|
|
|
Hi,
I have 2 machine which is in LAN. 1st Machine is Admin and other machine is Customer. There is one online application where SuperAdmin create the user Admin and assign access rights to Admin.
When Admin connect to online application it is using username and password to connect to online application which is created by SuperAdmin. Admin has its own control panel where he can create user and assign username and password to his(Admin's) user which is in LAN.
At the Admin Side one windows application is used where onle Admin can connect to online applications database. If his subuser login he dont have access to connect to the online applications database. At the admin side there is no database. Admin can connect to the online database,get the required details and stored it into cache.
Here Admin's User(subuser) can access the cache data,modify or delete the data and again store it into the cache. So that once the operation completed it will store it into the cache and then update the online database.
Admin's user connect to admin's compuer through LAN only and only Admin can connect to the online database.
Now I want Solution for that where I dont want to use any database at the Admin's position. Admin can access the online database using web service.
but for his user want to setup cache(or any other solution) so that his user can access the data.
That is my scenario is there is main online database where admin use his data and that is share with his user. His user don't have any access to the online database.
So how can i use cache on the admins subusers side. How can i access cache data.
Thanks
sjs4u
|
|
|
|
|
Hi,
so if I understood you correctly, you need something providing data (without database) at the admin side. What about storing an XML file? Or think about extending the webservice to handle with different roles (superadmin, admin and subside admin).
Regards
Sebastian
P.S.: But I would choose to build a local database...
|
|
|
|
|
Thanks for the reply.
At the admins computer he can able to connect to the online database and stored it into the cache but his user/subusers can only use cache or any other solution for that.
Thanks
sjs4u
|
|
|
|
|
Hello, I have an errand to use a C++ written library in C# project.
That's why I need to make a wrapper or anything to do with it.
The library is MCU for PolyCam, it came out with includes (.h files), Release folder with 3 .lib files and 1 .dll files.
I've asked Mr.Google for this problem and many people told me about P/Invoke (DllImport), C++/CLI, and more, but the problem is that I don't have an example to do this. The example I have from P/Invoke is only from a single .dll, but in my case, I have a whole library (.h, .lib, .dll) with me.
So, I want to ask how to make a wrapper from C++ library to C#.
Thanks in advance.
|
|
|
|
|
|
I've read the link before, but many links only use 1 .dll, whilst I have a set of 3.lib, a folder of .h and 1 .dll, will they differ each other?
Well, I haven't tried it yet though.
|
|
|
|
|
The chances are (in my experience) that the dll will have all the functions etc you need. The h files(s) will have the function prototypes and structs that will be needed to use the functions in the dll.
Examine the header files and replicate/wrap what you see in them and use what you have to call using PInvoke the functions in the dll and you should pretty much have your wrapper.
Examining the h and lib files with notepad should be enough to get underway.
|
|
|
|
|
hi.
i make a InOut Time report which have 3 parameters (1) employe id # (2) todate (3)fromdate;
i select employe id "111" , todate(1-sep-2009) and fromdate(09-sep-2009) report show all data of employe of given date like this..
ATT_DATE ID TIMEIN
1 Sep 09 111 8:22
3 Sep 09 111 8:24
4 Sep 09 111 8:15
6 Sep 09 111 8:25
7 Sep 09 111 8:22
9 Sep 09 111 8:24
one problem in my report is that 2 sep,5 sep and 8 sep is not shown in my report becouse employe is absent in these days. i want to show all date 1 sep 2009 to 9 sep 2009.
hope u understand my question
thanks in advance
jawad kahtri
|
|
|
|
|
Your question makes no sense. Your todate is later than your from date, I assume this is a typo. I assume your report is returning exactly what you asked for. You seem to be saying that you want to show dates even if the employee was not there, then. So, you need to write code that will do that. I'm not sure what sort of response you were expecting, we can't fix your code without seeing it, and it's obvious that you need to change how the code works to get the date range the way you want it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I am assuming you are looking for a query (and therefore this should have been asked in the General Database forum) in sql.
Select the dates between 1/sep and 9/sep (probably insert then into a table variable would be easiest) then do a left join from the date table to your timereport table, this will show all the dates and the attendance records.
|
|
|
|
|
in a DataGridView can each row bind to a different custom data source ((BindingList)) ?
|
|
|
|
|
No. The point of a databound control is to bind to a data source. You'd have to create a custom data source that grabbed data from the different sources you want to use.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
1) first, i think it's possible to bind a row, but i have not used;
2) why not to use 'for' loop to set row's value.
modified 27-May-14 5:30am.
|
|
|
|
|
Hi,
I have a project in 3 tier Architecture structure. There are GUI (presentation layer), BLL (Business logic layer) and DAL (Data Access Layer). Based my understanding dll always stick to exe in order to run my program. 3 tier is good in development management and enhancement.
Here is my question is it is any way to make my “dll” store application server (computer / App server) and user only keep the “exe”
e.g. hardware “–“ (link)
DB (Database server) – DLL(Application server, which is store the dll only) – EXE (multiple user, which is store exe only)
I used on Assembly Configuration Files. But it’s only help on probing those dll in subsidiary folder only. And it is FAIL probing to network path.
COM+ I added all dll in server application. It can be work if exe is running stand alone. But It is fail while user (user’s COM+ added the dll for his/her computer but point to server dll folder) run the exe in stand alone.
It is possible the exe can be run in a pc which is can refer the dll to application server? Purposely to separate my “dll” and “exe” is easy for me to do updating (Business logic changes only) hence I no need to update all users versions pc by pc.
Please give me a solution. Thank you.
|
|
|
|
|
Member 2321293 wrote: Here is my question is it is any way to make my “dll” store application server (computer / App server) and user only keep the “exe”
No. You can make your actual database anywhere you like, but the dll is the code to access that database. The user needs it. Unless you can distribute it on a local network with something like COM+, as you say. It still sounds dodgy to me.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
One possible solution is to implement Service layer above BLL code and DAL code. This service layer will wrap methods from these two assemblies in web service methods or WCF methods. By this, you can deploy different app layers on different machine. Additionaly, implementing Load balancing on application layer will not be a problem.
The service layer will represent nice interface for your exe to be used.
Let me sketch your scenario...
Presentation layer (EXE)
------------------------
BLL WCF Services
------------------------
BLL assembly
------------------------
DAL WCF Services
------------------------
DAL assembly
Your exe will reference BLL WCF service that can be deployed on any PC.
Your BLL code will reference DAL WCF service that can also be deployed on any PC.
I hope it will clear some issues for you.
|
|
|
|
|
So i need to come out a new Layer which is call service layer(WCF)?
Can give me a clear direction what is the WCF structure look like?
Thank you,
|
|
|
|