Example #1
0
 public PlayerProperties()
 {
     this.Build();
     //HACK:The calendar dialog does not respond on win32
     if (Environment.OSVersion.Platform != PlatformID.Win32NT)
     {
         cp = new CalendarPopup();
         cp.Hide();
         cp.DateSelectedEvent += delegate(DateTime selectedDate) {
             Player.Birthday = selectedDate;
             bdaylabel.Text  = selectedDate.ToShortDateString();
         };
     }
 }
Example #2
0
        public ProjectDetailsWidget()
        {
            this.Build();

            //HACK:The calendar dialog does not respond on win32
            if (Environment.OSVersion.Platform != PlatformID.Win32NT)
            {
                cp = new CalendarPopup();
                cp.Hide();
                cp.DateSelectedEvent += new DateSelectedHandler(OnDateSelected);
            }

            FillFormats();
            videoDevices = new List <Device>();
            Use          = ProjectType.FileProject;
        }
Example #3
0
        private void createChildControls()
        {
            Literal br;

            _dateRangeLabel = new HtmlGenericControl("span");
            _dateRangeLabel.Attributes["class"] = "ir_Overview_Label";
            _dateRangeLabel.InnerText           = "Date Range:";
            Controls.Add(_dateRangeLabel);

            _ddlDateRange = new DropDownList();
            _ddlDateRange.AutoPostBack = true;
            Controls.Add(_ddlDateRange);

            br      = new Literal();
            br.Text = "<br />";
            Controls.Add(br);

            _startLabel = new HtmlGenericControl("span");
            _startLabel.Attributes["class"] = "ir_Overview_Label";
            _startLabel.InnerText           = "Start:";
            Controls.Add(_startLabel);

            _startCalendar = new CalendarPopup();
            _startCalendar.ControlDisplay = DisplayType.TextBoxImage;
            _startCalendar.CalendarWidth  = 175;
            _startCalendar.ImageUrl       = "~/Images/CalendarIcon.gif";
            Controls.Add(_startCalendar);

            br      = new Literal();
            br.Text = "<br />";
            Controls.Add(br);

            _endLabel = new HtmlGenericControl("span");
            _endLabel.Attributes["class"] = "ir_Overview_Label";
            _endLabel.InnerText           = "End:";
            Controls.Add(_endLabel);

            _endCalendar = new CalendarPopup();
            _endCalendar.ControlDisplay = DisplayType.TextBoxImage;
            _endCalendar.CalendarWidth  = 175;
            _endCalendar.ShowGoToToday  = true;
            _endCalendar.ImageUrl       = "~/Images/CalendarIcon.gif";
            Controls.Add(_endCalendar);

            base.CreateChildControls();
        }
Example #4
0
    protected void btnSend_Click(object sender, EventArgs e)
    {
        string strErrorMessage = "";

        if (dgSchedule.Items.Count == 0)
        {
            strErrorMessage += "<br>You should file atleast 1 schedule.";
        }

        if (strErrorMessage.Length == 0)
        {
            using (clsOB ob = new clsOB())
            {
                ob.Username = Request.Cookies["Speedo"]["UserName"];
                ob.DateFile = DateTime.Now;
                ob.Reason   = txtReason.Text;
                ob.OBType   = ddlOBType.SelectedValue;
                if (ddlOBType.SelectedValue == "1")
                {
                    ob.DepartmentCode        = ddlDepartment.SelectedValue;
                    ob.ApproverRequestorName = ddlRequestApprover.SelectedValue;
                }
                else
                {
                    ob.DepartmentCode        = clsEmployee.GetDepartmentCode(Request.Cookies["Speedo"]["UserName"]);
                    ob.ApproverRequestorName = "";
                }
                ob.ApproverHeadName = ddlHeadApprover.SelectedValue;
                ob.Insert();

                DataTable tblCart = ViewState["Cart"] as DataTable;

                foreach (DataGridItem itm in dgSchedule.Items)
                {
                    HiddenField   phdnFocusDate  = (HiddenField)itm.FindControl("hdnFocusDate");
                    CalendarPopup pdtpKeyOBDate  = (CalendarPopup)itm.FindControl("dtpKeyOBDate");
                    TimePicker    pdtpKeyInTime  = (TimePicker)itm.FindControl("dtpKeyInTime");
                    TimePicker    pdtpKeyOutTime = (TimePicker)itm.FindControl("dtpKeyOutTime");

                    clsOBDetails obdetails = new clsOBDetails();
                    obdetails.OBCode    = ob.OBCode;
                    obdetails.FocusDate = clsValidator.CheckDate(phdnFocusDate.Value);
                    obdetails.KeyIn     = clsDateTime.CombineDateTime(pdtpKeyOBDate.SelectedDate, pdtpKeyInTime.SelectedTime);
                    obdetails.KeyOut    = clsDateTime.CombineDateTime(pdtpKeyOBDate.SelectedDate, pdtpKeyOutTime.SelectedTime);
                    obdetails.Status    = "1";
                    obdetails.UpdateBy  = Request.Cookies["Speedo"]["UserName"];
                    obdetails.UpdateOn  = DateTime.Now;
                    obdetails.Add();
                }

                if (ob.OBType == "0")
                {
                    ob.SendNotification(OBMailType.FiledAcknowledgementHRequestor);
                    ob.SendNotification(OBMailType.FiledNotificationHApprover);
                }
                else
                {
                    ob.SendNotification(OBMailType.FiledAcknowledgementRRequestor);
                    ob.SendNotification(OBMailType.FiledNotificationRApprover);
                }
            }
            //ADDED by CALVIN CAVITE FEB 15, 2018
            ScriptManager.RegisterStartupScript(this, GetType(), "Success!", "ModalSuccess();", true);

            //Response.Redirect("OBMenu.aspx");
        }
        else
        {
            divError.Visible = true;
            lblErrMsg.Text   = strErrorMessage;
        }
    }