|
The Form design,
agenda_appoint.jsl
Create Visual J# .Net Forn -
agenda_appoint.jsl
Classes used in this Form: Label, TextBox, Button,
ComboBox, Panel, ImageList
- On the View menu ,
click Solution Explorer
- In Solution
Explorer
In Solution Explorer, right click the
work_VJnet, select Add on the shortcut menu to
open other shortcut menu, click Add New Item,
the Add New Item - work_VJnet dialog box
appears. |

|
- In the Add New
Item -work_VJnet dialog box:
- In the
Categories pane, select Local Project
Items
- In the Templates
pane, select Windows form . A message
appears - (a form for Windows Applications).
- In the Name
box, type agenda_appoint.jsl
- Click
Open
|

|
- In the windows
Forms Designer appears the empty window Form
design
|
1. |
Picture files... |
|
- The folder
c:\work_VJnet\pic stored the bmp files
oclock.bmp, btn_ok.bmp, btn_cancel.bmp
|
2. |
The
agenda_appoint.jsl design |
|
 |
The Properties of
the Form - agenda_appoint.jsl... |
Name: Icon: Maximize: Menu: Size: Start
Position: Text: Window
State: |
agenda_appoint Icon False (none)
640,225 CenterScreen agenda_appoint
... Normal | | | |
3. |
From the Toolbox/Windows Form add these
controls .... 20 Label controls,
5 TextBox controls, 4 Button
controls, 3 ComboBox controls, 3 Panel
controls, 2 ImageList controls |
|
- Add 20 Label
controls
- ldate, Label
Properties:
Name: Font: Size: Text: TextAlign: |
ldate Microsoft Sans Serif,
8.25pt 72, 16 Date
: MiddleRight | |
- Label9
- Label8
- Label7
- Label6
- Label4
- Label3
- Label2
- l_email
- Label5
- l_mobile
- l_phone
- l_city
- l_father
- l_first
- l_name
- ltime
- ldescription
- lblname
- lblfirst_name
|
- Add 5 TextBox
controls
- txtdescription, TextBox
Properties
Name: Multiline Size: |
txtdescription True 408,
84 | |
- txtname
Size: 96, 20
- txtfirst_father
Size: 96, 20
- txttime
Size: 112, 18
- txtbookid
Size: 48,
16
|
- Add 4 Button controls
- btndetail,
Button Properties
Name: BackColor: Size: Text: |
btndetail ActiveBorder 48,
16 detail | |
- Btntime
Size: 15,
15
- Btn_ok
Size: 65,
20
- Btn_cancel
Size: 65,
20
|
- Add 3 ComboBox
controls
- cmbname, ComboBox
Properties
Name: Size: |
cmbname 120,
21 | |
- cmbfirst_father
Size: 120,
21
- cmbbookid
Size: 32,
21
|
- Add 3 Panel
controls
-
Paneldetail, Panel
Properties
Name: Size: |
Paneldetail 200,
184 | |
- Panelinter
Size:
8, 40
- Paneldata
Size:
224,
74
|
- Add 2 ImageList
controls
- ImageList1,
ImageList Properties
Name: Images: ImageSize: |
ImageList1 (Collection)
- of 1 Bitmap
image 15,
15 | |
The
folder c:\work_VJnet\pic
stored the bmp file
btn_calculator.bmp
- ImageList2
ImageSize:
56,
36
The folder
c:\work_VJnet\pic stored the 2 bmp
files btn_cancel.bmp,
btn_ok.bmp |
- Add the DateTimePicker control
- DateTimePicker1, DateTimePicker
Properties
Name: Size: |
Paneldetail 200,
184 | |
| | |
|
agenda_appoint.jsl file, the codes after modification
...
The
text
Code is
red
color, the codes added
manuel |
|
package
work_VJnet;
import System.Drawing.*;
import System.Collections.*;
import System.ComponentModel.*;
import System.Windows.Forms.*;
/**
* Summary description for agenda_appoint.
*/
public
class
agenda_appoint
extends System.Windows.Forms.Form
{
System.Windows.Forms.Panel Panelinter;
System.Windows.Forms.Button Btn_ok;
System.Windows.Forms.ImageList ImageList2;
System.Windows.Forms.DateTimePicker DateTimePicker1;
System.Windows.Forms.TextBox txtdescription;
System.Windows.Forms.TextBox txttime;
System.Windows.Forms.ImageList ImageList1;
System.Windows.Forms.Label ltime;
System.Windows.Forms.Label ldate;
System.Windows.Forms.Panel Paneldetail;
System.Windows.Forms.Label Label9;
System.Windows.Forms.Label Label8;
System.Windows.Forms.Label Label7;
System.Windows.Forms.Label Label6;
System.Windows.Forms.Label Label4;
System.Windows.Forms.Label Label3;
System.Windows.Forms.Label Label2;
System.Windows.Forms.Label l_email;
System.Windows.Forms.Label Label5;
System.Windows.Forms.Label l_mobile;
System.Windows.Forms.Label l_phone;
System.Windows.Forms.Label l_city;
System.Windows.Forms.Label l_father;
System.Windows.Forms.Label l_first;
System.Windows.Forms.Label l_name;
System.Windows.Forms.Panel Paneldata;
System.Windows.Forms.Button Btndetail;
System.Windows.Forms.ComboBox cmbbookid;
System.Windows.Forms.TextBox txtbookid;
System.Windows.Forms.TextBox txtfirst_father;
System.Windows.Forms.TextBox txtname;
System.Windows.Forms.ComboBox cmbfirst_father;
System.Windows.Forms.ComboBox cmbname;
System.Windows.Forms.Label lblfirst_name;
System.Windows.Forms.Label lblname;
System.Windows.Forms.Label ldescription;
System.Windows.Forms.Button Btn_cancel;
private
System.Data.OleDb.OleDbConnection oleDbConnection1;
private
System.ComponentModel.IContainer components;
// Variables
//Select
command
System.Data.OleDb.OleDbCommand
vselect;
//Dataadapter
System.Data.OleDb.OleDbDataAdapter vda;
System.Windows.Forms.Button
Btntime;
System.Data.DataSet vdset;
public
agenda_appoint()
{
//
// Required for
Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add
any constructor code after InitializeComponent call
//
}
/**
* Clean up any resources being used.
*/
protected
void
Dispose(boolean
disposing)
{
if
(disposing)
{
if
(components !=
null)
{
components.Dispose();
}
}
super.Dispose(disposing);
}
Windows Form Designer
generated code |
public static class
agenda_appoint_cl
{
public static
boolean
appoint_flag;
public static
String appoint_bookid;
public static
int
appoint_left;
public static
int
appointtxttime_Left;
public static
int
appoint_Top;
public static
int
appointtxttime_Top;
public static
int
appointtxttime_Height;
}
private void
agenda_appoint_Load (Object sender, System.EventArgs e)
{
//size ...
agenda_appoint_cl.appoint_left = this .get_Left();
agenda_appoint_cl.appointtxttime_Left =
this.txttime.get_Left();
agenda_appoint_cl.appoint_Top =
this.get_Top();
agenda_appoint_cl.appointtxttime_Top =
this.txttime.get_Top();
agenda_appoint_cl.appointtxttime_Height =
this.txttime.get_Height();
this.Btntime.set_Top(this.txttime.get_Top() + (this.txttime.get_Height()
-
this.Btntime.get_Height())/2);
this.set_Width(this.txtdescription.get_Left() +
this.txtdescription.get_Width() + 7 *
this.Panelinter.get_Width() /
4);
this.Paneldata.set_BackColor(this.get_BackColor());
this.Panelinter.set_BackColor(this.get_BackColor());
this.Btn_cancel.set_Left((this.txtdescription.get_Left()
+ this.txtdescription.get_Width()) -
this.Btn_cancel.get_Width());
this.Btndetail.set_Left((this.cmbfirst_father.get_Left()
+ this.cmbfirst_father.get_Width()) -
this.Btndetail.get_Width());
this.Btndetail.set_Text("detail");
agenda_appoint_cl.appoint_flag
= false;
//edit
appointment
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("edit"))
{
this.set_Text("edit
appointment");
this.txtdescription.set_Text(work_VJnet.agenda.agenda_cl.agenda_desc);
this.DateTimePicker1.set_Value(work_VJnet.agenda.agenda_cl.appoint_date);
this.txttime.set_Text(work_VJnet.aganda_time.aganda_time_cl.appoint_time);
this.Btn_ok.set_Enabled(false);
sub_info( false);
return;
}
//move task to
appointment
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("task_appoint"))
{
//fagenda_task.Close();
this.set_Text("new
appointment - task moved ...");
this.txtdescription.set_Text(work_VJnet.agenda.agenda_cl.agenda_desc);
this.DateTimePicker1.set_Value(work_VJnet.agenda.agenda_cl.appoint_date);
sub_nullovalue();
return;
}
//new
appointment
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("new"))
{
this.set_Text("new
appointment");
this.DateTimePicker1.set_Value(work_VJnet.agenda.agenda_cl.appoint_date);
this.txtdescription.set_Text("");
sub_nullovalue();
if (work_VJnet.agenda.agenda_cl.appoint_full
== true)
{
//with this
current date, add new appointmement not available
MessageBox.Show("note: to add
new appointment, change the current date - " +
System.Convert.ToString(work_VJnet.agenda.agenda_cl.appoint_date.get_Month())
+ "/" +
System.Convert.ToString(work_VJnet.agenda.agenda_cl.appoint_date.get_Day())
+ "/" +
System.Convert.ToString(work_VJnet.agenda.agenda_cl.appoint_date.get_Year())
+ " ",
work_VJnet.mainform.mainform_cl.Title,
MessageBoxButtons.OK,
System.Windows.Forms.MessageBoxIcon.Information);
}
return;
}
}
private void
sub_nullovalue()
{
this.cmbname.get_Items().Clear();
this.cmbfirst_father.get_Items().Clear();
this.cmbname.set_Text("");
this.cmbfirst_father.set_Text("");
this.txttime.set_Text("");
work_VJnet.aganda_time.aganda_time_cl.appoint_time = "";
this.txtname.set_Text("");
this.txtfirst_father.set_Text("");
this.Btn_ok.set_Enabled(false);
sub_info( true);
this.Btndetail.set_Enabled(false);
}
private void
sub_info( boolean
bval)
{
this.cmbname.set_Visible(bval);
this.cmbfirst_father.set_Visible(bval);
this.txtname.set_Visible(!bval);
this.txtfirst_father.set_Visible(!bval);
this.txtname.set_Width(this.cmbname.get_Width());
this.txtfirst_father.set_Width(this.cmbfirst_father.get_Width());
//move task to
appointment
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("task_appoint"))
{
sub_load("name", "");
this.cmbfirst_father.set_Enabled(false);
}
//new
appointment
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("new"))
{
sub_load("name", "");
this.cmbfirst_father.set_Enabled(false);
}
//edit
appointment
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("edit"))
{
this.txtbookid.set_Text(agenda_appoint_cl.appoint_bookid);
//load value
corresponding to editbookid.get_Text()
sub_load("detail", this .txtbookid.get_Text().Trim());
if
(agenda_appoint_cl.appoint_bookid.Trim().get_Length() >
0 )
this.Btndetail.set_Enabled(true);
}
}
//book table,
add data to comboboxes and detail information
private void
sub_load(String v_field, String v_fieldname)
{
int
i;
int
val_fieldname;
//name
if
(v_field.Trim().Equals("name"))
{
vselect =
new
System.Data.OleDb.OleDbCommand("SELECT DISTINCT
Trim(name) AS vname FROM book WHERE (Trim(name) <> '')
ORDER BY Trim(name)");
}
//firsy name
if
(v_field.Trim().Equals("first"))
{
vselect =
new
System.Data.OleDb.OleDbCommand("SELECT bookid, name,
first_name, father_name FROM book WHERE (name = '" +
v_fieldname + "') ORDER BY first_name, father_name");
}
//detail
if
(v_field.Trim().Equals("detail"))
{
val_fieldname =
System.Convert.ToInt32(v_fieldname);
vselect =
new
System.Data.OleDb.OleDbCommand("SELECT bookid, city,
civil_status, country, email, father_name, first_name,
homephone, mobilephone, name, sex,
web, workphone FROM book WHERE (bookid = " +
val_fieldname + ")");
}
vda =
new
System.Data.OleDb.OleDbDataAdapter(vselect);
vdset =
new
System.Data.DataSet();
vselect.set_Connection( this.oleDbConnection1);
vdset.set_EnforceConstraints( false);
try
{
this.oleDbConnection1.Open();
vda.Fill(vdset, "book");
}
catch
(System.Exception fillException)
{
System.Windows.Forms.MessageBox.Show(fillException.get_Message());
}
vdset.set_EnforceConstraints( true);
this.oleDbConnection1.Close();
if
(vdset.get_Tables().get_Item("book").get_Rows().get_Count()
== 0)
{
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("edit"))
{
this.txtname.set_Text("?????");
this.txtfirst_father.set_Text("?????");
return;
}
}
if
(vdset.get_Tables().get_Item("book").get_Rows().get_Count()
> 0)
{
for
(i = 0 ; i <= (vdset.get_Tables().get_Item("book").get_Rows().get_Count()
- 1); i++)
{
//name
if
(v_field.Trim().Equals("name"))
{
this.cmbname.get_Items().Add(vdset.get_Tables().get_Item("book").get_Rows().
get_Item(i).get_Item("vname").ToString().Trim());
}
//first name
if
(v_field.Trim().Equals("first"))
{
this.cmbfirst_father.get_Items().Add(vdset.get_Tables().get_Item("book").get_Rows().get_Item(i).
get_Item("first_name").ToString().Trim() + " " +
vdset.get_Tables().get_Item("book").get_Rows().get_Item(i).get_Item("father_name").ToString().Trim());
this.cmbbookid.get_Items().Add(System.Convert.ToString(vdset.get_Tables().get_Item("book").
get_Rows().get_Item(i).get_Item("bookid")));
}
//detail
if
(v_field.Trim().Equals("detail"))
{
this.l_name.set_Text(vdset.get_Tables().get_Item("book").get_Rows().
get_Item(i).get_Item("name").ToString().Trim());
if
(vdset.get_Tables().get_Item("book").get_Rows().get_Item(i).
get_Item("first_name").ToString().Trim().get_Length() ==
0)
this.l_first.set_Text("
... ");
else
this.l_first.set_Text(vdset.get_Tables().get_Item("book").get_Rows().
get_Item(i).get_Item("first_name").ToString().Trim());
if
(vdset.get_Tables().get_Item("book").get_Rows().get_Item(i).
get_Item("father_name").ToString().Trim().get_Length()
== 0)
this.l_father.set_Text("
... ");
else
this.l_father.set_Text(vdset.get_Tables().get_Item("book").get_Rows().
get_Item(i).get_Item("father_name").ToString().Trim());
if
(vdset.get_Tables().get_Item("book").get_Rows().get_Item(i).
get_Item("city").ToString().Trim().get_Length() == 0)
this.l_city.set_Text("
... ");
else
this.l_city.set_Text(vdset.get_Tables().get_Item("book").get_Rows().
get_Item(i).get_Item("city").ToString().Trim());
if
(vdset.get_Tables().get_Item("book").get_Rows().get_Item(i).
get_Item("homephone").ToString().Trim().get_Length() ==
0)
this.l_phone.set_Text("
... ");
else
this.l_phone.set_Text(vdset.get_Tables().get_Item("book").get_Rows().
get_Item(i).get_Item("homephone").ToString().Trim());
if
(vdset.get_Tables().get_Item("book").get_Rows().get_Item(i).
get_Item("mobilephone").ToString().Trim().get_Length()
== 0)
this.l_mobile.set_Text("
... ");
else
this.l_mobile.set_Text(vdset.get_Tables().get_Item("book").get_Rows().
get_Item(i).get_Item("mobilephone").ToString().Trim());
if
(vdset.get_Tables().get_Item("book").get_Rows().get_Item(i).
get_Item("email").ToString().Trim().get_Length() == 0)
this.l_email.set_Text("
... ");
else
this.l_email.set_Text(vdset.get_Tables().get_Item("book").get_Rows().
get_Item(i).get_Item("email").ToString().Trim());
}
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("edit"))
{
this.txtname.set_Text(this.l_name.get_Text());
this.txtfirst_father.set_Text(this.l_first.get_Text() +
" " + this.l_father.get_Text());
}
}
}
}
private void
cmbname_SelectedIndexChanged (Object sender,
System.EventArgs e)
{
sub_load("first",
this.cmbname.get_Text());
this.cmbfirst_father.set_Enabled(true);
}
private void
cmbfirst_father_SelectedIndexChanged (Object sender,
System.EventArgs e)
{
this.txtname.set_Text(this.cmbname.get_Text());
this.txtfirst_father.set_Text(this.cmbfirst_father.get_Text());
this.cmbbookid.set_SelectedIndex(this.cmbfirst_father.get_SelectedIndex());
this.txtbookid.set_Text(this.cmbbookid.get_Text());
sub_load("detail",
this.txtbookid.get_Text().Trim());
this.Btndetail.set_Enabled(true);
}
private void
Btndetail_Click (Object sender, System.EventArgs e)
{
if (this.Btndetail.get_Text().Trim().Equals("detail"))
{
this.set_Width(2 * this.txtdescription.get_Left() +
this.txtdescription.get_Width() +
this.Paneldetail.get_Width() + 7 * this.Panelinter.get_Width()
/ 4);
this.Paneldata.set_BackColor(this.Paneldetail.get_BackColor());
this.Panelinter.set_BackColor(this.Paneldetail.get_BackColor());
this.Btndetail.set_Text("hide");
return;
}
if (this.Btndetail.get_Text().Trim().Equals("hide"))
{
this.set_Width(this.txtdescription.get_Left() +
this.txtdescription.get_Width() + 7 * this.Panelinter.get_Width()
/ 4);
this.Paneldata.set_BackColor(this.get_BackColor());
this.Panelinter.set_BackColor(this.get_BackColor());
this.Btndetail.set_Text("detail");
}
}
private void
Btntime_Click (Object sender, System.EventArgs e)
{
aganda_time Faganda_time =
new
aganda_time();
Faganda_time.Show();
}
//aganda_time
form, response
private void
agenda_appoint_Activated (Object sender,
System.EventArgs e)
{
sub_timeok();
}
private void
sub_timeok()
{
if (work_VJnet.aganda_time.aganda_time_cl.time_flag
== true)
{
this.txttime.set_Text(work_VJnet.aganda_time.aganda_time_cl.appoint_time);
this.Btn_ok.set_Enabled(true);
}
}
private void
txtdescription_TextChanged (Object sender,
System.EventArgs e)
{
this.Btn_ok.set_Enabled(true);
}
private void
Btn_ok_Click (Object sender, System.EventArgs e)
{
if ((this.txtdescription.get_Text().Trim().get_Length()
> 0) && (this.txttime.get_Text().Trim().get_Length()
> 0))
{
if ((this.txtname.get_Text().Trim().get_Length()
> 0) && (this.txtfirst_father.get_Text().Trim().get_Length()
> 0))
{
//move task to
appointment, new appointment, edit appointment
sub_Btn_ok();
return;
}
else
{
MessageBox.Show("name value or
first and father value, empty ... not available",
work_VJnet.mainform.mainform_cl.Title,
MessageBoxButtons.OK,
System.Windows.Forms.MessageBoxIcon.Information);
}
}
else
{
MessageBox.Show("description
value or time value, empty ... not available",
work_VJnet.mainform.mainform_cl.Title,
MessageBoxButtons.OK,
System.Windows.Forms.MessageBoxIcon.Information);
}
}
private void
sub_Btn_ok()
{
System.Windows.Forms.DialogResult response;
//move task to
appointment
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("task_appoint"))
{
sub_Full("A",
this.DateTimePicker1.get_Value());
if
((vdset.get_Tables().get_Item("agenda").get_Rows().get_Count()
- 1) >= 24)
{
response = MessageBox.Show("to
save the current appointment ..., change the current
date - " +
System.Convert.ToString(work_VJnet.agenda.agenda_cl.appoint_date.get_Month())
+ "/" +
System.Convert.ToString(work_VJnet.agenda.agenda_cl.appoint_date.get_Day())
+ "/" +
System.Convert.ToString(work_VJnet.agenda.agenda_cl.appoint_date.get_Year())
+ " ", work_VJnet.mainform.mainform_cl.Title,
MessageBoxButtons.YesNo,
System.Windows.Forms.MessageBoxIcon.Information);
if
(response == DialogResult.Yes)
return;
if
(response == DialogResult.No)
{
sub_cancel();
return;
}
}
else
{
agenda_appoint_cl.appoint_flag
= true;
work_VJnet.agenda.agenda_cl.appoint_date =
this.DateTimePicker1.get_Value();
work_VJnet.agenda.agenda_cl.agenda_desc =
this.txtdescription.get_Text();
agenda_appoint_cl.appoint_bookid =
this.txtbookid.get_Text();
this.Close();
work_VJnet.agenda.get_ActiveForm().Refresh();
work_VJnet.agenda.get_ActiveForm().Activate();
return;
}
}
//new
appointment
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("new"))
{
sub_Full("A",
this.DateTimePicker1.get_Value());
if
((vdset.get_Tables().get_Item("agenda").get_Rows().get_Count()
- 1) >= 24)
{
//with this
current date, add new appointmement not available
response = MessageBox.Show("to
save this appointment, change the current date - " +
System.Convert.ToString(work_VJnet.agenda.agenda_cl.appoint_date.get_Month())
+ "/" +
System.Convert.ToString(work_VJnet.agenda.agenda_cl.appoint_date.get_Day())
+ "/" +
System.Convert.ToString(work_VJnet.agenda.agenda_cl.appoint_date.get_Year())
+ " ", work_VJnet.mainform.mainform_cl.Title,
MessageBoxButtons.YesNo,
System.Windows.Forms.MessageBoxIcon.Information);
if
(response == DialogResult.Yes)
return;
if
(response == DialogResult.No)
{
sub_cancel();
return;
}
}
else
{
agenda_appoint_cl.appoint_flag
= true;
work_VJnet.agenda.agenda_cl.agenda_desc =
this.txtdescription.get_Text();
work_VJnet.agenda.agenda_cl.appoint_date =
this.DateTimePicker1.get_Value();
agenda_appoint_cl.appoint_bookid =
this.txtbookid.get_Text();
this.Close();
work_VJnet.agenda.get_ActiveForm().Refresh();
work_VJnet.agenda.get_ActiveForm().Activate();
return;
}
}
//edit
appointment
if
(work_VJnet.agenda.agenda_cl.appoint_type.Trim().Equals("edit"))
{
agenda_appoint_cl.appoint_flag
= true;
work_VJnet.agenda.agenda_cl.agenda_desc =
this.txtdescription.get_Text();
work_VJnet.agenda.agenda_cl.appoint_date =
this.DateTimePicker1.get_Value();
this.Close();
work_VJnet.agenda.get_ActiveForm().Refresh();
work_VJnet.agenda.get_ActiveForm().Activate();
return;
}
}
private void
sub_Full(String v_entry_type, System.DateTime v_date)
{
String strdate_d;
String strdate_m;
String strdate_y;
strdate_d =
System.Convert.ToString(v_date.get_Day());
strdate_m =
System.Convert.ToString(v_date.get_Month());
strdate_y =
System.Convert.ToString(v_date.get_Year());
vselect =
new
System.Data.OleDb.OleDbCommand("SELECT entry_type,
ondate, ondate_d, ondate_m, ondate_y FROM agenda WHERE (entry_type
= '" + v_entry_type + "') AND (ondate_d = '" + strdate_d
+ "') AND (ondate_m = '" + strdate_m + "') AND (ondate_y
= '" + strdate_y + "') ORDER BY serialno");
vda =
new
System.Data.OleDb.OleDbDataAdapter(vselect);
vdset =
new
System.Data.DataSet();
vselect.set_Connection( this.oleDbConnection1);
vdset.set_EnforceConstraints( false);
try
{
this.oleDbConnection1.Open();
vda.Fill(vdset, "agenda");
}
catch
(System.Exception fillException)
{
System.Windows.Forms.MessageBox.Show(fillException.get_Message());
}
vdset.set_EnforceConstraints( true);
this.oleDbConnection1.Close();
}
private void
Btn_cancel_Click (Object sender, System.EventArgs e)
{
sub_cancel();
}
private void
sub_cancel()
{
agenda_appoint_cl.appoint_flag
= false;
work_VJnet.agenda.agenda_cl.agenda_desc = "";
this.Close();
work_VJnet.agenda.get_ActiveForm().Refresh();
work_VJnet.agenda.get_ActiveForm().Activate();
}
}
| | |
|
|