Beispiel #1
0
        void dt_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            var entity = Factory.FindByKeyForEdit(null);
            var dr     = e.Row;

            foreach (var item in Factory.Fields)
            {
                dr[item.Name] = entity[item.Name];
            }
        }
Beispiel #2
0
 private void Dt_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     if (!MainWindow.pasting && !settingUp)
     {
         TextMessageKind kind = (TextMessageKind)(int)e.Row["语言类型ID"];
         List <string>   list = new List <string>();
         GameGlobal.StaticMethods.LoadFromString(list, e.Row["个性语言--语言数量大于1条则随机选中--语言之间用空格格开"].ToString());
         scen.GameCommonData.AllTextMessages.AddTextMessages((int)e.Row["武将ID"], kind, list);
     }
 }
Beispiel #3
0
            ///////////////////////////////////////////////////////////////////////
            //   Internal Events
            ///////////////////////////////////////////////////////////////////////
            private void EnvelopeGroupDataTable_TableNewRow(object sender, DataTableNewRowEventArgs e)
            {
                stayOut = true;
                EnvelopeGroupRow newRow = e.Row as EnvelopeGroupRow;

                newRow.id   = this.newID++;
                newRow.name = "";

                stayOut = false;
            }
Beispiel #4
0
        protected override void SlaverNewRow(object Sender, DataTableNewRowEventArgs e)
        {
            base.SlaverNewRow(Sender, e);
            DataRow dr = e.Row;

            dr.BeginEdit();
            dr["F_ApplyDate"] = DateTime.Today;
            dr["F_ReplyDate"] = DateTime.Today;
            dr.EndEdit();
        }
Beispiel #5
0
        protected virtual void ItemSlaverNewRow1(object Sender, DataTableNewRowEventArgs e)
        {
            DataTable dt = e.Row.Table;
            DataRow   dr = e.Row;

            if (dt.Columns.Contains("AID") != false)
            {
                dr["AID"] = binHalf.Count + 1;
            }
        }
Beispiel #6
0
        private void DtPersons_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            Person p = new Person();

            int id = scen.Persons.GetFreeGameObjectID();

            e.Row["id"] = id;
            p.ID        = id;
            scen.Persons.Add(p);
        }
Beispiel #7
0
            ///////////////////////////////////////////////////////////////////////
            //   Internal Events
            ///////////////////////////////////////////////////////////////////////
            private void AccountTypeDataTable_TableNewRow(object sender, DataTableNewRowEventArgs e)
            {
                stayOut = true;
                AccountTypeRow newRow = e.Row as AccountTypeRow;

                newRow.id   = this.newID++;
                newRow.name = "";

                stayOut = false;
            }
Beispiel #8
0
 /// <summary>
 /// 设定Table的默认值
 /// </summary>
 private void TableWorkProcess_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     try
     {
         e.Row["IsBuy"] = 1;
     }
     catch (Exception ex)
     {
         ExceptionHandler.HandleException(this.Text + "--设定Table的默认值错误。", ex);
     }
 }
Beispiel #9
0
 private void Tabla_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     if (tabla.Rows.Count == 0)
     {
         BtnEliminar.Visible = false;
     }
     else
     {
         BtnEliminar.Visible = true;
     }
 }
 private void table_NewRow(object sender, DataTableNewRowEventArgs arg)
 {
     this.Initialize();
     if (this.initialized && this.table.Rows.Count > 0)
     {
         int val = arg.Row.Field <int>("Total");
         this.maxValue = Math.Max(val, this.maxValue);
         this.RecalculateScale();
         this.plotSurface.Refresh();
     }
 }
Beispiel #11
0
 /// <summary>
 /// 设定默认值
 /// </summary>
 private void TableProjectStatus_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     if (statusDAO.GetProjectStatus_DefaultCount(0) > 0)
     {
         e.Row["IsDefault"] = 0;
     }
     else
     {
         e.Row["IsDefault"] = 1;
     }
 }
