Форум программистов, компьютерный форум, киберфорум
C#: Базы данных
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.58/133: Рейтинг темы: голосов - 133, средняя оценка - 4.58
 Аватар для Irina1094
0 / 0 / 0
Регистрация: 29.05.2014
Сообщений: 14

Клиентское приложение (оболочка) на C# для БД (MS SQL Server)

29.05.2014, 16:11. Показов 27743. Ответов 7
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Необходимо создать клиентское приложение на С# на тему Агентство по организации праздников. Необходимо, чтобы через приложение добавлялись данные в базу, удалялись, обновлялись, при выборе клиента, можно было просматривать доп. информацию о нем и о заказанном мероприятии.

Помогите пожалуйста, кто чем может!
0
cpp_developer
Эксперт
20123 / 5690 / 1417
Регистрация: 09.04.2010
Сообщений: 22,546
Блог
29.05.2014, 16:11
Ответы с готовыми решениями:

SQL Server и клиентское приложение
Всем доброго времени суток. Друзья подскажите пожалуйста как правильно сделать. Есть обширная база данных на SQL Server 2014 с кучей...

Создать клиентское приложение, работающее с несколькими типами баз данных: Paradox, Access, SQL
помогите разобраться, мне нужно создать клиентское приложение, работающее с несколькими типами баз данных Paradox, Access, SQl.Как это ...

Многопользовательское приложение для работы с БД SQL Server
Собственно проблема в том, что мне нужно 3 вида пользователя: Админ, Редактор БД, Пользователь. При входе в программу пользователь...

7
 Аватар для Павлик Морозов
138 / 137 / 42
Регистрация: 26.10.2012
Сообщений: 443
29.05.2014, 22:51
Уточните какого рода помощь нужна. Идеи как сделать или вам готовое решение нужно?
0
 Аватар для Irina1094
0 / 0 / 0
Регистрация: 29.05.2014
Сообщений: 14
30.05.2014, 06:06  [ТС]
Было бы идеально, если было бы готовое решение.
Но от идей по разработке я бы тоже не отказалась.
0
1047 / 531 / 66
Регистрация: 16.01.2013
Сообщений: 4,094
30.05.2014, 10:10
Irina1094, могу предложить только это Программа CRM (Система управления взаимоотношениями с клиентами) обсуждения доработка
0
 Аватар для Irina1094
0 / 0 / 0
Регистрация: 29.05.2014
Сообщений: 14
30.05.2014, 18:20  [ТС]
Павлик Морозов, Было бы идеально, если было бы готовое решение.
Но от идей по разработке я бы тоже не отказалась.
0
Заблокирован
30.05.2014, 19:05
База данных была медицинского характера, 6 полей в таблице, Access-2000

SQL
1
CREATE TABLE diagnosis ( id_p  INT, name  VARCHAR(255), VALUE  INT, id_t  INT, stage  INT, diagnosis VARCHAR(255)  )ENGINE=InnoDB DEFAULT CHARSET=utf8;
Класс Session
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
 
namespace СУБД_ООП_Cs_2008
{
    public class Session
    {
        OleDbConnection connection;
        OleDbCommand command;
 
 
        public void ConnectTo()
        {
            connection = new OleDbConnection("provider=microsoft.jet.oledb.4.0; data source=" + System.Windows.Forms.Application.StartupPath + "\\dbTest.mdb");
            command = connection.CreateCommand();
        }
 
        public Session()
        {
            ConnectTo();
        }
 
 
        public void Insert(Description description)
        {
            try
            {
                command.CommandText = "INSERT INTO temp (id_p, name, [value], id_t, stage, diagnosis) VALUES(' " +
                    description.id_p + " ', ' " + description.name  + " ', ' " +
                    description.myvalue + " ', ' " + description.id_t + " ', ' " +
                    description.stage + " ', ' " + description.diagnosis + " ' );";
               //command.CommandType =  command.CommandText;
               //command.CommandType = CommandType.Text;
                
                connection.Open();
 
                command.ExecuteNonQuery();
            }
 
            catch (Exception)
    
            {
                throw;
            }
 
 
            finally
            {
                if (connection != null)
                {
                    connection.Close();
                }
            }
        }
        //завершился метод
 
