39 Solved Topics

Remove Filter
Member Avatar for Mitja Bonca
Member Avatar for Balaji_1
0
245
Member Avatar for Mitja Bonca

I am doing some more coding on listView, and I can not figurate it out how to salve the problem that there is always just one checkBox on the listView checked. On the listView I have some names. When I load it there is already a checked name - so …

Member Avatar for DjpjAmador
0
1K
Member Avatar for Mitja Bonca

Hi, since this forum has been modified majorly (this happened approx. 6 months ago) nothing works at it should. There is a lot less people asking question (and answering on them), it seems like you have driven them away with these (not-good changes -personally it was whole much better before …

Member Avatar for Mitja Bonca
0
218
Member Avatar for Mitja Bonca

I have a small problem with printing reports (made by crystal reports). In Form1 I have a list of customers in a ListView (with checkboxes). If the users selects one customer (checkes ONE checkBox) the report is shown - and the report it self has on option to print. If …

Member Avatar for waqassilat
0
854
Member Avatar for Mitja Bonca

I am doing a crystal report with printing. I have encountered on this problem: [CODE] try { PrintDialog print = new PrintDialog(); print.ShowDialog(); crystalReportViewer1.ReportSource = cr1; crystalReportViewer1.PrintReport(); cr1.Refresh(); cr1.PrintToPrinter(1, true, 1, 1); } catch { //MessageBox.Show("Some error occured...", "Opozorilo", MessageBoxButtons.OK, MessageBoxIcon.Error); } [/CODE] I got an error on last line …

Member Avatar for hirenpatel53
0
323
Member Avatar for Mitja Bonca

I would like to know why sql query for month and year is working, and i[B]s not working for day[/B]: [CODE] string myQuery = "SELECT StudentName FROM Students WHERE " + "YEAR(Birth) BETWEEN @yearFrom AND @yearTo AND " + "MONTH(Birth) BETWEEN @monthFrom AND @monthTo AND " + "DAY(Birth) BETWEEN @dayFrom …

Member Avatar for finito
0
120
Member Avatar for Mitja Bonca

I would like to know how to programmatically call a mathod regarding on time. In my example I would like to call a method every hour. Can I use a Timer or is there something else?

Member Avatar for mcriscolo
0
933
Member Avatar for Mitja Bonca

How to put an image (BitMap) into a statusBar? I was trying with: 1. [CODE]statusBar1.Text = Properties.Resources.MyPucture;[/CODE] 2. [CODE]Bitmap myPic = new Bitmap(Properties.Resources.MyPucture); MethodToShowStatusBarImage() { statusBar1.Text = myPic; }[/CODE] but it is not working. Any clues how to salve this issue? And besides, I have found a lot of example …

Member Avatar for Diamonddrake
0
480
Member Avatar for Mitja Bonca

I would like to know how can I transfter a string value (a name or something) from Login class over static class to Form1? This code I have: 1. In program class: [CODE] static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] …

Member Avatar for kvprajapati
0
258
Member Avatar for Mitja Bonca

I would like to know if there is any other way to create a doc (or txt) file, then this way that I have in my code: [CODE] if (!System.IO.Directory.Exists(System.IO.Path.GetTempPath() + @"TestDirectory")) System.IO.Directory.CreateDirectory(System.IO.Path.GetTempPath() + @"TestDirectory"); string LogDatoteke = System.IO.Path.GetTempPath() + @"TestDirectory\TestFile.doc"; StreamWriter zapis; zapis = File.CreateText(LogDatoteke); zapis.WriteLine("Some text 1"); zapis.WriteLine(""); …

Member Avatar for apegram
0
113
Member Avatar for Mitja Bonca

I have a problem of reading a dateTime column from a database. I set a parameter which is a datetime, but it does not read it. I am wondering what could be wrong. This is how I have written a date and time in the database: [url]http://file.si/pthumbs/large/7216/C%23_datetime_Lista.JPG[/url] And this is …

Member Avatar for kvprajapati
0
92
Member Avatar for Mitja Bonca

I have: Table1: Service: - IDService - ServiceName Table2: Order: - IDOrder - IDServiceFK (foreigh key) I have database table called "Service", in which I store service names. Then I have another table called "Order", in which is the foreigh key of Service. Services are shown in the listView control. …

Member Avatar for apegram
0
156
Member Avatar for Mitja Bonca

How can I use a DataTable to save data into it? I have a listView with ticks, and when a tick is checked, I would like to put the data of the row into DataTable. In the row I have a "ProductName" and it`s "Price". I am doing this becuase …

Member Avatar for JuhaW
0
107
Member Avatar for Mitja Bonca

I have dates and times stored in the database - the data type of DateTime (for example: 17.1.2010 16.23.34 - dd.MM.yyyy hh.mm.ss) The parameter which I define it has too look ONLY of date ("dd.MM.yyyy"), because I want to get all the values on a specific date and the sum …

Member Avatar for Mitja Bonca
0
156
Member Avatar for Mitja Bonca

Why when I save a float value into database (the data type is float as well), for example 24,62 in database is writen as 24,6200008392334. I have entered only 2 decimals, but in db there is plenty of them. This is how I have: [CODE]string Together = textBoxAmount.Text; string[] Seperated …

Member Avatar for sknake
0
119
Member Avatar for Mitja Bonca

I have a listView, in 1st column is are article names, in 2nd column are prices of these articles (data type of float). And I have checkBoxes. What I would like to do, is to count the prices in 2nd column of all selected rows. And then the counted value …

Member Avatar for Mitja Bonca
0
3K
Member Avatar for Mitja Bonca

I get into DataSet CostumerNames and Hours (type DateTime) of their registrations. I would like to sort customers my time of registration (time of a day). I show both in listView. This is my code: [CODE] string DanesRezervacije = "SELECT Stranka.ImePriimek, Naročilo.RegisterTime FROM Stranka, Naročilo " + " WHERE Stranka.IDStranke …

Member Avatar for Mitja Bonca
0
121
Member Avatar for Mitja Bonca

I inserted a value of DateTime into database, like "26.12.2009 11:50:00" . Is it possible that the reader will read only the time of a day from this, without date? So far I did only that it reads everything, date and time: [CODE] string myTime = Convert.ToDateTime(dataGridView1.Rows[IndexVrstica].Cells[0].Value).ToShortTimeString(); DateTime myTime2 = …

Member Avatar for eeyc
0
3K
Member Avatar for Mitja Bonca

How can I simply do a list of hours - a date schedule (from 0 to 24) in a listView, that 1st column would show hours seperated by 30 min, 2nd column then will be filled with the name who will reserved that hour. Something like that: [URL="http://img189.imageshack.us/img189/5023/clistview02.jpg"]PICTURE[/URL].

Member Avatar for Mitja Bonca
0
140
Member Avatar for Mitja Bonca

How can I show a message in the statusBar for 5 seconds? I do some code, on the end I write out a message in statusBar (statusBar.Text = "Notification Message"; ). But I want that is shown for only 5 seconds. Then it dissapears (with statusBar.Text = ""; ) How …

Member Avatar for sknake
0
166
Member Avatar for Mitja Bonca

How to get row and column index when I double click (or some other event) of a cell on a ListView?

Member Avatar for Mitja Bonca
0
221
Member Avatar for Mitja Bonca

I would like to know if is possible to click on every single cell in a listView seperately, like in a datagridview? If I set a full row selection to false I am only able to select the cell in the 1st column. The point or this thread is, that …

Member Avatar for MrSpigot
0
143
Member Avatar for Mitja Bonca

How can I put a progress bar inside this code: (I was trying to use PerformStep method for counting rows in data table, and put this code, but no luck: [URL="How can I put a progress bar inside this code: (I was trying to use PerformStep method for counting rows …

Member Avatar for DdoubleD
0
205
Member Avatar for Mitja Bonca

I would like to do a seperated class with a method which will return CustomerID (this will be a select query from db), based on the Costumer`s name which would come into this method (it will come from a form1`s method - from a textBox). I am not sure how …

Member Avatar for DdoubleD
0
126
Member Avatar for Mitja Bonca

This is how I have a listView:[URL="http://img200.imageshack.us/img200/2497/clistview03.jpg"] PICTURE[/URL] For example, I have clicked on the 6th row (which is colored blue) and with a double click I want to insert "SomeName" into a 2nd column (called 1.rezervacija) beside the 9:30. How to do it so? I need something else, with …

Member Avatar for DdoubleD
0
194
Member Avatar for Mitja Bonca

I would like to ask someone, even someone has told me it is not possible. I have a child form2 which is always visible (there is a listView, which shows some data). Then I have a new child form 3 (which is currently opened) and the form3 now does come …

Member Avatar for Geekitygeek
0
123
Member Avatar for Mitja Bonca

I did an application, published and installed it. In my User`s Start Menu there is created a new folder with y shortcut to my application.exe inside. What`s bothering me is the name if this folder. It has a name, that I don`t know how and where to change it. I …

Member Avatar for Mitja Bonca
0
87
Member Avatar for Mitja Bonca

I have done and published application and this is what I got just after the installation: What can be wrong? PLATFORM VERSION INFO Windows : 5.1.2600.196608 (Win32NT) Common Language Runtime : 2.0.50727.3603 System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000) mscorwks.dll : 2.0.50727.3603 (GDR.050727-3600) dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000) dfshim.dll : 2.0.50727.3053 (netfxsp.050727-3000) SOURCES Deployment …

