Esempio n. 1
0
 void DataTable0_TableNewRow(object sender, DataTableNewRowEventArgs e)
 {
     if (_dataType != DataType.Report)
     {
         string sysTableID = _drTable["SysTableID"].ToString();
         if (_autoIncreValues == null)
         {
             _autoIncreValues = new AutoIncrementValues(sysTableID, _dsStruct.Tables[0]);
         }
         _autoIncreValues._dbStruct = this._dbStruct;
         _autoIncreValues.MakeNewStruct();
         if (_drTable["Type"].ToString() == "1" || _drTable["Type"].ToString() == "4") //nhap lieu tren luoi
         {
             _drCurrentMaster = e.Row;
         }
     }
     SetDefaultValues(_dsStruct.Tables[0], e.Row);
     _dataChanged = true;
 }
Esempio n. 2
0
 protected string AutoIncreateSoCt()
 {
     _AutoCreate           = new AutoIncrementValues(dsStr.Tables[0].Rows[0]["sysTableID"].ToString(), dsStr.Tables[2]);
     _AutoCreate._dbStruct = this._dbSt;
     _AutoCreate.MakeNewStruct();
     DataRow[] ldr = _AutoCreate.DtStruct.Select("FieldName='SoCt'");
     if (ldr.Length == 0)
     {
         return("HD0000001");
     }
     return(ldr[0]["DefaultValue"].ToString());
 }