예제 #1
0
        private object GetEditObject()
        {
            if (this.ValidateInput())
            {
                if (_spcFacade == null)
                {
                    _spcFacade = new FacadeFactory(base.DataProvider).CreateSPCFacade();
                }
                SPCDataStore obj = this._spcFacade.CreateNewSPCDataStore();

                if (this.txtIDEdit.Value == string.Empty)
                {
                    obj.ID = Guid.NewGuid().ToString();
                }
                else
                {
                    obj.ID = this.txtIDEdit.Value;
                }
                obj.ItemCode   = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.txtItemCodeEdit.Text));
                obj.ObjectCode = FormatHelper.PKCapitalFormat(FormatHelper.CleanString(this.drpObjectCodeEdit.SelectedValue));
                obj.TableName  = FormatHelper.CleanString(this.txtTableNameEdit.Text);
                obj.DateFrom   = FormatHelper.TODateInt(this.txtDateFromEdit.Text);
                obj.DateTo     = FormatHelper.TODateInt(this.txtDateToEdit.Text);

                obj.MaintainUser = this.GetUserCode();

                return(obj);
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        private string[] FormatExportRecord(object obj)
        {
            SPCDataStore spcObj = obj as SPCDataStore;

            return(new string[] {
                spcObj.ItemCode.ToString(),
                spcObj.ObjectCode.ToString(),
                spcObj.TableName.ToString(),
                FormatHelper.ToDateString(spcObj.DateFrom),
                FormatHelper.ToDateString(spcObj.DateTo),
                spcObj.MaintainUser.ToString(),
                FormatHelper.ToDateString(spcObj.MaintainDate),
                FormatHelper.ToTimeString(spcObj.MaintainTime)
            });
        }
예제 #3
0
        protected Infragistics.WebUI.UltraWebGrid.UltraGridRow GetGridRow(object obj)
        {
            SPCDataStore spcObj = obj as SPCDataStore;

            return(new Infragistics.WebUI.UltraWebGrid.UltraGridRow(
                       new object[] {
                false,
                spcObj.ID.ToString(),
                spcObj.ItemCode.ToString(),
                spcObj.ObjectCode.ToString(),
                spcObj.TableName.ToString(),
                FormatHelper.ToDateString(spcObj.DateFrom),
                FormatHelper.ToDateString(spcObj.DateTo),
                spcObj.MaintainUser.ToString(),
                FormatHelper.ToDateString(spcObj.MaintainDate),
                FormatHelper.ToTimeString(spcObj.MaintainTime),
                ""
            }));
        }
예제 #4
0
        private void SetEditObject(object obj)
        {
            if (obj == null)
            {
                this.txtIDEdit.Value                 = string.Empty;
                this.txtItemCodeEdit.Text            = string.Empty;
                this.drpObjectCodeEdit.SelectedIndex = -1;
                this.txtTableNameEdit.Text           = string.Empty;
                this.txtDateFromEdit.Text            = FormatHelper.ToDateString(FormatHelper.TODateInt(DateTime.Now));
                this.txtDateToEdit.Text              = FormatHelper.ToDateString(FormatHelper.TODateInt(DateTime.Now));
                return;
            }

            SPCDataStore spcObj = obj as SPCDataStore;

            this.txtIDEdit.Value                 = spcObj.ID.ToString();
            this.txtItemCodeEdit.Text            = spcObj.ItemCode.ToString();
            this.drpObjectCodeEdit.SelectedValue = spcObj.ObjectCode.ToString();
            this.txtTableNameEdit.Text           = spcObj.TableName.ToString();
            this.txtDateFromEdit.Text            = FormatHelper.ToDateString(spcObj.DateFrom);
            this.txtDateToEdit.Text              = FormatHelper.ToDateString(spcObj.DateTo);
        }
예제 #5
0
 public void DeleteSPCDataStore(SPCDataStore SPCDataStore)
 {
     this._helper.DeleteDomainObject(SPCDataStore);
 }
예제 #6
0
 public void UpdateSPCDataStore(SPCDataStore SPCDataStore)
 {
     this._helper.UpdateDomainObject(SPCDataStore);
 }
예제 #7
0
 public void AddSPCDataStore(SPCDataStore SPCDataStore)
 {
     this._helper.AddDomainObject(SPCDataStore);
 }