Beispiel #12
0
 private void Dt_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     try
     {
         dict.Add((K)e.Row["Key"], (V)e.Row["Value"]);
     }
     catch (Exception ex)
     {
         // MessageBox.Show("資料輸入錯誤。" + ex.Message);
     }
 }
Beispiel #13
0
        protected override void SlaverNewRow(object Sender, DataTableNewRowEventArgs e)
        {
            base.SlaverNewRow(Sender, e);
            DataTable dt = e.Row.Table;

            e.Row["F_Rate"] = 100;
            if (dt.Columns.Contains("F_TaxRate") != false)     //默认税率
            {
                e.Row["F_TaxRate"] = decTaxRate;
            }
        }
Beispiel #14
0
 /// <summary>
 /// 设定主表的默认值
 /// </summary>
 private void TableStnModule_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     try
     {
         e.Row["Creator"] = SystemInfo.user.AutoId;
     }
     catch (Exception ex)
     {
         ExceptionHandler.HandleException(this.Text + "--设定主表的默认值错误。", ex);
     }
 }
Beispiel #15
0
        private void Dt_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            T p = Activator.CreateInstance <T>();

            GameObjectList list = (GameObjectList)GetDataList(scen);
            int            id   = list.GetFreeGameObjectID();

            e.Row["id"] = id;
            p.ID        = id;
            list.Add(p);
        }
Beispiel #16
0
        /// <summary>
        /// 新建一行时
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Row_NewEvent(object sender, DataTableNewRowEventArgs e)
        {
            //为这一行的ID赋值
            e.Row[0] = m_IDIDAllocator.AllocId();
            DataTable dt = (DataTable)sender;

            if (dt.Columns.Count <= 1)//只有一行的时候,直接应用改变
            {
                dt.AcceptChanges();
            }
        }
Beispiel #17
0
        /// <summary>
        /// 新增设定默认值
        /// </summary>
        private void TableProjectPlanTask_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            DateTime nowTime = BaseSQL.GetServerDateTime();

            e.Row["PlanStartDate"]  = nowTime.Date;
            e.Row["PlanEndDate"]    = nowTime.Date;
            e.Row["PlanTotalDays"]  = 1;
            e.Row["PlanTaskStatus"] = 1;
            e.Row["ProjectNo"]      = DataTypeConvert.GetString(searchLookUpProjectNo.EditValue);
            e.Row["Creator"]        = SystemInfo.user.AutoId;
            e.Row["CreateTime"]     = nowTime;
        }
Beispiel #18
0
        private void EnvelopeLine_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            TransactionDataSet.EnvelopeLineRow eLine = e.Row as TransactionDataSet.EnvelopeLineRow;
            decimal lineAmount = this.tDataSet.LineItem.FindByid(this.CurrentLineID).amount;
            decimal envSum     = this.tDataSet.EnvelopeLine.myEnvelopeLineSum(this.CurrentLineID);
            decimal difference = lineAmount - envSum;

            eLine.lineItemID = this.CurrentLineID;
            eLine.amount     = difference;

            myResetValues();
        }
Beispiel #19
0
 private void dt_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     e.Row["TableName"]            = cbTables.Items[cbTables.SelectedIndex].ToString();
     e.Row["TableDBName"]          = table_db_names[cbTables.SelectedIndex].ToString();
     e.Row["ReferenceMultiSelect"] = false;
     e.Row["ShowInOffer"]          = false;
     e.Row["ShowInOfferShort"]     = false;
     e.Row["ShowInEditor"]         = false;
     e.Row["UseInWhereClause"]     = false;
     e.Row["WebOrder"]             = 0;
     e.Row["ShowFullName"]         = 0;
 }