        public List<Description> FillComboBox()
        {
            List<Description> descriptionsList = new List<Description>();
 
            try
            {
                command.CommandText = "SELECT * FROM temp;" ;
                //(id_p, name, [value], id_t, stage, diagnosis) VALUES(' " + 
                //    description.id_p + " ', ' " + description.name  + " ', ' " +
                //    description.myvalue + " ', ' " + description.id_t + " ', ' " +
                //    description.stage + " ', ' " + description.diagnosis + " ' );";
                connection.Open();
 
                OleDbDataReader reader = command.ExecuteReader();
 
                while (reader.Read())
                {
                    Description description = new Description();
                    description.id = Convert.ToInt32(reader["id"].ToString());
                    description.id_p = reader["id_p"].ToString();
                    //MessageBox.Show(description.id_p);
                    description.name = reader["name"].ToString();
                    description.myvalue = reader["value"].ToString();
                    description.id_t = reader["id_t"].ToString();
                    description.stage = reader["stage"].ToString();
                    description.diagnosis = reader["diagnosis"].ToString();
 
                    descriptionsList.Add(description);
                }
 
                return descriptionsList;
            }
 
            catch (Exception)
            {
                throw;
            }
 
 
            finally
            {
                if (connection != null)
                {
                    connection.Close();
                }
            }
 
        }
 
        //---------------------------------
         public void Update(Description oldDescription, Description newDescription)
 {
 
   try
   {
   command.CommandText = "UPDATE temp SET id_p = "+newDescription.id_p + 
       ", name = "+newDescription.name + ", [value] = "+newDescription.myvalue + 
       ", id_t = "+newDescription.id_t + ", stage = "+newDescription.stage + 
       ", diagnosis = "+newDescription.diagnosis + " WHERE ID = " + oldDescription.id;
 
   connection.Open();
 
   command.ExecuteNonQuery();
    }
 
    catch (Exception)
            {
                throw;
            }
 
 
            finally
            {
                if (connection != null)
                {
                    connection.Close();
                }
            }
 
        }
        //-----------------------------------------------
        public void Delete(Description description)
 {
 
   try
   {
   command.CommandText = "DELETE FROM temp WHERE ID = "+description.id;
 
   connection.Open();
 
   command.ExecuteNonQuery();
    }
   catch (Exception)
            {
                throw;
            }
 
 
            finally
            {
                if (connection != null)
                {
                    connection.Close();
                }
            }
 
        }
//------------------------------------------------
    }
}
Класс Description
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace СУБД_ООП_Cs_2008
{
    public class Description
    {
        public int id;
        public string id_p;
        public string name;
        public string myvalue;
        public string id_t;
        public string stage;
        public string diagnosis;
 
        public override string ToString()
        {
            return Convert.ToString(id) + "  " + id_p + "  " + name
                + "  " + myvalue + "  " + id_t + "  " + stage + "  " + diagnosis;
        }
 
    }
}
Form1.cs
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
//using Session;
//using Description;
 
namespace СУБД_ООП_Cs_2008
{
    public partial class Form1 : Form
    {
        Session session = new Session(); 
 
        public Form1()
        {
            InitializeComponent();
        }
 
        private void buttonInsert_Click(object sender, EventArgs e)
        {
 
            Description description = new Description();
            description.id_p = textBox1.Text;
            description.name = textBox2.Text;
            description.myvalue = textBox3.Text;
            description.id_t = textBox4.Text;
            description.stage = textBox5.Text;
            description.diagnosis = textBox6.Text;
            string CommandText = "INSERT INTO temp (id_p, name, value, id_t, stage, diagnosis) VALUES(' " +
                    description.id_p + " ', ' " + description.name + " ', ' " +
                    description.myvalue + " ', ' " + description.id_t + " ', ' " +
                    description.stage + " ', ' " + description.diagnosis + " ' )";
            textBox7.Text = CommandText;
            session.Insert(description);
        }
 
