/// <summary> /// 验证网格中的所有输入是否合法 /// </summary> /// <param name="dgv">DataGridView 控件</param> /// <param name="ValidateColsNames">需要验证的列的列名字符串数组</param> /// <param name="ValidateColumns">验证条件集合</param> public virtual void ValidateAllKey(DataGridView dgv, string[] ValidateColsNames, ValidateColumn[] ValidateColumns) { CommDBFunction.ValidateAllKey(dgv, ValidateColsNames, ValidateColumns); }
public DialogResult ErroMessage(string MessageDescription, string MoudleName, MessageBoxButtons MsgButton, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton) { return(CommDBFunction.ErroMessage(MessageDescription, MoudleName, MsgButton, Icon, DefaultButton)); }
/// <summary> /// 返回一行一列的数据 /// </summary> /// <param name="ConnStr">连接字符串</param> /// <param name="strSQL">SQL语句</param> /// <returns></returns> public virtual object GetScalarData(string ConnStr, string strSQL) { return(CommDBFunction.GetScalarData(ConnStr, strSQL)); }
/// <summary> /// 执行一条无返回值的SQL命令(带事务) /// </summary> /// <param name="conn">SqlConnection</param> /// <param name="trans">SqlTransaction</param> /// <param name="sqlCommand">SQL命令</param> /// <returns></returns> public virtual int ExecuteNonQuery(SDC.SqlConnection conn, SDC.SqlTransaction trans, string sqlCommand) { return(CommDBFunction.ExecuteNonQuery(conn, trans, sqlCommand)); }
public string GetAscII(string character) { return(CommDBFunction.GetAscII(character)); }
/// <summary> /// 将表的某一列作为一个列表返回 /// (列表类型为泛型,类型必须与对应列的类型相一致) /// </summary> /// <typeparam name="T">返回列表的类型</typeparam> /// <param name="dt">DataTable</param> /// <param name="Col">需要返回的列</param> /// <returns></returns> public List <T> GetColList <T>(SD.DataTable dt, int Col) { return(CommDBFunction.GetColList <T>(dt, Col)); }
/// <summary> /// 获得某个包含中英文的字符串的非Unicode实际长度 /// </summary> /// <param name="Value">被测字符串</param> /// <returns></returns> public virtual int TestTrueLens(string Value) { return(CommDBFunction.TestTrueLens(Value)); }
/// <summary> /// 撤消网格中的更改 /// </summary> /// <param name="dgv">DataGridView 控件</param> /// <param name="dt">DataGridView的DataSource的DataTable</param> public virtual void RejectChanges(DataGridView dgv, SD.DataTable dt) { CommDBFunction.RejectChanges(dgv, dt); }
/// <summary> /// 删除网格中的选中行 /// </summary> /// <param name="dgv">DataGridView 控件</param> /// <param name="dt">DataGridView的DataSource的DataTable</param> public virtual void DeleteRows(DataGridView dgv, SD.DataTable dt) { CommDBFunction.DeleteRows(dgv, dt); }
/// <summary> /// 在网格控件中增加新行(DataTable已经做了默认值的使用) /// </summary> /// <param name="dgv">DataGridView 控件</param> /// <param name="dt">DataGridView 所绑定的 DataTable</param> /// <param name="Col">新增后光标所定位在的列</param> public virtual void AddNewRow(DataGridView dgv, SD.DataTable dt, int Col) { CommDBFunction.AddNewRow(dgv, dt, Col); }
/// <summary> /// 在网格中增加指定类型的新列 /// </summary> /// <param name="dgv">DataGridView 控件</param> /// <param name="ColumnProp">描述列类型及属性的结构体的数组集合</param> public virtual void InitColumn(DataGridView dgv, ColumnProperty[] ColumnProps) { CommDBFunction.InitColumn(dgv, ColumnProps); }
/// <summary> /// 在网格控件中增加新行 /// </summary> /// <param name="dgv">DataGridView 控件</param> /// <param name="ColIndex">用于判断可否新增行的列的数组</param> public virtual void AddNewRow(DataGridView dgv, int[] ColIndex) { CommDBFunction.AddNewRow(dgv, ColIndex); }
///// <summary> ///// 返回是否可以新增行 ///// </summary> ///// <param name="dgv">DataGridView 控件</param> ///// <param name="ColIndex">用于判断可否新增行的列的数组</param> ///// <returns></returns> public virtual bool CanAddNewRow(DataGridView dgv, int[] ColIndex) { return(CommDBFunction.CanAddNewRow(dgv, ColIndex)); }
/// <summary> /// 格式化网格控件 /// </summary> /// <param name="Grid">DataGridView控件</param> public virtual void FormatDataGridView(DataGridView Grid) { CommDBFunction.FormatDataGridView(Grid); }
/// <summary> /// 使字符串参数化 /// </summary> /// <param name="String">原字符串</param> /// <returns></returns> public virtual string SParm(string String) { return(CommDBFunction.SParm(String)); }
/// <summary> /// 保存数据表所做的更改(不带事务) /// </summary> /// <param name="ConnStr">连接字符串</param> /// <param name="strSQL">SQL查询语句</param> /// <param name="dt">DataGridView的DataSource的DataTable</param> public virtual void SaveChanges(string ConnStr, string strSQL, SD.DataTable dt) { CommDBFunction.SaveChanges(ConnStr, strSQL, dt); }
public virtual string SParm(string String, bool Convert) { return(CommDBFunction.SParm(String, Convert)); }
/// <summary> /// 保存数据表所做的更改(带事务) /// </summary> /// <param name="conn">SqlTransaction</param> /// <param name="trans">SqlTransaction</param> /// <param name="strSQL">需要更新的表的SQL语句</param> /// <param name="dt">需要更新的DataTable</param> public virtual void SaveChangesOnTrans(SDC.SqlConnection conn, SDC.SqlTransaction trans, string strSQL, SD.DataTable dt) { CommDBFunction.SaveChangesOnTrans(conn, trans, strSQL, dt); }
/// <summary> /// 测试字符串是否是一个数值(浮点型) /// </summary> /// <param name="Value">待检验的字符串</param> /// <returns></returns> public virtual bool IsNumber(string Value) { return(CommDBFunction.IsNumber(Value)); }
/// <summary> /// 检测是否有未保存的更改(用于窗体关闭时) /// </summary> /// <param name="table">用于检测是否有更改的DataTable</param> /// <returns></returns> public virtual bool IsChanged(SD.DataTable table) { return(CommDBFunction.IsChanged(table)); }
/// <summary> /// 执行一条无返回值的SQL命令(不带事务) /// </summary> /// <param name="ConnStr">连接字符串</param> /// <param name="sqlCommand">SQL命令</param> /// <returns></returns> public virtual int ExecuteNonQuery(string ConnStr, string sqlCommand) { return(CommDBFunction.ExecuteNonQuery(ConnStr, sqlCommand)); }
/// <summary> /// 清空网格控件 /// </summary> /// <param name="gdv">DataGridView 控件</param> public virtual void ClearDataGridView(DataGridView gdv) { CommDBFunction.ClearDataGridView(gdv); }
/// <summary> /// 检验网格中是否有单元格的ErrorText不为空 /// </summary> /// <param name="dgv">DataGridView网格</param> /// <returns></returns> public virtual bool ChkDgvHasErrText(DataGridView dgv) { return(CommDBFunction.ChkDgvHasErrText(dgv)); }
///// <summary> ///// 返回窗体需要验证的列的信息 ///// </summary> ///// <returns></returns> //public virtual ValidateColumn[] GetValidateColumnsList() //{ // List<ValidateColumn> lstValiCols = new List<ValidateColumn>(); // return lstValiCols.ToArray(); //} #endregion #region 拿到需要验证的列的列名的字符串列表 /// <summary> /// 拿到需要验证的列的列名的字符串列表 /// </summary> /// <param name="ValidateColumns">需要验证的列及其规则的集合</param> /// <returns></returns> public virtual string[] GetValidateColumnsName(ValidateColumn[] ValidateColumns) { return(CommDBFunction.GetValidateColumnsName(ValidateColumns)); }
/// <summary> /// Solomon密码加密 /// </summary> /// <param name="passWord"></param> /// <returns></returns> public string SolEncodePassword(string passWord) { return(CommDBFunction.SolEncodePassword(passWord)); }
/// <summary> /// 验证网格中的所有输入是否合法 /// </summary> /// <param name="dgv">DataGridView 控件</param> /// <param name="e">单元格数据源</param> /// <param name="ValidateColumns">验证条件集合</param> public virtual void ValidateRowKey(DataGridView dgv, DataGridViewCellEventArgs e, ValidateColumn[] ValidateColumns) { CommDBFunction.ValidateRowKey(dgv, e, ValidateColumns); }
public void ErroMessage(string MessageDescription, string MoudleName, MessageBoxIcon Icon, MessageBoxDefaultButton DefaultButton) { CommDBFunction.ErroMessage(MessageDescription, MoudleName, Icon, DefaultButton); }
/// <summary> /// 界面加载数据OLEDB /// </summary> /// <param name="ConnStr">连接字符串</param> /// <param name="strSQL">SQL语句</param> /// <param name="strTableName">DataTable表名</param> public virtual SD.DataTable GetOLEDBData(string ConnStr, string strSQL, string strTableName, bool isTable) { return(CommDBFunction.GetOLEDBData(ConnStr, strSQL, strTableName, isTable)); }