|
okay .thanx again for all the help
|
|
|
|
|
It seems you've bitten off much more than you can chew. Creating a POS from scratch is a task more suited for an architect. Implementing pieces of a POS (or any enterprise application) can be done by developers of varying experience. I don't mean to belittle you, but am just making an honest observation.
A request: please don't use txtspk in your posts. Thanks.
/ravi
|
|
|
|
|
all comments welcome so dont stress, thnx for your advice and whats txtspk ?
|
|
|
|
|
jamesmc1535 wrote: whats txtspk ? It's how you type when texting - i.e. omission of vowels from words. It's not very welcome at CodeProject because it gives the impression that you don't want to take the trouble to properly ask a question, yet expect the CP community to respond to your request for assistance.
/ravi
|
|
|
|
|
okay i understand but i dont do it on purpose , infact i didnt even recognize im doing it until you pointed it out
|
|
|
|
|
I would second Pete's recommendation of Jon Skeet's, excellent, book. However, as the name implies, it is and 'in depth' look at C# and might be advanced for a beginner.
Microsoft Virtual Academy offers free beginner's courses in C# and more advanced topics.
Good luck.
|
|
|
|
|
thanx for all the feedback , ill do my best, ive imprved alot since that message so things are looking good
|
|
|
|
|
Hi,
We have Relay server in our landscape and trying to register device to SMP server.
i have included SAP mobile platform SDK into Xamarin.ios app, but when am trying to connect to smp through relay server like,
URL:https://........................
Headers :-
Content-Type : application/xml
X-SMP-APPCID:
Body:-
<?xml version="1.0" encoding="utf-8”?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns ="http://schemas.microsoft.com/ado/2007/08/dataservices"”>
<content type="application/xml”>
<m:properties>
<d:DeviceType>iPhone</d:DeviceType>
</m:properties>
</content>
i couldn't get register device to SMP server.
please guide.
|
|
|
|
|
Does this have anything to do with C#?
|
|
|
|
|
Hey, my question is above..
I used this example: C# does Shell, Part 3[^]
This is the relevant code:
namespace Sidebar
{
public partial class frmSidebar : ShellLib.ApplicationDesktopToolbar
{
Dictionary<string, string> apps;
#region "General Loading"
public frmSidebar()
{
InitializeComponent();
}
private void frmSidebar_Load(object sender, EventArgs e)
{
// setup basics
this.Edge = AppBarEdges.Right; // should place the window(defined as "None" in FormBorderStyle)
// unrelevant stuff
}
Screenshots:
blacktech.hol.es/coding/sidebar.png
Best regards, blacktech!
|
|
|
|
|
//edit1: it functions when i set the borderstyle to anything but none... but i only want my fancy sidebar! ... can u hlp me m8s?
BR, blacktech
|
|
|
|
|
Please use the forum at the end of the article.
|
|
|
|
|
Ok, sry oversaw it^^ Hope smbd. can help me there..
//closed
|
|
|
|
|
Hi,
I have a function which retruns a pdf as a byte[]
private static CreatePDF()
{
byte[] pdf;
return pdf;
}
If I call this function this way:
byte[] MyPdf = CreatePDF()
How can I save MyPdf to disk as a pdf file (c:\path\Filename.pdf) ?
I'm using .NET 2
Thanks
|
|
|
|
|
Try:
File.WriteAllBytes(@"C:\Path\Filename.pdf", MyPdf);
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Thanks very much. I'll try it and check if it works.
|
|
|
|
|
Dear Forum Members,
I started learning c# by making some applications. Recently i made an application where you can add an employee and his rate (per hour) in a database. When you add the employee, it should update the database and show a report of the amount of employees.
I can add an employee and it shows the new entry in the table, but when i refresh the report, it shows no new entries. When i close the application and start it over, it shows the new employee.
I can't figure out what i did wrong. Could someone help me out?
Source code:
This part is the main form, where you can see the report:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Employeereport
{
public partial class Employeestart : Form
{
public Employeestart()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.TableTableAdapter.Fill(this.employeeDatabase.Table);
this.reportViewer1.RefreshReport();
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
addEmployee medewerker = new addEmployee();
medewerker.ShowDialog();
}
private void reportViewer1_Load(object sender, EventArgs e)
{
}
}
}
When you press the "add new employee" button it opens a new form where you can add the employee and his rate. Next to this there is a table where the entry is added:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Employeereport
{
public partial class addEmployee : Form
{
public addEmployee()
{
InitializeComponent();
}
private void tableBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
this.Validate();
this.tableBindingSource.EndEdit();
this.tableAdapterManager.UpdateAll(this.employeeDatabase);
}
private void addEmployee_Load(object sender, EventArgs e)
{
this.tableTableAdapter.Fill(this.employeeDatabase.Table);
}
}
}
I added my project files here:
https://www.dropbox.com/s/1klokwyupx78tuz/Employeeapplication.zip?dl=0[^]
Thanks in advance!
modified 12-Jul-15 11:52am.
|
|
|
|
|
I'm not going to download a random project and wade through the whole thing trying to work out what you have done, and what is relevant and what isn't. It's not a good use of my time.
So instead, edit your question, dump the source link and paste in the relevant code fragments (in <pre>tags via the "code" widget) so it looks like this:
public string MyMethod(int value)
{
return (value + 1).ToString();
} That way, none of us have to try and work out what part of your code is involved in your problem.
Help us to help you!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Dear OriginalGriff,
Thanks for the feedback, you are totally right. I added the source code.
|
|
|
|
|
First, don't put any code in your Form_Load event. Put that kind of code into it's own method, called something like PopulateEmployeeDGV . You can then call that code form the Form_Load event.
Next, after your call to ShowDialog to get the new employee, call your PopulateEmployeeDGV to refresh the data you have in your code and update the DGV with it.
|
|
|
|
|
Thanks a lot that did the job for me! Will read the guide too, thanks for the link.
|
|
|
|
|
1) From what I can see Linq-To_Sql is using ADO under the hood. is it then just pulling data into DataTables and then converting a DataRow to an entity class?
2) Is EF using ADO Also?
3) How does EF handle changes? Does it track each field's change, mean does it know if a specific property on an entity has changed? Or are changes tracked at the record level? I could use a quick primer on this.
4) I already have a DB and an Entity project which contains POCO's. These classes have no code except for properties, and when I create them, in most cases they match the tables exactly. I've heard that EF entities are bloated and contain a lot od DB code. Can someone enlighten me?
5) is it possible to tell EF to use my POCO's? Does this mean some kind of mapping?
Thank you
If it's not broken, fix it until it is
|
|
|
|
|
1) & 2) Both use ADO.NET behind the scenes. They use ExecuteReader / IDataReader to read the records and convert them into entity objects, which avoids keeping two copies of the data in memory.
3) EF tracks changes at the property level. You can access this information by calling:
DbPropertyEntry entry = context.Entry(yourEntity).Property("PropertyName");
object currentValue = entry.CurrentValue;
object originalValue = entry.OriginalValue;
bool isModified = entry.IsModified;
DbPropertyValues databaseValues = entry.GetDatabaseValues();
object valueCurrentlyInTheDatabase = databaseValues["PropertyName"];
4) & 5) If your POCO classes match the database exactly, and have sensible property names, you should be able to use them without any changes. You might want to mark the properties as virtual , to allow lazy-loading of collections, but you shouldn't need to add any DB code.
If the classes don't match exactly, then you need to set up a mapping. You can either do this by adding annotation attributes to the properties[^] in the class; creating a separate meta-data class with the attributes, and adding the MetadataType attribute to your real class; or using the fluent mapping API[^].
Typically, using the existing POCOs would be as simple as:
public class YourContext : DbContext
{
public DbSet<Foo> Foos
{
get { return Set<Foo>(); }
}
public DbSet<Bar> Bars
{
get { return Set<Bar>(); }
}
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thanks.. Good info
If it's not broken, fix it until it is
|
|
|
|
|
Hello my friends i want to set up a form wich have two texboxes ,the first one for wifi name the second one for password and button of connect wich give a message box if password correct or not
|
|
|
|