        private void buttonSelect_Click(object sender, EventArgs e)
        {
 
            comboBox1.DataSource = session.FillComboBox();
        }
 
        private void buttonUpdate_Click(object sender, EventArgs e)
        {
            Description oldDescription = new Description();
            Description newDescription = new Description();
            oldDescription = comboBox1.SelectedItem as Description;
 
            newDescription.id_p = textBox1.Text;
            newDescription.name = textBox2.Text;
            newDescription.myvalue = textBox3.Text;
            newDescription.id_t = textBox4.Text;
            newDescription.stage = textBox5.Text;
            newDescription.diagnosis = textBox6.Text;
 
            string CommandText = "UPDATE temp SET id_p = " + newDescription.id_p +
       ", name = " + newDescription.name + ", [value] = " + newDescription.myvalue +
       ", id_t = " + newDescription.id_t + ", stage = " + newDescription.stage +
       ", diagnosis = " + newDescription.diagnosis + " WHERE ID = " + oldDescription.id;
            textBox7.Text = CommandText;
 
            session.Update(oldDescription, newDescription);
        }
 
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            Description description = new Description();
            description = comboBox1.SelectedItem as Description;
            session.Delete(description);
        }
    }
}
Form1.Designer.cs
C#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
namespace СУБД_ООП_Cs_2008
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Windows Form Designer generated code
 
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.buttonInsert = new System.Windows.Forms.Button();
            this.label1 = new System.Windows.Forms.Label();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.textBox2 = new System.Windows.Forms.TextBox();
            this.label2 = new System.Windows.Forms.Label();
            this.textBox3 = new System.Windows.Forms.TextBox();
            this.label3 = new System.Windows.Forms.Label();
            this.textBox4 = new System.Windows.Forms.TextBox();
            this.label4 = new System.Windows.Forms.Label();
            this.textBox5 = new System.Windows.Forms.TextBox();
            this.label5 = new System.Windows.Forms.Label();
            this.textBox6 = new System.Windows.Forms.TextBox();
            this.label6 = new System.Windows.Forms.Label();
            this.buttonSelect = new System.Windows.Forms.Button();
            this.buttonUpdate = new System.Windows.Forms.Button();
            this.buttonDelete = new System.Windows.Forms.Button();
            this.comboBox1 = new System.Windows.Forms.ComboBox();
            this.bindingNavigator1 = new System.Windows.Forms.BindingNavigator(this.components);
            this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
            this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
            this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
            this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
            this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
            this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
            this.textBox7 = new System.Windows.Forms.TextBox();
            ((System.ComponentModel.ISupportInitialize)(this.bindingNavigator1)).BeginInit();
            this.bindingNavigator1.SuspendLayout();
            this.SuspendLayout();
            // 
            // buttonInsert
            // 
            this.buttonInsert.Location = new System.Drawing.Point(196, 28);
            this.buttonInsert.Name = "buttonInsert";
            this.buttonInsert.Size = new System.Drawing.Size(75, 23);
            this.buttonInsert.TabIndex = 0;
            this.buttonInsert.Text = "Insert";
            this.buttonInsert.UseVisualStyleBackColor = true;
            this.buttonInsert.Click += new System.EventHandler(this.buttonInsert_Click);
            // 
            // label1
            // 
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(12, 33);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(27, 13);
            this.label1.TabIndex = 1;
            this.label1.Text = "id_p";
            // 
            // textBox1
            // 
            this.textBox1.Location = new System.Drawing.Point(79, 28);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(100, 20);
            this.textBox1.TabIndex = 2;
            // 
            // textBox2
            // 
            this.textBox2.Location = new System.Drawing.Point(47, 57);
            this.textBox2.Name = "textBox2";
            this.textBox2.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
            this.textBox2.Size = new System.Drawing.Size(443, 20);
            this.textBox2.TabIndex = 4;
            // 
            // label2
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(8, 60);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(33, 13);
            this.label2.TabIndex = 3;
            this.label2.Text = "name";
            // 
            // textBox3
            // 
            this.textBox3.Location = new System.Drawing.Point(79, 83);
            this.textBox3.Name = "textBox3";
            this.textBox3.Size = new System.Drawing.Size(100, 20);
            this.textBox3.TabIndex = 6;
            // 
            // label3
            // 
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(8, 86);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(33, 13);
            this.label3.TabIndex = 5;
            this.label3.Text = "value";
            // 
            // textBox4
            // 
            this.textBox4.Location = new System.Drawing.Point(79, 109);
            this.textBox4.Name = "textBox4";
            this.textBox4.Size = new System.Drawing.Size(100, 20);
            this.textBox4.TabIndex = 8;
            // 
            // label4
            // 
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(8, 112);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(24, 13);
            this.label4.TabIndex = 7;
            this.label4.Text = "id_t";
            // 
            // textBox5
            // 
            this.textBox5.Location = new System.Drawing.Point(79, 135);
            this.textBox5.Name = "textBox5";
            this.textBox5.Size = new System.Drawing.Size(100, 20);
            this.textBox5.TabIndex = 10;
            // 
            // label5
            // 
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(8, 138);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(33, 13);
            this.label5.TabIndex = 9;
            this.label5.Text = "stage";
            // 
            // textBox6
            // 
            this.textBox6.Location = new System.Drawing.Point(79, 161);
            this.textBox6.Name = "textBox6";
            this.textBox6.Size = new System.Drawing.Size(100, 20);
            this.textBox6.TabIndex = 12;
            // 
            // label6
            // 
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(8, 164);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(54, 13);
            this.label6.TabIndex = 11;
            this.label6.Text = "diagnosis ";
            // 
            // buttonSelect
            // 
            this.buttonSelect.Location = new System.Drawing.Point(196, 86);
            this.buttonSelect.Name = "buttonSelect";
            this.buttonSelect.Size = new System.Drawing.Size(75, 23);
            this.buttonSelect.TabIndex = 13;
            this.buttonSelect.Text = "Select All";
            this.buttonSelect.UseVisualStyleBackColor = true;
            this.buttonSelect.Click += new System.EventHandler(this.buttonSelect_Click);
            // 
            // buttonUpdate
            // 
            this.buttonUpdate.Location = new System.Drawing.Point(196, 112);
            this.buttonUpdate.Name = "buttonUpdate";
            this.buttonUpdate.Size = new System.Drawing.Size(75, 23);
            this.buttonUpdate.TabIndex = 14;
            this.buttonUpdate.Text = "Update";
            this.buttonUpdate.UseVisualStyleBackColor = true;
            this.buttonUpdate.Click += new System.EventHandler(this.buttonUpdate_Click);
            // 
            // buttonDelete
            // 
            this.buttonDelete.Location = new System.Drawing.Point(196, 138);
            this.buttonDelete.Name = "buttonDelete";
            this.buttonDelete.Size = new System.Drawing.Size(75, 23);
            this.buttonDelete.TabIndex = 15;
            this.buttonDelete.Text = "Delete";
            this.buttonDelete.UseVisualStyleBackColor = true;
            this.buttonDelete.Click += new System.EventHandler(this.buttonDelete_Click);
            // 
            // comboBox1
            // 
            this.comboBox1.FormattingEnabled = true;
            this.comboBox1.Location = new System.Drawing.Point(15, 187);
            this.comboBox1.Name = "comboBox1";
            this.comboBox1.Size = new System.Drawing.Size(475, 21);
            this.comboBox1.TabIndex = 16;
            // 
            // bindingNavigator1
            // 
            this.bindingNavigator1.AddNewItem = this.bindingNavigatorAddNewItem;
            this.bindingNavigator1.CountItem = this.bindingNavigatorCountItem;
            this.bindingNavigator1.DeleteItem = this.bindingNavigatorDeleteItem;
            this.bindingNavigator1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.bindingNavigatorMoveFirstItem,
            this.bindingNavigatorMovePreviousItem,
            this.bindingNavigatorSeparator,
            this.bindingNavigatorPositionItem,
            this.bindingNavigatorCountItem,
            this.bindingNavigatorSeparator1,
            this.bindingNavigatorMoveNextItem,
            this.bindingNavigatorMoveLastItem,
            this.bindingNavigatorSeparator2,
            this.bindingNavigatorAddNewItem,
            this.bindingNavigatorDeleteItem});
            this.bindingNavigator1.Location = new System.Drawing.Point(0, 0);
            this.bindingNavigator1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
            this.bindingNavigator1.MoveLastItem = this.bindingNavigatorMoveLastItem;
            this.bindingNavigator1.MoveNextItem = this.bindingNavigatorMoveNextItem;
            this.bindingNavigator1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
            this.bindingNavigator1.Name = "bindingNavigator1";
            this.bindingNavigator1.PositionItem = this.bindingNavigatorPositionItem;
            this.bindingNavigator1.Size = new System.Drawing.Size(502, 25);
            this.bindingNavigator1.TabIndex = 17;
            this.bindingNavigator1.Text = "bindingNavigator1";
            // 
            // bindingNavigatorMoveFirstItem
            // 
            this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
            this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
            this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorMoveFirstItem.Text = "Move first";
            // 
            // bindingNavigatorMovePreviousItem
            // 
            this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
            this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
            this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorMovePreviousItem.Text = "Move previous";
            // 
            // bindingNavigatorSeparator
            // 
            this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
            this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25);
            // 
            // bindingNavigatorPositionItem
            // 
            this.bindingNavigatorPositionItem.AccessibleName = "Position";
            this.bindingNavigatorPositionItem.AutoSize = false;
            this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
            this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
            this.bindingNavigatorPositionItem.Text = "0";
            this.bindingNavigatorPositionItem.ToolTipText = "Current position";
            // 
            // bindingNavigatorCountItem
            // 
            this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
            this.bindingNavigatorCountItem.Size = new System.Drawing.Size(35, 22);
            this.bindingNavigatorCountItem.Text = "of {0}";
            this.bindingNavigatorCountItem.ToolTipText = "Total number of items";
            // 
            // bindingNavigatorSeparator1
            // 
            this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator";
            this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25);
            // 
            // bindingNavigatorMoveNextItem
            // 
            this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
            this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
            this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorMoveNextItem.Text = "Move next";
            // 
            // bindingNavigatorMoveLastItem
            // 
            this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
            this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
            this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorMoveLastItem.Text = "Move last";
            // 
            // bindingNavigatorSeparator2
            // 
            this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator";
            this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
            // 
            // bindingNavigatorAddNewItem
            // 
            this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
            this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
            this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorAddNewItem.Text = "Add new";
            // 
            // bindingNavigatorDeleteItem
            // 
            this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
            this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
            this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
            this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
            this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22);
            this.bindingNavigatorDeleteItem.Text = "Delete";
            // 
            // textBox7
            // 
            this.textBox7.Location = new System.Drawing.Point(15, 214);
            this.textBox7.Multiline = true;
            this.textBox7.Name = "textBox7";
            this.textBox7.Size = new System.Drawing.Size(475, 49);
            this.textBox7.TabIndex = 18;
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.AutoScroll = true;
            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
            this.ClientSize = new System.Drawing.Size(502, 270);
            this.Controls.Add(this.textBox7);
            this.Controls.Add(this.bindingNavigator1);
            this.Controls.Add(this.comboBox1);
            this.Controls.Add(this.buttonDelete);
            this.Controls.Add(this.buttonUpdate);
            this.Controls.Add(this.buttonSelect);
            this.Controls.Add(this.textBox6);
            this.Controls.Add(this.label6);
            this.Controls.Add(this.textBox5);
            this.Controls.Add(this.label5);
            this.Controls.Add(this.textBox4);
            this.Controls.Add(this.label4);
            this.Controls.Add(this.textBox3);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.textBox2);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.buttonInsert);
            this.Name = "Form1";
            this.Text = "СУБД ";
            ((System.ComponentModel.ISupportInitialize)(this.bindingNavigator1)).EndInit();
            this.bindingNavigator1.ResumeLayout(false);
            this.bindingNavigator1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();
 
        }
 
        #endregion
 
        private System.Windows.Forms.Button buttonInsert;
        private System.Windows.Forms.Label label1;
        private System.Windows.Forms.TextBox textBox1;
        private System.Windows.Forms.TextBox textBox2;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.TextBox textBox3;
        private System.Windows.Forms.Label label3;
        private System.Windows.Forms.TextBox textBox4;
        private System.Windows.Forms.Label label4;
        private System.Windows.Forms.TextBox textBox5;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.TextBox textBox6;
        private System.Windows.Forms.Label label6;
        private System.Windows.Forms.Button buttonSelect;
        private System.Windows.Forms.Button buttonUpdate;
        private System.Windows.Forms.Button buttonDelete;
        private System.Windows.Forms.ComboBox comboBox1;
        private System.Windows.Forms.BindingNavigator bindingNavigator1;
        private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
        private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
        private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
        private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
        private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
        private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
        private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
        private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
        private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
        private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
        private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
        private System.Windows.Forms.TextBox textBox7;
    }
}
0
 Аватар для Павлик Морозов
