//*********************************************************************************************** #endregion #region 重写基类的方法 public override void Init(IDBQuery dbHelper, IBizDataTransferCenter dataTransCenter, IStationInfo stationInfo, ILoginUser userData, IParameters parameters, ISysLog sysLog) { base.Init(dbHelper, dataTransCenter, stationInfo, userData, parameters, sysLog); //初始化ApplyControl applyControl.Init(_dbQuery, _dataTransCenter, _stationInfo, _userData, _parameters, _sysLog); SetButtonState(ButtonState.bsNormal); }
private void LoadDesign() { this.BackColor = Color.Transparent; if (_dataViewDesign != null) { IDBQuery curDBQuery = _dbQuery; if (string.IsNullOrEmpty(_dataViewDesign.DBSourceAlias) == false) { string strErr = ""; curDBQuery = SqlHelper.GetThridDBHelper(_dataViewDesign.DBSourceAlias, _dbQuery, ref strErr); if (curDBQuery == null) { MessageBox.Show("获取数据访问接口产生错误:" + strErr, "提示"); return; } } dataViewLayout1.DBHelper = _dbQuery; dataViewLayout1.ThridDBHelper = curDBQuery; dataViewLayout1.LoadLayout(_dataViewDesign.Items, _dataViewDesign.LayoutFmt); } }
public void Init(IDBQuery dbHelper, ILoginUser loginUser) { _dbHelper = dbHelper; _rwm = new RoleWindowModel(_dbHelper); _loginUser = loginUser; _departmentMatchModel = new DepartmentMatchModel(dbHelper); }
public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { try { ViewItemWrapper instance = (context.Instance as ViewItemWrapper); Control instanceParent = instance.Parent; while (instanceParent.Parent != null) { instanceParent = instanceParent.Parent; if (instanceParent as frmDataViewModuleDesign != null) { break; } } IDBQuery dbHelper = null; string sql = ""; if (instanceParent is frmDataViewModuleDesign) { dbHelper = (instanceParent as frmDataViewModuleDesign).CurDBHelper; sql = (instanceParent as frmDataViewModuleDesign).CurSql; } //打开属性编辑器修改数据 return(frmDataFieldEditor.EditValue(instanceParent, dbHelper, sql, value)); } catch (Exception ex) { MsgBox.ShowException(ex); return(null); } }
public void Init(IDBQuery dbHelper, ILoginUser loginUser) { _dbHelper = dbHelper; _loginUser = loginUser; _dbDicModel = new DictManageModel(_dbHelper); }
private void tsbTest_Click(object sender, EventArgs e) { try { IDBQuery curDBHelper = _dbHelper; if (string.IsNullOrEmpty(tsCbxDataSource.Text) == false) { string strErr = ""; curDBHelper = SqlHelper.GetThridDBHelper(tsCbxDataSource.Text, _dbHelper, ref strErr); if (curDBHelper == null) { MessageBox.Show("获取数据访问接口产生错误:" + strErr, "提示"); return; } } queryDesigner1.ShowQuery(curDBHelper); } catch (Exception ex) { MsgBox.ShowException(ex, this); } }
public void Init(IDBQuery dbHelper, ILoginUser loginUser) { _dbHelper = dbHelper; _loginUser = loginUser; _bpm = new BodypartModel(_dbHelper); _comboxEx = new ComboxEx(dbHelper); }
public void Init(IDBQuery dbHelper, ILoginUser loginUser) { _dbHelper = dbHelper; _loginUser = loginUser; _hsm = new HisServerModel(_dbHelper); }
public void ShowTest(IDBQuery dbHelper, DataViewModuleDesign dataViewDesign, IWin32Window owner) { _dbHelper = dbHelper; _dataViewDesign = dataViewDesign; this.ShowDialog(owner); }
/// <summary> /// 判断指定的数据字段是否存在 /// </summary> /// <param name="tableName"></param> /// <param name="fieldName"></param> /// <returns></returns> public static bool HasDataField(string tableName, string fieldName) { IDBQuery query = CFAspect.Resolve <IDBQuery>(); DBBuilder sql = DBBuilder.Select().Append(dbAdapter => "count(*) from " + dbAdapter.FormatFunction("getcolumns", dbAdapter.FormatValue(tableName)) + " where column_name=" + dbAdapter.FormatValue(fieldName)); return(Convert.ToInt32(query.ToScalar(sql)) > 0); }
public void ShowDesign(BindDataSource dbSource, IDBQuery dbHelper, IWin32Window owner) { _dbSource = dbSource; _dbHelper = dbHelper; this.ShowDialog(owner); }
public void ShowDesign(InfoModuleDesign infoDesign, IDBQuery dbHelper, IWin32Window owner) { _infoDesign = infoDesign; _dbHelper = dbHelper; this.ShowDialog(owner); }
public void Init(IDBQuery dbHelper, ILoginUser loginUser) { _dbHelper = dbHelper; _qm = new QueueModel(_dbHelper); _loginUser = loginUser; _departmentMatchModel = new DepartmentMatchModel(dbHelper); }
static public void ShowImgPreview(IDBQuery dbHelper, string applyId, IWin32Window owner) { using (frmImageView imgView = new frmImageView()) { imgView.ShowImgPreview(dbHelper, applyId, owner); } }
public void Init(IDBQuery dbHelper, ILoginUser loginUser) { _dbHelper = dbHelper; _loginUser = loginUser; _rwm = new ReportWordsModel(_dbHelper); _comboxEx = new ComboxEx(dbHelper); }
public bool ShowDesign(ApplySearchDesign applySearchDesign, IWin32Window owner, IDBQuery dbQuery) { _applySearchDesign = applySearchDesign; _dbQuery = dbQuery; this.ShowDialog(owner); return(_isOk); }
/// <summary> /// 测试查询 /// </summary> /// <param name="dbHelper"></param> /// <returns></returns> public bool TestQuery(IDBQuery dbHelper) { string sql = qcReview.Query.TestSql(); dbHelper.ExecuteSQL(sql); return(true); }
public static int Set(this IDBIO dbio, IDBQuery query) { QueryCompilation queryCompilation; queryCompilation = query.Compile(); return(prv_set(dbio, queryCompilation.Query, queryCompilation.Parameters)); }
private static IEnumerable <T> prv_get <T>(IDBIO dbio, IDBQuery query, Func <IDataRecord, T> buildDelegate) { QueryCompilation queryCompilation; queryCompilation = query.Compile(); return(prv_get <T>(dbio, queryCompilation.Query, queryCompilation.Parameters, buildDelegate)); }
public void ShowImgPreview(IDBQuery dbHelper, string applyId, IWin32Window owner) { _dbHelper = dbHelper; _applyId = applyId; _studyMediaModel = new StudyMediaSerialModel(dbHelper); this.ShowDialog(owner); }
public void Init(IDBQuery dbHelper, ILoginUser loginUser) { _dbHelper = dbHelper; _loginUser = loginUser; _um = new UserModel(_dbHelper); _comboxEx = new ComboxEx(dbHelper); _departmentMatchModel = new DepartmentMatchModel(dbHelper); }
/// <summary> /// 初始化 /// </summary> /// <param name="dbHelper">数据库连接</param> private void Init(IDBQuery dbHelper) { _dbHelper = dbHelper; _eiModel = new ExamItemModel(_dbHelper); _bpModel = new BodypartModel(_dbHelper); InitBodypartList(); InitModality(); BindExamClassData(); }
public void Init(IDBQuery dbHelper, ILoginUser loginUser) { _dbHelper = dbHelper; _pm = new ParameterModel(_dbHelper); _nrm = new NoRuleModel(dbHelper); _loginUser = loginUser; }
private string _formatId = ""; //格式ID public frmReportWordsConfig(IDBQuery dbHelper, string imgKind) { InitializeComponent(); _dbHelper = dbHelper; _imgKind = imgKind; _rwm = new ReportWordsModel(dbHelper); }
/// <summary> /// 编辑属性值 /// </summary> /// <param name="designParent"></param> /// <param name="instance"></param> /// <param name="value"></param> /// <returns></returns> public static object EditValue(Control designParent, IDBQuery dbHelper, string sql, object value) { using (frmDataFieldEditor form = new frmDataFieldEditor(dbHelper, sql, value)) { form.ShowDialog(designParent); return(form.DataField); } }
public frmRequest(OraServices rsHis, IDBQuery dbHelper, ILoginUser userData) { _rsHis = rsHis; _dbHelper = dbHelper; _userData = userData; InitializeComponent(); init(); }
private object GetDefaultValue(InputItem ii) { if (string.IsNullOrEmpty(ii.DefaultValue)) { return(null); } if (ii.DefaultValue.IndexOf("[") < 0 && ii.DefaultValue.IndexOf("]") < 0) { return(ii.DefaultValue); } if (ii.DefaultValue.IndexOf("[SQL:") >= 0) { //sql语句处理 IDBQuery thridDbHelper = _dbHelper; if (string.IsNullOrEmpty(ii.DBAlias) == false) { string strErr = ""; thridDbHelper = SqlHelper.GetThridDBHelper(ii.DBAlias, _dbHelper, ref strErr); if (thridDbHelper == null) { MessageBox.Show("录入项 [" + ii.Name + "] 对应的数据源不能创建。", "提示"); return(null); } } if (thridDbHelper != null) { string sql = "Select (" + ii.DefaultValue.Replace("[SQL:", "").Replace("]", "") + ") as Result from dual"; DataTable dtResult = thridDbHelper.ExecuteSQL(sql); if (dtResult == null || dtResult.Rows.Count <= 0) { return(null); } return(dtResult.Rows[0]["Result"]); } else { MessageBox.Show("尚未初始化数据查询对象。", "提示"); return(null); } } else if (ii.DefaultValue.IndexOf("[CS:") >= 0) { //csharp代码处理 return(null); } else { return(ii.DefaultValue); } }
public bool ShowDataOperModuleDesign(IDBQuery dbHelper, DataOperModuleDesign dataOperDesign, IWin32Window owner) { _isOk = false; _dataOperDesign = dataOperDesign; _dbHelper = dbHelper; this.ShowDialog(owner); return(_isOk); }
public virtual void Init(IDBQuery dbHelper, ILoginUser userData, IStationInfo stationInfo, IBizDataTransferCenter parentTransferCenter) { _dbHelper = dbHelper; _userData = userData; _stationInfo = stationInfo; //初始化系统框架相关对象 _dataTransCenter = new BizDataTransferCenter(); _dataTransCenter.ParentDataCenter = parentTransferCenter; }
public DataBuffer(IDBQuery dataBase, string bufDir, string bufName) : base(bufDir, bufName) { if (dataBase == null) { throw new DBNullException(); } _db = dataBase; }