Member Avatar for DdoubleD
0
359
Member Avatar for Mitja Bonca

I am learing programming for a bit more then 6 months, and recently someone told me my concept is not the best one, he proposed me that I rather split my code into business logic layer and data access layer. And now I would like to ask someone if he …

Member Avatar for Mitja Bonca
0
238
Member Avatar for Mitja Bonca

This is the code I have: [CODE] public class BusinessLayer { public Employee[] GetAllEmployees() { Employee[] employees; DataSet myDataSet = DataBaseLayer.GetAllEmployees(); /// How can I convert the myDataSet to Employee List return employees; } }[/CODE]

Member Avatar for DdoubleD
0
2K
Member Avatar for Mitja Bonca

I have this code now for inserting new ID into database: [U]IDs are all primary key.[/U] [CODE] MaxID = 0; string GetMaxID = "SELECT MAX(IDPerson) AS IDPerson FROM Persons"; SqlCommand cmd = new SqlCommand(GetMaxID, sqlConn); sqlConn.Open(); SqlDataReader reader = cmd.ExecuteReader(); if (reader.Read()) { MaxID = reader.GetInt32(0); } MaxID++; reader.Close(); sqlConn.Close();[/CODE] …

Member Avatar for DdoubleD
0
165
Member Avatar for Mitja Bonca

I am doing an app which inclueds richTextBox, for inserting text. I put some text into richTextBox and save it into my sql database (column is varbinary(MAX) data type, with this code: [CODE]byte[] myFile = Encoding.UTF8.GetBytes(richTextBox1.Text);[/CODE] Here the text is changed into binary data, and them I add parameters and …

Member Avatar for sknake
0
1K
Member Avatar for Mitja Bonca

I have a form1 as a parent form (and is a MDI container) which is a parent for a lot of the other child forms. Now I would like to create a Login. It should be another windows form - formLogin called. And it has to start the 1st when …

Member Avatar for Geekitygeek
0
2K
Member Avatar for Mitja Bonca

I have a problem with alignment of the child form in a parent form. I would like to have this Form3 in the upper right corner of the Form1 - always - even when user changes the size of the form1. Form3 it has to be located there. The location …

Member Avatar for kvprajapati
0
100
Member Avatar for Mitja Bonca

I did like: [CODE]FileStream fs = new FileStream(System.IO.Path.GetTempPath() + @"\MyTempDir" + listBox1.SelectedItem", FileMode.Create);[/CODE] And you know what happens? It partly works. It opens the files (if its a pdf file, it opens in a acrobat reader, if doc it opens in word,...) but there is no file in that directory. …

Member Avatar for Mitja Bonca
0
159
Member Avatar for Mitja Bonca

1. How to retrieve stored file our of the database? have stored (for example) a pdf file into database, as a data type of varbinary(MAX) - binary data. How can I get this file back, like it was before? Important things I have stored for the particular file are: - …

Member Avatar for Mitja Bonca
0
2K
Member Avatar for Mitja Bonca

How to call a comboBox1_SelectedIndexChanged(object sender, EventArgs e) method from this code: [CODE]private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e) { // Get subdirectories from disk, add to treeView1 control AddDirectories(e.Node); // if node is collapsed, expand it. This allows single click to open folders. treeView1.SelectedNode.Expand(); // Get files from disk, add …

Member Avatar for DdoubleD
0
90
Member Avatar for Mitja Bonca

I have this code: [CODE]string[] dirs = Directory.GetFiles(@"c:\myFolder\", "*.doc"); [/CODE] How do I do the same code, if I change "*.doc" with the comboBox. I have done the code that a user selects a filter from the comboBox. I did: [CODE]string[] dirs = Directory.GetFiles(@"c:\myFolder\", comboBox1.SelectedItem.ToString());[/CODE] but it is not working... …

Member Avatar for Mitja Bonca
0
122
Member Avatar for Mitja Bonca

What I want to do is a drop down list (comboBox) that the user can see only selected files. For example, if user selects a Word Documents from a comboBox, on the explorer will be only visible a doc files. I have done a FileFilter class: [CODE]public class FileFilter { …

Member Avatar for DdoubleD
0
102

The End.