138 / 137 / 42
Регистрация: 26.10.2012
Сообщений: 443
30.05.2014, 22:09
Irina1094, у меня есть решение, которое полностью покроет все ваши потребности, но думаю интереснее все таки самостоятельно сделать что-то.
- А потому, для начала определитесь с функционалом и назначением.
- Отсюда следует шаг выбора СУБД. Если база будет небольшая и локальная, то можно использовать ACCESS либо SQL CE, ежели большие объемы данных или по сети работа, тогда однозначно MS SQL Server.
- Какую информацию будете хранить в базе, как ее классифицировать.
- В вашем случае это таблица с клиентами, подчиненная таблица с контактами, т.к. у клиента может быть несколько контактов, но вы наперед не знаете, сколько и каких.
- Таблица с заказами праздников. все это дело можно расширять, вводя дополнительные таблицы с перечнем справочников, и прочее, прочее, прочее....
- Что касается кода, здесь тоже полет фантазии широчайший. Если хотите расширяемый функционал, тогда лучше применять систему плагинов, если же не критично, то в коде все жестко зашивается.
- Отдельная рекомендация, да и вообще правило хорошего тона, сделайте отдельный класс, в котором опишите методы работы с базой данных (чтение и запись).
- Тоже касается форм, в которые пользователь будет вводить данные. Сделайте один базовый класс формы, в котором опишите основной функционал, а конечные формы унаследуйте от базовой.
Вкратце, то идеи таковы.
0
 Аватар для Irina1094
