private void DropButton_Click(object sender, EventArgs e) { if (!calendarForm.IsHandleCreated) { SetCalendarLocation(); calendarForm.Visible = true; CalendarControl.Focus(); SetCalendarControlDate(); CalendarControl.Invalidate(); } else { if (CalendarControl.Visible) { calendarForm.Hide(); } else { // Set Date SetCalendarControlDate(); SetCalendarLocation(); calendarForm.Visible = true; CalendarControl.Focus(); } } }
void gridView1_CustomDrawCell(object sender, DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs e) { if (e.Column != null && e.Column.FieldName == "Time") { e.DisplayText = string.Empty; e.DefaultDraw(); VistaClockPainter painter = new VistaClockPainter(); CalendarControl calendarControl = new CalendarControl() { CalendarTimeEditing = DevExpress.Utils.DefaultBoolean.True, CalendarDateEditing = false, Bounds = e.Bounds }; calendarControl.DateTime = (DateTime)this.gridView1.GetRowCellValue(e.RowHandle, e.Column); VistaCalendarViewInfo vi = new VistaCalendarViewInfo(calendarControl); vi.Appearance.Assign(e.Appearance); vi.CalcViewInfo(e.Cache.Graphics); int clockWidth = (vi.RightArea as VistaCalendarRightAreaViewInfo).ClockBounds.Width; Rectangle drawBounds = new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height); drawBounds.X = e.Bounds.X + (e.Bounds.Width / 2) - (clockWidth / 2); vi.RightArea.CalcViewInfo(drawBounds); if (e.Bounds.Width > clockWidth) { painter.Draw(new CalendarControlInfoArgs(vi, e.Cache, drawBounds)); e.Handled = true; } } }
protected void Page_Load(object sender, EventArgs e) { // Sueetie Modified - Add Calendar Control if (this.Post != null && this.Post.Id != null) { SueetieBlogPost sueetieBlogPost = SueetieBlogs.GetSueetieBlogPost(Post.Id.ToString()); calendarControl = new CalendarControl(); calendarControl.CalendarSueetieBlogPost = sueetieBlogPost; phCalendarControl.Controls.Add(calendarControl); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["userid"] == null) { Response.Redirect("~/"); } this.CalendarControl.SelectedDate += CalendarControl_SelectedDate; int userID = (int)Session["userid"]; LoadSummary(userID); CalendarControl.LoadFuturePTORequests(userID); }
public CalendarControlRenderer( global::Android.Content.Context context, CalendarControl calendarControl) : base(context, calendarControl) { this._nativeCalendarView = new AndroidCalendarView(context) { FirstDayOfWeek = Calendar.Monday, }; this._nativeCalendarView.DateChange += NativeCalendarView_DateChange; this.SetNativeElement(this._nativeCalendarView); }
protected override void Render(HtmlTextWriter writer) { // turn user control to html code string output = CalendarControl.RenderToString(calDate); MatchEvaluator mevm = new MatchEvaluator(AppendMonth); output = regPrevMonth.Replace(output, mevm); MatchEvaluator mevy = new MatchEvaluator(AppendYear); output = regNextMonth.Replace(output, mevy); // output the modified code writer.Write(output); }
public CalendarControl AddBackwardCalendar() { var calendar = new CalendarControl() { Height = 260 }; var hasContetnsdays = GetHasContentsDays(lastBackwardDateTime.Year, lastBackwardDateTime.Month); calendar.Initialize(lastBackwardDateTime.Year, lastBackwardDateTime.Month, hasContetnsdays); container.Children.Add(calendar); lastBackwardDateTime = lastBackwardDateTime.AddMonths(-1); return(calendar); }
private void calendarBtn_Click(object sender, EventArgs e) { calendarBtn.ForeColor = Color.White; calendarBtn.BackColor = Color.FromArgb(91, 154, 248); calendarBtn.FlatAppearance.MouseOverBackColor = Color.FromArgb(91, 154, 248); calendarBtn.FlatAppearance.MouseDownBackColor = Color.FromArgb(91, 154, 248); televisionBtn.ForeColor = gamesBtn.ForeColor = moviesBtn.ForeColor = settingsBtn.ForeColor = myListBtn.ForeColor = Color.FromArgb(166, 167, 169); televisionBtn.BackColor = gamesBtn.BackColor = moviesBtn.BackColor = settingsBtn.BackColor = myListBtn.BackColor = Color.FromArgb(34, 37, 42); contentPanel.Controls.Clear(); CalendarControl calendarPanel = new CalendarControl(); calendarPanel.Dock = DockStyle.Fill; contentPanel.Controls.Add(calendarPanel); }
public CalendarControlRenderer( CalendarControl calendarControl) : base(calendarControl) { this._calendarView = new XamlCalendarView() { SelectionMode = global::Windows.UI.Xaml.Controls.CalendarViewSelectionMode.Single, FirstDayOfWeek = global::Windows.Globalization.DayOfWeek.Monday, }; this._calendarView.SelectedDatesChanged += CalendarView_SelectedDatesChanged; this.SetNativeElement(this._calendarView); var xamlApplicationRenderer = ((ApplicationRenderer)Application.Current.Renderer); xamlApplicationRenderer.ApplyThemeTo(this._calendarView); }
protected void rptr_OnItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { SueetieMediaObject sueetieMediaObject = ((SueetieMediaObject)e.Item.DataItem); PlaceHolder phTagsControl = (PlaceHolder)e.Item.FindControl("phTagsControl"); tagControl = new TagControl(); tagControl.TagSueetieMediaObject = sueetieMediaObject; phTagsControl.Controls.Add(tagControl); PlaceHolder phCalendarControl = (PlaceHolder)e.Item.FindControl("phCalendarControl"); calendarControl = new CalendarControl(); calendarControl.CalendarSueetieMediaObject = sueetieMediaObject; phCalendarControl.Controls.Add(calendarControl); } }
public static MvcHtmlString CustomCalendar <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, CalendarControl control, object htmlAttributes) { var _attrs = HtmlHelper.AnonymousObjectToHtmlAttributes(htmlAttributes); _attrs.Add(Constantes.ATTR_DATA_TOGGLE, control.DataToggle); if (!string.IsNullOrWhiteSpace(control.DateFormat)) { _attrs.Add(Constantes.ATTR_DATA_FORMAT, control.DateFormat); } if (control.MinViewMode.HasValue) { _attrs.Add(Constantes.ATTR_DATA_MIN_VIEWMODE, control.MinViewMode); } if (control.EsRequerido) { _attrs.Add(Constantes.ATTR_DATA_VAL, "true"); _attrs.Add(Constantes.ATTR_DATA_REQUIRED, Constantes.MESSAGE_REQUIRED_FIELD); } var _container = new TagBuilder("div"); _container.AddCssClass("calendar-control"); var _calIcon = new TagBuilder("i"); _calIcon.AddCssClass("far fa-calendar icon-calendar"); _container.InnerHtml = htmlHelper.EditorFor(expression, new { htmlAttributes = _attrs }).ToString(); _container.InnerHtml += _calIcon.ToString(); if (!control.EsRequerido) { var _clearIcon = new TagBuilder("i"); _clearIcon.AddCssClass("fa fa-times icon-clear"); _container.InnerHtml += _clearIcon.ToString(); } return(MvcHtmlString.Create(_container.ToString())); }
public void InitializeCalendar(Dictionary <DateTime, List <string> > contentsList) { this.contentsList = contentsList; lastForwardDateTime = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1); lastBackwardDateTime = lastForwardDateTime.AddMonths(-1); todayCalendar = AddForwardCalendar(); AddForwardCalendar(); AddForwardCalendar(); AddForwardCalendar(); AddForwardCalendar(); AddBackwardCalendar(); AddBackwardCalendar(); AddBackwardCalendar(); AddBackwardCalendar(); AddBackwardCalendar(); }
//UserControl 별 이벤트 데이터 private void ucCommonCodePopup_Calendar_OnDoubleClick(object sender, EventArgs e) { CalendarControl Calendar = sender as CalendarControl; _dtreturn = new DataTable(); switch (_pFindControl) { case "Calendar": _dtreturn.Columns.Add("DATE", typeof(string)); //_dtreturn.Rows.Add(new Object[] { Calendar.SelectionRange.Start.ToString("dd MMM yyyy")}); _dtreturn.Rows.Add(new Object[] { Calendar.SelectedRanges.Start.ToString("yyyy-MM-dd") }); //user Control 생성시 고정 == break; } Close(); }
public void RemoveDay(TrainingDayDTO newItem) { CalendarControl.RemoveDateInfo(newItem.TrainingDate); }
private string AppendYear(Match m) { return(CalendarControl.RenderToString(ddlYear)); }
protected void ctlCalendar_SelectionChanged(Object sender, EventArgs e) { // 08/31/2006 Paul. The date needs to be separated into day, month, year fields to avoid localization issues. Response.Redirect("~/Calendar/default.aspx?" + CalendarControl.CalendarQueryString(ctlCalendar.SelectedDate)); }
/// <summary> /// /// </summary> /// <param name="col"></param> /// <returns></returns> private Control GetEditControl(TableSchema.TableColumn col) { Control cOut = null; //use special care with the Primary Key if (col.IsPrimaryKey && !col.IsForeignKey) { //don't want to edit an auto-increment if (col.AutoIncrement || col.DataType == DbType.Guid) { Label lblPK = new Label(); lblPK.ID = "pkID"; cOut = lblPK; } else { TextBox txtPK = new TextBox(); txtPK.ID = "pkID"; cOut = txtPK; } } else { string colName = col.ColumnName.ToLower(); if (col.IsForeignKey) { DropDownList ddl = new DropDownList(); string fkTableName = DataService.GetForeignKeyTableName(col.ColumnName, col.Table.Name, ProviderName); if (!String.IsNullOrEmpty(fkTableName)) { TableSchema.Table tblSchema = DataService.GetTableSchema(fkTableName, ProviderName, TableType.Table); Query qry = new Query(tblSchema); qry.OrderBy = OrderBy.Asc(tblSchema.Columns[1].ColumnName); IDataReader rdr = qry.ExecuteReader(); //load up the dropdown //by convention the descriptor should be the second field if (col.IsNullable) { ListItem liNull = new ListItem("(Not Specified)", String.Empty); ddl.Items.Add(liNull); } while (rdr.Read()) { ListItem item = new ListItem(rdr[1].ToString(), rdr[0].ToString()); ddl.Items.Add(item); } rdr.Close(); cOut = ddl; } } else { switch (col.DataType) { case DbType.Guid: case DbType.AnsiString: case DbType.String: case DbType.StringFixedLength: case DbType.Xml: case DbType.Object: case DbType.AnsiStringFixedLength: if (Utility.IsMatch(colName, ReservedColumnName.CREATED_BY) || Utility.IsMatch(colName, ReservedColumnName.MODIFIED_BY)) { cOut = new Label(); } else { TextBox t = new TextBox(); if (Utility.GetEffectiveMaxLength(col) > 250) { t.TextMode = TextBoxMode.MultiLine; t.Height = Unit.Pixel(100); t.Width = Unit.Pixel(500); } else { t.Width = Unit.Pixel(250); if (colName.EndsWith("guid")) { t.Text = Guid.NewGuid().ToString(); t.Enabled = false; } } cOut = t; } break; case DbType.Binary: case DbType.Byte: //do nothing break; case DbType.Boolean: CheckBox chk = new CheckBox(); if (Utility.IsMatch(colName, ReservedColumnName.IS_ACTIVE)) { chk.Checked = true; } if (Utility.IsMatch(colName, ReservedColumnName.DELETED) || Utility.IsMatch(colName, ReservedColumnName.IS_DELETED)) { chk.Checked = false; } cOut = chk; break; case DbType.Date: case DbType.Time: case DbType.DateTime: if (Utility.IsMatch(colName, ReservedColumnName.MODIFIED_ON) || Utility.IsMatch(colName, ReservedColumnName.CREATED_ON)) { cOut = new Label(); } else { cOut = new CalendarControl(); } break; case DbType.Int16: case DbType.Int32: case DbType.UInt16: case DbType.Int64: case DbType.UInt32: case DbType.UInt64: case DbType.VarNumeric: case DbType.Single: case DbType.Currency: case DbType.Decimal: case DbType.Double: TextBox tt = new TextBox(); tt.Width = Unit.Pixel(50); //if (!this.isNew) //tt.Text = this.GetColumnValue(col.ColumnName).ToString(); cOut = tt; break; default: cOut = new TextBox(); break; } } if (cOut != null) { cOut.ID = col.ColumnName; } } if (cOut is TextBox) { TextBox tbx = (TextBox)cOut; ApplyCssClass(tbx, "scaffoldEditItem"); if (cOut.GetType() == typeof(TextBox)) //Not Redundant! CalendarControl is TextBox == true; myCalendarControl.GetType() == typeof(TextBox) == false! { int maxLength = Utility.GetEffectiveMaxLength(col); if (maxLength > 0) { tbx.MaxLength = maxLength; } } } return(cOut); }
/// <summary> /// /// </summary> /// <param name="keyID"></param> private void BindEditor(string keyID) { //get all the data for this row Query qry = new Query(Schema); qry.AddWhere(Schema.PrimaryKey.ColumnName, keyID); IDataReader rdr = qry.ExecuteReader(); if (rdr.Read()) { foreach (TableSchema.TableColumn col in Schema.Columns) { if (col.IsPrimaryKey && !col.IsForeignKey) { Control ctrl = tblEditor.FindControl("pkID"); if (ctrl != null) { Type ctrlType = ctrl.GetType(); string colValue = rdr[col.ColumnName].ToString(); if (ctrlType == typeof(Label)) { ((Label)ctrl).Text = colValue; } else if (ctrlType == typeof(DropDownList)) { ((DropDownList)ctrl).SelectedValue = colValue; } else if (ctrlType == typeof(TextBox)) { ((TextBox)ctrl).Text = colValue; } } } else { Control ctrl = tblEditor.FindControl(col.ColumnName); if (ctrl != null) { Type ctrlType = ctrl.GetType(); if (ctrlType == typeof(TextBox)) { TextBox tbx = ((TextBox)ctrl); tbx.Text = rdr[col.ColumnName].ToString(); } else if (ctrlType == typeof(CheckBox)) { if (!col.IsNullable || (col.IsNullable && rdr[col.ColumnName] != DBNull.Value)) { ((CheckBox)ctrl).Checked = Convert.ToBoolean(rdr[col.ColumnName]); } } else if (ctrlType == typeof(DropDownList)) { ((DropDownList)ctrl).SelectedValue = rdr[col.ColumnName].ToString(); } else if (ctrlType == typeof(CalendarControl)) { CalendarControl cal = (CalendarControl)ctrl; DateTime dt; if (ViewState["vs" + cal.ID] != null) { dt = (DateTime)ViewState["vs" + cal.ID]; } else { DateTime.TryParse(rdr[col.ColumnName].ToString(), out dt); } cal.SelectedDate = dt.Date; //cal.VisibleDate = dt.Date; ViewState["vs" + cal.ID] = dt; } else if (ctrlType == typeof(Label)) { ((Label)ctrl).Text = rdr[col.ColumnName].ToString(); } } } } } }
/// <summary> /// Gets the control data. /// </summary> /// <returns></returns> private AssociationForMatter GetControlData() { try { AssociationForMatter association = new AssociationForMatter(); association.ApplicationId = 1;//PMS association.ProjectId = (Guid)Session[SessionName.ProjectId]; association.RoleId = Convert.ToInt32(_ddlRole.SelectedValue); association.MemberId = new Guid(_hdnMemberId.Value); association.OrganisationId = new Guid(_hdnOrganisationId.Value); association.Description = _txtDescription.Text.Trim(); if (_ccDateFrom.DateText.Length > 0) { association.DateFrom = Convert.ToDateTime(_ccDateFrom.DateText); } else { association.DateFrom = DataConstants.BlankDate; } if (_ccDateTo.DateText.Length > 0) { association.DateTo = Convert.ToDateTime(_ccDateTo.DateText); } else { association.DateTo = DataConstants.BlankDate; } association.Reference = _txtReference.Text.Trim(); association.LetterHead = _txtLetterHeading.Text.Trim(); association.Comment = _txtCommenting.Text.Trim(); association.LinkedProjectId = new Guid(_hdnLinkedProjectId.Value); //Get extended info from the grid List <RoleExtendedInfo> extendedInfo = new List <RoleExtendedInfo>(); foreach (GridViewRow row in _grdAdditionalAssociationInfo.Rows) { string text = string.Empty; decimal number = decimal.Zero; DateTime date = DataConstants.BlankDate; bool hasValue = false; string dataType = ((HiddenField)row.FindControl("_hdnDataType")).Value.ToString().Trim(); int typeId = Convert.ToInt32(((HiddenField)row.FindControl("_hdnTypeId")).Value); TextBox notes = (TextBox)row.Cells[2].FindControl("_txtNotes"); switch (dataType) { case "Date": CalendarControl calendarControl = (CalendarControl)row.Cells[1].FindControl("_cc"); string dateText = calendarControl.DateText.Trim(); if (dateText != string.Empty) { date = Convert.ToDateTime(dateText); hasValue = true; } break; case "Number": TextBox numericTextBox = (TextBox)row.FindControl("_txt"); number = Convert.ToDecimal(numericTextBox.Text); hasValue = (number != decimal.Zero); break; case "Text": TextBox textBox = (TextBox)row.FindControl("_txt"); text = textBox.Text.Trim(); hasValue = (text != string.Empty); break; case "Bool": CheckBox checkBox = (CheckBox)row.FindControl("_chk"); text = Convert.ToInt32(checkBox.Checked).ToString(); hasValue = (text != "0"); break; case "List": DropDownList dropDownList = (DropDownList)row.FindControl("_ddl"); text = dropDownList.SelectedValue.Trim(); hasValue = (text != string.Empty); break; } //Add extended info item if a value was entered if (notes.Text.Trim().Length > 0 || hasValue) { RoleExtendedInfo info = new RoleExtendedInfo(); info.TypeId = typeId; info.Text = text; info.Date = date; info.Number = number; info.Comment = notes.Text.Trim(); extendedInfo.Add(info); } } if (extendedInfo.Count > 0) { association.RoleExtendedInfoDetails = extendedInfo.ToArray(); } return(association); } catch (Exception ex) { throw ex; } }
protected void _grdAdditionalAssociationInfo_RowDataBound(object sender, GridViewRowEventArgs e) { try { if (e.Row.RowType == DataControlRowType.DataRow) { //Create the controls based on the data type RoleExtendedInfoSearchItem extendedInfo = (RoleExtendedInfoSearchItem)e.Row.DataItem; string dataType = extendedInfo.DataType.Trim(); CalendarControl calendarControl = (CalendarControl)e.Row.Cells[1].FindControl("_cc"); TextBox textBox = (TextBox)e.Row.Cells[1].FindControl("_txt"); CheckBox checkBox = (CheckBox)e.Row.Cells[1].FindControl("_chk"); DropDownList dropDownList = (DropDownList)e.Row.Cells[1].FindControl("_ddl"); // Determine which control to display, based on data type and initialise data. if (dataType == "Date") { textBox.Visible = false; checkBox.Visible = false; dropDownList.Visible = false; if (!extendedInfo.UserCanEdit) { calendarControl.Enabled = false; } } else if (dataType == "Text") { calendarControl.Visible = false; checkBox.Visible = false; dropDownList.Visible = false; if (!extendedInfo.UserCanEdit) { textBox.ReadOnly = true; } } else if (dataType == "Bool") { calendarControl.Visible = false; textBox.Visible = false; dropDownList.Visible = false; if (!extendedInfo.UserCanEdit) { checkBox.Enabled = false; } } else if (dataType == "Number") { calendarControl.Visible = false; checkBox.Visible = false; dropDownList.Visible = false; if (extendedInfo.TypeName == "Percentage Residue") { textBox.Text = "0.00000"; ScriptManager.RegisterStartupScript(this, Page.GetType(), extendedInfo.DataType + e.Row.RowIndex, string.Format(" $(\"#{0}\").numeric(null,5);", textBox.ClientID), true); } else { textBox.Text = "0.00"; ScriptManager.RegisterStartupScript(this, Page.GetType(), extendedInfo.DataType + e.Row.RowIndex, string.Format(" $(\"#{0}\").numeric(null,2);", textBox.ClientID), true); } if (!extendedInfo.UserCanEdit && extendedInfo.TypeName != "Percentage Residue") { textBox.Enabled = false; } else { textBox.Enabled = true; } } else if (dataType == "List") { calendarControl.Visible = false; checkBox.Visible = false; textBox.Visible = false; int start = 0; string sourceText = extendedInfo.SourceText.Trim(); //Add blank item dropDownList.Items.Add(string.Empty); //Get items from comma sep sourceText and add to drop down list for (int i = 0; i < sourceText.Length; i++) { if (sourceText.Substring(i, 1) == ",") { dropDownList.Items.Add(sourceText.Substring(start, (i - start))); start = i + 1; if (i == sourceText.LastIndexOf(",")) { dropDownList.Items.Add(sourceText.Substring((start), (sourceText.Length - start))); } } else { if (i == (sourceText.Length - 1) && sourceText.LastIndexOf(",") == -1) { dropDownList.Items.Add(sourceText); } } } if (!extendedInfo.UserCanEdit) { dropDownList.Enabled = false; } } } } catch (System.ServiceModel.EndpointNotFoundException) { _lblMessage.Text = DataConstants.WSEndPointErrorMessage; _lblMessage.CssClass = "errorMessage"; } catch (Exception ex) { _lblMessage.CssClass = "errorMessage"; _lblMessage.Text = ex.Message; } }
public NavigationBar(CalendarControl parent) : this() { this.Parent = parent; }
public void Setup() { _control = new CalendarControl(); }
public ICalendarControlRenderer CreateCalendarControlRenderer( CalendarControl calendarControl) { return(new CalendarControlRenderer(this._androidApplication.ApplicationContext, calendarControl)); }
private string AppendMonth(Match m) { return(CalendarControl.RenderToString(ddlMonth)); }
/// <summary> /// /// </summary> /// <param name="col"></param> /// <returns></returns> private Control GetEditControl(TableSchema.TableColumn col) { Control cOut = null; //use special care with the Primary Key if (col.IsPrimaryKey && !col.IsForeignKey) { //don't want to edit an auto-increment if (col.AutoIncrement || col.DataType == DbType.Guid) { Label lblPK = new Label(); lblPK.ID = "pkID"; cOut = lblPK; } else { TextBox txtPK = new TextBox(); txtPK.ID = "pkID"; cOut = txtPK; } } else { string colName = col.ColumnName.ToLower(); if (col.IsForeignKey) { DropDownList ddl = new DropDownList(); string fkTableName = DataService.GetForeignKeyTableName(col.ColumnName, col.Table.Name, ProviderName); if (!String.IsNullOrEmpty(fkTableName)) { TableSchema.Table tblSchema = DataService.GetTableSchema(fkTableName, ProviderName,TableType.Table); Query qry = new Query(tblSchema); qry.OrderBy = OrderBy.Asc(tblSchema.Columns[1].ColumnName); IDataReader rdr = qry.ExecuteReader(); //load up the dropdown //by convention the descriptor should be the second field if(col.IsNullable) { ListItem liNull = new ListItem("(Not Specified)", String.Empty); ddl.Items.Add(liNull); } while(rdr.Read()) { ListItem item = new ListItem(rdr[1].ToString(), rdr[0].ToString()); ddl.Items.Add(item); } rdr.Close(); cOut = ddl; } } else { switch (col.DataType) { case DbType.Guid: case DbType.AnsiString: case DbType.String: case DbType.StringFixedLength: case DbType.Xml: case DbType.Object: case DbType.AnsiStringFixedLength: if (Utility.IsMatch(colName, ReservedColumnName.CREATED_BY) || Utility.IsMatch(colName, ReservedColumnName.MODIFIED_BY)) { cOut = new Label(); } else { TextBox t = new TextBox(); if (Utility.GetEffectiveMaxLength(col) > 250) { t.TextMode = TextBoxMode.MultiLine; t.Height = Unit.Pixel(100); t.Width = Unit.Pixel(500); } else { t.Width = Unit.Pixel(250); if (colName.EndsWith("guid")) { t.Text = Guid.NewGuid().ToString(); t.Enabled = false; } } cOut = t; } break; case DbType.Binary: case DbType.Byte: //do nothing break; case DbType.Boolean: CheckBox chk = new CheckBox(); if (Utility.IsMatch(colName, ReservedColumnName.IS_ACTIVE)) { chk.Checked = true; } if (Utility.IsMatch(colName, ReservedColumnName.DELETED) || Utility.IsMatch(colName, ReservedColumnName.IS_DELETED)) { chk.Checked = false; } cOut = chk; break; case DbType.Date: case DbType.Time: case DbType.DateTime: if (Utility.IsMatch(colName, ReservedColumnName.MODIFIED_ON) || Utility.IsMatch(colName, ReservedColumnName.CREATED_ON)) { cOut = new Label(); } else { cOut = new CalendarControl(); } break; case DbType.Int16: case DbType.Int32: case DbType.UInt16: case DbType.Int64: case DbType.UInt32: case DbType.UInt64: case DbType.VarNumeric: case DbType.Single: case DbType.Currency: case DbType.Decimal: case DbType.Double: TextBox tt = new TextBox(); tt.Width = Unit.Pixel(50); //if (!this.isNew) //tt.Text = this.GetColumnValue(col.ColumnName).ToString(); cOut = tt; break; default: cOut = new TextBox(); break; } } if (cOut != null) { cOut.ID = col.ColumnName; } } if (cOut is TextBox) { TextBox tbx = (TextBox)cOut; ApplyCssClass(tbx, "scaffoldEditItem"); if (cOut.GetType() == typeof(TextBox)) //Not Redundant! CalendarControl is TextBox == true; myCalendarControl.GetType() == typeof(TextBox) == false! { int maxLength = Utility.GetEffectiveMaxLength(col); if(maxLength > 0) { tbx.MaxLength = maxLength; } } } return cOut; }
public ICalendarControlRenderer CreateCalendarControlRenderer( CalendarControl calendarControl) { return(new CalendarControlRenderer(calendarControl)); }
public ExceptionIndexViewModel() { ERR_Fecha = new CalendarControl(); }
public void UpdateDay(TrainingDayDTO newItem) { CalendarControl.RemoveDateInfo(newItem.TrainingDate, false); addTrainingDayInfo(newItem); CalendarControl.RefreshAppointments(); }
public ICalendarControlRenderer CreateCalendarControlRenderer( CalendarControl calendarControl) { throw new NotImplementedException(); //return new CalendarControlRenderer(this._androidApplication.ApplicationContext, calendarControl); }