Exemple #1
0
        private void btnSet_Click(object sender, EventArgs e)
        {
            int      resourceId    = Convert.ToInt32(cboDriver.SelectedValue);
            DateTime startDateTime = Convert.ToDateTime(rdiDate.SelectedDate.Value.ToString("dd/MM/yy") + " " + rdiStartTime.SelectedDate.Value.ToString("T"));
            string   notes         = txtNotes.Text;

            Facade.IDriver facDriver = new Facade.Resource();

            int iRetVal = facDriver.CreateStartDateTime(resourceId, startDateTime, notes);

            if (iRetVal > 0)
            {
                this.ReturnValue = string.Format("{0} {1}", rdiDate.SelectedDate.Value.ToString("dd/MM"), startDateTime.ToString("HH:mm"));

                this.Close();

                string str = "<script>opener.reload();</script>";
                Page.ClientScript.RegisterStartupScript(this.GetType(), "Script", str, false);
            }
        }