fateos
fateos
CC#
Created by fateos on 4/3/2024 in #help
C# - Oracle DataBase Converting the Date (Oracle) to a c# DateTime Property
How can I replace TO_TIMESTAMP in my select query with the format my c# code uses? I have a class with a gps_timestamp property as a DateTime but it seems it has a Problem Converting the value to a DateTime Property. I don´t know how I can solve this in my select clause. If I do the conversion later (timezone) I would need to go through a lot of gps point and check always if the table also has the right Timezone value (e.x MEZ,BST,..) that would slow down the performance. string selectGpsInfo = @" SELECT gps_gpsid, gps_latitude, gps_longitude, gps_tzname, CASE WHEN gps_tzname IS NOT NULL THEN TO_CHAR( FROM_TZ( TO_TIMESTAMP(gps_timestamp, 'YYYY.MM.DD HH24:MI:SS'), gps_tzname ) AT TIME ZONE SESSIONTIMEZONE, 'YYYY.MM.DD HH24:MI:SS' ) ELSE TO_CHAR( TO_TIMESTAMP(gps_timestamp, 'YYYY.MM.DD HH24:MI:SS'), 'YYYY.MM.DD HH24:MI:SS' ) END AS gps_timestamp, c# property in my GPS class: [FieldnameAttribute("gps_timestamp")] public DateTime gps_timestamp { get; set; }
1 replies
CC#
Created by fateos on 10/11/2023 in #help
❔ Panel scroll bar only vertical
No description
5 replies
CC#
Created by fateos on 10/3/2023 in #help
❔ Understanding the model-view-controller
if there is a good example with code I would be thankful if you linked it here. So from what I understand correct me if I am wrong: I have these classes: Model: Dog.cs,Person.cs .. View: form.cs Controller: logic.cs right now if I do a winforms app lets say my view is the events (code in form.cs) then i do separate class for the model (for example person class dog class and so on) and the controller class that manages the logic Do I put the proper method call in the click events in my form.cs? and the method calls all come from my controller class right? so in my form.cs I have a click event in that click event I say for example "controller.CreatePerson(name,age..);" and this controller class has access to the Dog,Person class through composition There could be also some ifs in my form.cs depending on if I want to do certain logic only if that checkbox is checked for example and so on. But then the logic is not all in my logic.cs did I get this concept right? Looking at this Picture on this link: https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller the Model updates the view but how would that look in this code example? I thought the models are just the "object classes"
84 replies
CC#
Created by fateos on 4/9/2023 in #help
❔ WPF Problem
7 replies
CC#
Created by fateos on 4/8/2023 in #help
❔ Learning C#
Hello Guys, I have been doing a lot of theory lately (WinForms) to see whats possible and see the basics. Now I wanna practise with little programs. I have already done Numberguessing and Connect4 both of them were really fun to program. What else would you recommend programming? Which database is preferable if I want to program something with it SQLite or MS Access? I also see lots of people recommending just to code but as long as you don´t get feedback for it is it really gonna get u to get better as a programmer? Don´t wanna get into bad habits and want to learn coding properly. Any help appreciated
125 replies
CC#
Created by fateos on 3/30/2023 in #help
❔ Class Diagram Design question
3 replies
CC#
Created by fateos on 3/29/2023 in #help
❔ Project structure
1. In my Solution there should be only 1 Project right? Unless its a big App 2. I started using folders in my Project 1 for all interfaces, 1 for all the Items lets say, 1 for all the character types(player,monster,npc) and so on. Is there a better way to structure your project? 3. I created a GitHub acc. Now I wanna structure the Projects that I wanna show off to companies but also keep other projects private (small projects or stuff I don´t wanna show to other people) Is it even a good idea to link my github to companies because I saw that they could see my commit history and every change made (some of my commits are dumb since I am also playing around getting to know git a bit more)... 4. Same as 3. but local project structure. So since I just started I have lots of different "small" projects. Kind of embarassing if I would put them all on my github repo. But they have little cool implementations that I would want to have access to lets say maybe even at work. How would you guys go about this? Thanks in advance!
47 replies
CC#
Created by fateos on 3/29/2023 in #help
❔ HeadFirst Design Pattern
66 replies