Beispiel #20
0
 /// <summary>
 /// 设定默认值
 /// </summary>
 private void TableDepartment_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     e.Row["Founder"]    = SystemInfo.user.EmpName;
     e.Row["CreateDate"] = BaseSQL.GetServerDateTime();
     if (parentDepartmentNoStr != "")
     {
         e.Row["ParentDepartmentNo"]   = parentDepartmentNoStr;
         e.Row["ParentDepartmentName"] = parentDepartmentNameStr;
         parentDepartmentNoStr         = "";
         parentDepartmentNameStr       = "";
     }
 }
Beispiel #21
0
 void PXGC_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     if (e.Row == null)
     {
         return;
     }
     if (_data.DrTable.Table.Columns.Contains("ExtraSql") &&
         _data.DrTable["ExtraSql"].ToString().Contains("'GC'"))
     {
         e.Row["MaKho"] = "GC";
     }
 }
Beispiel #22
0
 /// <summary>
 /// 设定主表的默认值
 /// </summary>
 private void TableWorkFlows_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     try
     {
         e.Row["Enabled"]      = 1;
         e.Row["ParentAutoId"] = 0;
     }
     catch (Exception ex)
     {
         ExceptionHandler.HandleException(this.Text + "--设定主表的默认值错误。", ex);
     }
 }
 /// <summary>
 /// 设定默认值
 /// </summary>
 private void TableMenu_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     e.Row["MenuName"] = FrmRightBLL.getNewNodeId();
     e.Row["FormName"] = "";
     e.Row["FormText"] = "";
     if (parentMenuNameStr != "")
     {
         e.Row["ParentMenuName"] = parentMenuNameStr;
         e.Row["ParentMenuText"] = parentMenuTextStr;
         parentMenuNameStr       = "";
         parentMenuTextStr       = "";
     }
 }
Beispiel #24
0
            /////////////////////////
            //   Internal Events
            private void EnvelopeLineDataTable_TableNewRow(object sender, DataTableNewRowEventArgs e)
            {
                stayOut = true;
                EnvelopeLineRow newRow = e.Row as EnvelopeLineRow;

                newRow.id = this.newID++;
                //newRow.lineItemID = this.currentLineID;
                newRow.envelopeID  = SpclEnvelope.NULL;
                newRow.description = "";
                newRow.amount      = 0.0m;

                stayOut = false;
            }
Beispiel #25
0
        /// <summary>
        /// 로우가 추가 됨
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void _dtAdd_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            _dtAdd.AcceptChanges();

            if (Fnc.isNumeric(Fnc.obj2String(e.Row["Priority"])))
            {
                return;
            }

            var max = _dtAdd.AsEnumerable().Max(p => p["priority"]);

            e.Row["Priority"] = Fnc.obj2int(max) + 1;
        }
Beispiel #26
0
        private void Form1_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            int max = Int32.Parse(this.DS.Tables["Countries"].Rows[0]["id"].ToString());

            foreach (DataRow DR in this.DS.Tables["Countries"].Rows)
            {
                if (DR.RowState != DataRowState.Deleted && Int32.Parse(DR["id"].ToString()) > max)
                {
                    max = Int32.Parse(DR["id"].ToString());
                }
            }
            e.Row["id"] = max + 1;
        }
Beispiel #27
0
        public void AddEvent()
        {
            GridView gvDetail = (_data.FrmMain.Controls.Find("gcMain", true)[0] as GridControl).MainView as GridView;

            if (_data.DrTable.Table.Columns.Contains("ExtraSql") &&
                _data.DrTable["ExtraSql"].ToString().Contains("XK = 0"))
            {
                gvDetail.Columns["Loi"].OptionsColumn.ReadOnly = true;
                //gvDetail.Columns["Loi"].Visible = false;
                gvDetail.Columns["DVTTL"].Visible = false;
                gvDetail.Columns["SLTL"].Visible  = false;
                gvDetail.Columns["DGTL"].Visible  = false;
                gvDetail.Columns["TTTL"].Visible  = false;
                //
                gvDetail.Columns["SLDangTon"].Visible = false;
                gvDetail.Columns["SLTonCuoi"].Visible = true;
                gvDetail.Columns["isGP"].Visible      = true;
                gvDetail.Columns["GhiChuGP"].Visible  = false;
                gvDetail.Columns["GhiChuID"].Visible  = true;
            }
            else if (_data.DrTable.Table.Columns.Contains("ExtraSql") &&
                     _data.DrTable["ExtraSql"].ToString().Contains("XK = 1"))
            {
                gvDetail.Columns["SLDangTon"].Visible = false;
                gvDetail.Columns["SLTonCuoi"].Visible = false;
                gvDetail.Columns["isGP"].Visible      = false;
                gvDetail.Columns["GhiChuGP"].Visible  = false;
                gvDetail.Columns["GhiChuID"].Visible  = false;
                //
                gvDetail.Columns["DVTTL"].Visible = true;
                gvDetail.Columns["SLTL"].Visible  = true;
                gvDetail.Columns["DGTL"].Visible  = true;
                gvDetail.Columns["TTTL"].Visible  = true;
            }
            if (_data.BsMain.DataSource != null)
            {
                DataSet dsData = _data.BsMain.DataSource as DataSet;
                if (dsData == null)
                {
                    return;
                }
                dsData.Tables[0].TableNewRow += new DataTableNewRowEventHandler(PBCP_TableNewRow);
            }
            _data.BsMain.DataSourceChanged += new EventHandler(BsMain_DataSourceChanged);
            if (_data.BsMain.Current != null)
            {
                DataRow dr = (_data.BsMain.Current as DataRowView).Row;
                DataTableNewRowEventArgs e = new DataTableNewRowEventArgs(dr);
                PBCP_TableNewRow((_data.BsMain.DataSource as DataSet).Tables[0], e);
            }
        }
Beispiel #28
0
 void DataTable_i_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {//Tự động nhảy liên trong chi tiết lệnh in
     if (e.Row.Table.TableName == "KTLSX")
     {
         for (int i = 2; i < _data.DsData.Tables.Count; i++)
         {
             if (_data.DsData.Tables[i].TableName == e.Row.Table.TableName)
             {
                 int x = _data._lstCurRowDetail.FindAll(m => m.TableName == "KTLSX").Count;
                 e.Row["lien"] = x.ToString();
             }
         }
     }
 }
Beispiel #29
0
 /// <summary>
 /// 设定默认值
 /// </summary>
 private void TableCollectionTypeList_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     try
     {
         e.Row["CollectionTypeNo"] = collectionTypeNoStr;
         int sumInt = DataTypeConvert.GetInt(TableCollectionTypeList.Compute("Sum(CollectionPercentum)", ""));
         e.Row["CollectionPercentum"] = (100 - sumInt) >= 0 ? 100 - sumInt : 0;
     }
     catch (Exception ex)
     {
         //ExceptionHandler.HandleException(this.Text + "--设定默认值事件错误。", ex);
         ExceptionHandler.HandleException(this.Text + "--" + f.tsmiSdmrzsjcw.Text, ex);
     }
 }
Beispiel #30
0
        private void M_dataTable_TableNewRow(object sender, DataTableNewRowEventArgs e)
        {
            Debug.Assert(e.Row.Table.Rows.Count > 0, "exiting table not empty");
            DataRow row     = e.Row;
            DataRow lastRow = row.Table.Rows[row.Table.Rows.Count - 1];

            row["titleId"] = lastRow["titleId"];
            row["ord"]     = (short)lastRow["ord"] + 1;
            //copy above row style
            for (int i = 3; i < 8; i++)
            {
                row[i] = lastRow[i];
            }
        }
Beispiel #31
0
 private void OnTableNewRowAdded(object src, DataTableNewRowEventArgs args)
 {
     _tableNewRowAddedEventFired = true;
 }