0 / 0 / 0
Регистрация: 29.05.2014
Сообщений: 14
31.05.2014, 20:21  [ТС]
Павлик Морозов, я уже две недели это пишу, поэтому и написала в итоге сюда, программа вообще не хочет работать. БД готовая есть.
Спасибо за идеи, очень признательна

Добавлено через 1 минуту
Блондинка с ОЗМ, Большое спасибо)
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
raxper
Эксперт
30234 / 6612 / 1498
Регистрация: 28.12.2010
Сообщений: 21,154
Блог
31.05.2014, 20:21
Помогаю со студенческими работами здесь

Клиентское приложение для работы с сервером SFTP
:cry: Люди добрые, есть у кого простой пример (исходник) на Java клиентского приложения для работы с сервером SFTP??? ОЧЕНЬ! НУЖНО ЗАРАНЕЕ...

Большая работа (клиентское приложение для больницы), много вопросов
Всем Привет! :curtsy: У меня задание создать клиентское положение для больницы. Программа сложная, трудности начались с самого...

Проектирование и выбор решения для реализации (локальное; клиентское приложение)
Вступление для Админов. Куда засунуть эту тему я не нашёл (разделов по проектированию нет (или я не увидел)). А так как интерфейс будет...

Настройка SQL Server 2008 для работы с SQL Server Management Studio
Доброго времени суток. Подскажите пожалуйста, что нужно сделать для того, чтобы SQL Server Management Studio соединялось с SQL сервером ?...

