protected void cmdDelete_ServerClick(object sender, System.EventArgs e) { if (_LabelTemplateFacade == null) { _LabelTemplateFacade = new LabelTemplateFacade(); } ArrayList array = this.gridHelper.GetCheckedRows(); if (array.Count > 0) { ArrayList labels = new ArrayList(array.Count); foreach (UltraGridRow row in array) { object label = this.GetEditObject(row); if (label != null) { labels.Add((BenQGuru.eMES.Domain.BaseSetting.LabelTemplate)label); } } this._LabelTemplateFacade.DeleteLabelTemplate((BenQGuru.eMES.Domain.BaseSetting.LabelTemplate[])labels.ToArray(typeof(BenQGuru.eMES.Domain.BaseSetting.LabelTemplate))); this.RequestData(); this.buttonHelper.PageActionStatusHandle(PageActionType.Delete); } }
private int GetRowCount() { if (_LabelTemplateFacade == null) { _LabelTemplateFacade = new LabelTemplateFacade(); } return(this._LabelTemplateFacade.QueryLabelTemplateCount((FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtLabelCodeQuery.Text))))); }
private object[] LoadDataSource(int inclusive, int exclusive) { if (_LabelTemplateFacade == null) { _LabelTemplateFacade = new LabelTemplateFacade(); } return(this._LabelTemplateFacade.QueryLabelTemplate( FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtLabelCodeQuery.Text)), inclusive, exclusive)); }
private object GetEditObject(Infragistics.WebUI.UltraWebGrid.UltraGridRow row) { if (_LabelTemplateFacade == null) { _LabelTemplateFacade = new LabelTemplateFacade(); } object obj = this._LabelTemplateFacade.GetLabelTemplate((row.Cells[1].Text.ToString())); if (obj != null) { return((BenQGuru.eMES.Domain.BaseSetting.LabelTemplate)obj); } return(null); }
protected void cmdAdd_ServerClick(object sender, System.EventArgs e) { if (_LabelTemplateFacade == null) { _LabelTemplateFacade = new LabelTemplateFacade(); } object label = this.GetEditObject(); if (label != null) { this._LabelTemplateFacade.AddLabelTemplate((BenQGuru.eMES.Domain.BaseSetting.LabelTemplate)label); this.RequestData(); this.buttonHelper.PageActionStatusHandle(PageActionType.Add); } }
private object GetEditObject() { if (this.ValidateInput()) { if (_LabelTemplateFacade == null) { _LabelTemplateFacade = new LabelTemplateFacade(); } BenQGuru.eMES.Domain.BaseSetting.LabelTemplate label = this._LabelTemplateFacade.CreateNewLabelTemplate(); label.LabelCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtLabelCodeEdit.Text, 40)); label.LabelDesc = this.txtLabelDescEdit.Text; label.LabelPath = this.txtLabelPathEdit.Text; label.MaintainUser = this.GetUserCode(); return(label); } else { return(null); } }