Exemplo n.º 1
0
        /// <summary>
        /// Bind data on UltraGrid
        /// </summary>
        /// <param name="codes"></param>
        /// <param name="needMerge"></param>
        public void BindCodeTable(CodeTableDataSet.T_IC_CODEDataTable codes, bool needMerge)
        {
            CodeTableDataSet.T_IC_CODEDataTable temp = this.ultraGridCodeTable.DataSource as CodeTableDataSet.T_IC_CODEDataTable;
            if (needMerge && (temp != null))
            {
                temp.Merge(codes);
            }
            else
            {
                temp = codes;
            }
            this.ultraLabTotalNum.Text = HiiP.Framework.Messaging.Messages.General.GEI001.Format(temp.Count);

            this.ultraGridCodeTable.DataSource = temp;
        }
Exemplo n.º 2
0
 public void Fill(CodeTableDataSet.T_IC_CODERow data)
 {
     this.tICCODERowBindingSource.DataSource = data;
     if (!string.IsNullOrEmpty(data.CODE_CATEGORY))
     {
         this.ultraComboCategory.Value = data.CODE_CATEGORY;
     }
     else
     {
         ultraComboCategory.SelectedIndex = 0;
     }
     //DateTime obj = data.EFFECTIVE_START_DATE;
     //DateTime Date1753=new DateTime(1753,1,1),Date9998=new DateTime(9998,12,31);
     //if (obj >= Date9998 || obj <= Date1753)
     //{
     //    ultraDateTimeStartTime.DateTime = Date1753;
     //    ultraDateTimeStartTime.Value = null;
     //}
     //else
     //{
     //    ultraDateTimeStartTime.DateTime = obj;
     //}
     //obj = data.EFFECTIVE_END_DATE;
     //if (obj >= Date9998 || obj <= Date1753)
     //{
     //    ultraDateTimeEndTime.DateTime = Date9998;
     //    ultraDateTimeEndTime.Value = null;
     //}
     //else
     //{
     //    ultraDateTimeEndTime.DateTime = obj;
     //}
 }
Exemplo n.º 3
0
        private void ultraBtnReset_Click(object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                this.ultraComboCategory.SelectedIndex = 0;

                CodeTableDataSet ds = new CodeTableDataSet();
                BindCodeTable(ds.T_IC_CODE,false);
            }
            catch (Exception exception)
            {
                if (ExceptionManager.Handle(exception)) throw;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }