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]; } }
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); } }
/////////////////////////////////////////////////////////////////////// // 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; }
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(); }
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; } }
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); }
/////////////////////////////////////////////////////////////////////// // 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; }
/// <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); } }
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(); } }
/// <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; } }
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); } }
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; } }
/// <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); } }
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); }
/// <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(); } }
/// <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; }
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(); }
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; }
/// <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 = ""; } }
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"; } }
/// <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 = ""; } }
///////////////////////// // 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; }
/// <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; }
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; }
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); } }
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(); } } } }
/// <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); } }
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]; } }
private void OnTableNewRowAdded(object src, DataTableNewRowEventArgs args) { _tableNewRowAddedEventFired = true; }