Beispiel #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                REF_Client oREF_Client = new REF_Client();

                oREF_Client.APPOINTMENT_ID   = _temp;
                oREF_Client.APPOINTMENT_NAME = TextBox1.Text;
                oREF_Client.PARENT           = DropDownList1.SelectedItem.Text;
                oREF_Client.LIMIT_MONTH      = Convert.ToInt32(TextBox2.Text);
                oREF_Client.LIMIT_YEAR       = Convert.ToInt32(TextBox2.Text);
                oREF_Client.STATUS           = 1;
                oREF_Client.CREATED_BY       = 1;
                oREF_Client.CREATED_DATE     = DateTime.Now.ToString();
                oREF_Client.MODIFIED_BY      = 1;
                oREF_Client.MODIFIED_DATE    = DateTime.Now.ToString();

                Label5.Text = Convert.ToString(oREF_Client.APPOINTMENT_ID);

                BL_Client oBL_Client = new BL_Client();

                oBL_Client.Insert(oREF_Client, null);

                //saved
                LoadTable();
                GetAppToDropdwn();
                Clear();
            }
            catch (Exception ex)
            {
                //pls try again
                Label5.Text = ex.Message.ToString();
            }
        }
Beispiel #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                REF_Client oREF_Client = new REF_Client();

                oREF_Client.CLIENT_ID   = Convert.ToInt32(TextBox1.Text);
                oREF_Client.CLIENT_NAME = TextBox2.Text;
                oREF_Client.CAR_NAME    = DropDownList1.SelectedValue.ToString();
                oREF_Client.DATE        = Date1.Value;

                BL_Client oBL_Client = new BL_Client();

                oBL_Client.Insert(oREF_Client, null);

                //saved
                LoadTable();
            }
            catch (Exception ex)
            {
                //pls try again
                Label1.Text = ex.Message.ToString();
            }
        }