}//fin MenuEvent private void GuardarRegistros() { TFunctions Reg; Int32 _return; try { if (Validar()) { if (GlobalSettings.RunningUnderSQLServer) { s = "select count(*) 'cont' from [@VID_FEDIST] where DocEntry = '{0}'"; } else { s = @"select COUNT(*) ""cont"" from ""@VID_FEDIST"" where ""DocEntry"" = '{0}' "; } s = String.Format(s, (System.String)(oDBDSH.GetValue("DocEntry", 0))); oRecordSet.DoQuery(s); Reg = new TFunctions(); Reg.SBO_f = FSBOf; oMtx.FlushToDataSource(); if ((System.Int32)(oRecordSet.Fields.Item("cont").Value) == 0) { _return = Reg.FEDistAdd(oDBDSH, oDBDSD); } else { _return = Reg.FEDistUpt(oDBDSH, oDBDSD); } if (_return > 0) { oDBDSH.SetValue("DocEntry", 0, Convert.ToString(_return)); oForm.Mode = BoFormMode.fm_OK_MODE; } } } catch (Exception e) { FSBOApp.MessageBox(e.Message + " ** Trace: " + e.StackTrace, 1, "Ok", "", ""); OutLog("GuardarRegistros: " + e.Message + " ** Trace: " + e.StackTrace); } }//fin GuardarRegistros