[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed- User: Reason: Not defined as a valid user of a trusted SQL Server connection
Login failed- User: Reason: Not defined as a valid user of a trusted SQL Server connection Вот такую ошибку выдает. В DSN...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
8
Ответ Создать тему
Новые блоги и статьи
Thinkpad X220 Tablet — это лучший бюджетный ноутбук для учёбы, точка.
Programma_Boinc 23.12.2025
Thinkpad X220 Tablet — это лучший бюджетный ноутбук для учёбы, точка. Рецензия / Мнение Это мой обзор планшета X220 с точки зрения школьника. Недавно я решила попытаться уменьшить свой. . .
PhpStorm 2025.3: WSL Terminal всегда стартует в ~
and_y87 14.12.2025
PhpStorm 2025. 3: WSL Terminal всегда стартует в ~ (home), игнорируя директорию проекта Симптом: После обновления до PhpStorm 2025. 3 встроенный терминал WSL открывается в домашней директории. . .
Как объединить две одинаковые БД Access с разными данными
VikBal 11.12.2025
Помогите пожалуйста !! Как объединить 2 одинаковые БД Access с разными данными.
Новый ноутбук
volvo 07.12.2025
Всем привет. По скидке в "черную пятницу" взял себе новый ноутбук Lenovo ThinkBook 16 G7 на Амазоне: Ryzen 5 7533HS 64 Gb DDR5 1Tb NVMe 16" Full HD Display Win11 Pro
Музыка, написанная Искусственным Интеллектом
volvo 04.12.2025
Всем привет. Некоторое время назад меня заинтересовало, что уже умеет ИИ в плане написания музыки для песен, и, собственно, исполнения этих самых песен. Стихов у нас много, уже вышли 4 книги, еще 3. . .
От async/await к виртуальным потокам в Python
IndentationError 23.11.2025
Армин Ронахер поставил под сомнение async/ await. Создатель Flask заявляет: цветные функции - провал, виртуальные потоки - решение. Не threading-динозавры, а новое поколение лёгких потоков. Откат?. . .
Поиск "дружественных имён" СОМ портов
Argus19 22.11.2025
Поиск "дружественных имён" СОМ портов На странице: https:/ / norseev. ru/ 2018/ 01/ 04/ comportlist_windows/ нашёл схожую тему. Там приведён код на С++, который показывает только имена СОМ портов, типа,. . .
Сколько Государство потратило денег на меня, обеспечивая инсулином.
Programma_Boinc 20.11.2025
Сколько Государство потратило денег на меня, обеспечивая инсулином. Вот решила сделать интересный приблизительный подсчет, сколько государство потратило на меня денег на покупку инсулинов. . . .
Ломающие изменения в C#.NStar Alpha
Etyuhibosecyu 20.11.2025
Уже можно не только тестировать, но и пользоваться C#. NStar - писать оконные приложения, содержащие надписи, кнопки, текстовые поля и даже изображения, например, моя игра "Три в ряд" написана на этом. . .
Мысли в слух
kumehtar 18.11.2025
Кстати, совсем недавно имел разговор на тему медитаций с людьми. И обнаружил, что они вообще не понимают что такое медитация и зачем она нужна. Самые базовые вещи. Для них это - когда просто люди. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2025, CyberForum.ru