//加载功能 private void LoadModule(ModuleModel m, out NavBarGroup CurrentGroup, out BarSubItem CurrentBarItem) { var ModuleImage = LoadUIImage.LoadNavBarImage_Group(ConvertLib.ToString(m.ModuleImg)); //添加模块到navBarControl1 //m.ModuleName = "(新)" + m.ModuleName; //LoadModule(hp, dtModulesFun, m); //hp.CurrentGroup.Appearance.ForeColor = Color.FromArgb(0x99, 0x00, 0x33); //hp.CurrentGroup.Appearance.Font = new Font(hp.CurrentGroup.Appearance.Font, FontStyle.Bold); CurrentGroup = new NavBarGroup() { Caption = m.Caption, SmallImage = ModuleImage, Tag = m }; navBarControl1.Groups.Add(CurrentGroup); //添加模块到bbi_Module CurrentBarItem = new BarSubItem() { Caption = m.Caption, Glyph = ModuleImage }; if (m.IsNew) { CurrentGroup.Appearance.ForeColor = Color.FromArgb(0x99, 0x00, 0x33); CurrentGroup.Appearance.Font = new Font(CurrentGroup.Appearance.Font, FontStyle.Bold); } ribbonControl1.Items.Add(CurrentBarItem); bsi_Modules.AddItem(CurrentBarItem); }
private void TreeProductCategory_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) { var v = ConvertLib.ToString(e.Node.GetValue(treeListColumn1)); gc_Detail_tb_PODetail.DataSource = bll.SearchListData(v); gv_Detail_tb_PODetail.ExpandAllGroups(); }
private static void LoadSummaryData(GridView gv, DataTable dt) { DataRow row = dt.Rows[0]; //交替行颜色 gv.OptionsView.EnableAppearanceEvenRow = gv.OptionsView.EnableAppearanceOddRow = Object.Equals(row[sys_GridViewLayout.IntervalColor], "Y"); //标题高 gv.ColumnPanelRowHeight = ConvertLib.ToInt(row[sys_GridViewLayout.HeadHeight], -1); //行高 gv.RowHeight = ConvertLib.ToInt(row[sys_GridViewLayout.RowHeight], -1); //显示横线 gv.OptionsView.ShowHorizontalLines = Object.Equals(row[sys_GridViewLayout.HorzLine], "Y") ? DefaultBoolean.True : DefaultBoolean.False; //显示竖线 gv.OptionsView.ShowVerticalLines = Object.Equals(row[sys_GridViewLayout.VertLine], "Y") ? DefaultBoolean.True : DefaultBoolean.False; //横线颜色 if (ConvertLib.ToInt(row[sys_GridViewLayout.HorzLineColor]) != 0) { gv.Appearance.HorzLine.BackColor = Color.FromArgb(ConvertLib.ToInt(row[sys_GridViewLayout.HorzLineColor])); } //竖线颜色 if (ConvertLib.ToInt(row[sys_GridViewLayout.VertLineColor]) != 0) { gv.Appearance.VertLine.BackColor = Color.FromArgb(ConvertLib.ToInt(row[sys_GridViewLayout.VertLineColor])); } }
void refreshDataSource() { var v = ConvertLib.ToString(treeProductCategory.FocusedNode.GetValue(treeListColumn1)); gc_Detail_tb_PODetail.DataSource = bll.SearchData(v); gv_Detail_tb_PODetail.ExpandAllGroups(); }
void refreshAmount() { int qty = ConvertLib.ToInt(txtQty.EditValue); decimal price = ConvertLib.ToDecimal(txtUnitPrice.EditValue, 0); txtTotalAmount.EditValue = qty * price; }
bool validateApprove() { DataRow row = gvMainData.GetFocusedDataRow(); bool app = ConvertLib.ToInt(row[tb_PO.AppStatus]) != 0; return(app); }
private void gv_Detail_ValidatingEditor(object sender, DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs e) { var view = sender as DevExpress.XtraGrid.Views.Grid.GridView; if (Object.Equals(view.FocusedColumn.Tag, "NotNull")) { if (Object.Equals(string.Empty, e.Value) || Object.Equals(null, e.Value) || Object.Equals(DBNull.Value, e.Value)) { e.Valid = false; e.ErrorText = view.FocusedColumn.Caption + "不能为空!"; } } if (view.FocusedColumn.FieldName == tb_PODetail.Qty || view.FocusedColumn.FieldName == tb_PODetail.POPrice) { decimal price = 0; int qty = 0; if (view.FocusedColumn.FieldName == tb_PODetail.Qty) { price = ConvertLib.ToDecimal(view.GetFocusedDataRow()[tb_PODetail.POPrice], 0); qty = ConvertLib.ToInt(e.Value, 0); } else { price = ConvertLib.ToDecimal(e.Value, 0); qty = ConvertLib.ToInt(view.GetFocusedDataRow()[tb_PODetail.Qty], 0); } decimal amount = price * qty; view.SetFocusedRowCellValue(tb_PODetail.TotalPOAmount, amount); RefreshSummary(); } }
public static void AddColumns(DataTable dt, params string[] Cols) { if (dt.Columns[DefNewColName] != null) { return; } dt.Columns.Add(DefNewColName, Type.GetType("System.String")); foreach (DataRow dr in dt.Rows) { string Combine = string.Empty; foreach (string Col in Cols) { if (String.IsNullOrEmpty(Combine)) { Combine = ConvertLib.ToString(dr[Col]); } else { Combine += " - " + ConvertLib.ToString(dr[Col]); } } dr[DefNewColName] = Combine; } }
/// <summary> /// 审核 /// </summary> protected override void DoApproval(object sender) { DataRow row = gvMainData.GetFocusedDataRow(); if (row == null) { return; } frmAppResult LoadResult = (frmAppResult)ConvertLib.ToInt(row["AppStatus"]); frmAppResult appstatus = frmApp.ShowForm(LoadResult); if (appstatus != frmAppResult.未审核) { string docno = row[tb_PO.DocNo] + ""; bll.Approval(docno, (int)appstatus); row[tb_PO.AppUser] = Loginer.CurrentLoginer.Account; row[tb_PO.AppDate] = DateTime.Now; row[tb_PO.AppStatus] = (int)appstatus; if (this.CurrentDataState == FormDataState.View) { EditData.Tables[tb_PO._TableName].Rows[0][tb_PO.AppUser] = Loginer.CurrentLoginer.Account; EditData.Tables[tb_PO._TableName].Rows[0][tb_PO.AppDate] = DateTime.Now; EditData.Tables[tb_PO._TableName].Rows[0][tb_PO.AppStatus] = (int)appstatus; } row.AcceptChanges(); } }
private void BoundData(DataSet ds, string LayoutID) { DataTable dtDetail = ds.Tables[sys_GridViewLayoutDetail._TableName]; DataRow row; foreach (GridColumn col in _View.Columns) { if (dtDetail.Select(String.Format("{0}='{1}'", sys_GridViewLayoutDetail.FileName, col.FieldName)).Length == 0) { row = dtDetail.Rows.Add(); row[sys_GridViewLayoutDetail.LayoutID] = LayoutID; row[sys_GridViewLayoutDetail.FileName] = col.FieldName; row[sys_GridViewLayoutDetail.FileCaptionBK] = col.Caption; row[sys_GridViewLayoutDetail.FileCaption] = col.Caption; row[sys_GridViewLayoutDetail.IsShow] = col.Visible ? "Y" : "N"; row[sys_GridViewLayoutDetail.Width] = col.Width; row[sys_GridViewLayoutDetail.FontColor] = col.AppearanceCell.ForeColor.ToArgb(); row[sys_GridViewLayoutDetail.BackColor] = col.AppearanceCell.BackColor.ToArgb(); row[sys_GridViewLayoutDetail.Alignment] = (int)col.AppearanceCell.TextOptions.HAlignment; if (col.SummaryItem != null) { row[sys_GridViewLayoutDetail.SummaryType] = (int)col.SummaryItem.SummaryType; row[sys_GridViewLayoutDetail.SummaryFormat] = col.SummaryItem.DisplayFormat; } } } gridControl1.DataSource = ds.Tables[sys_GridViewLayoutDetail._TableName]; dataBindingView1.DataSource = ds.Tables[sys_GridViewLayout._TableName]; txt_HorzLineColor.Color = Color.FromArgb(ConvertLib.ToInt(ds.Tables[sys_GridViewLayout._TableName].Rows[0][sys_GridViewLayout.HorzLineColor])); txt_VertLineColor.Color = Color.FromArgb(ConvertLib.ToInt(ds.Tables[sys_GridViewLayout._TableName].Rows[0][sys_GridViewLayout.VertLineColor])); }
void RefreshNodeCheckState() { this.UncheckAll(); if (_EditData == null) { return; } string Key; foreach (DataRow row in EditData.Rows) { int authority = ConvertLib.ToInt(row[dt_MyRoleAuthority.Authority]); var v = ConvertLib.ToBinaryNums(authority); foreach (int i in v) { Key = String.Format("{0}.{1}", row[dt_MyRoleAuthority.FunctionID], i); TreeListNode node = this.FindNodeByKeyID(Key); if (node == null) { continue; } _TreeListInitial.SetNodeCheckState(node, CheckState.Checked); } } }
public static bool VerificationEmpEditValue(BaseEdit edit) { if (String.IsNullOrEmpty(ConvertLib.ToString(edit.EditValue))) { return(true); } return(false); }
private void txt_ProviderName_EditValueChanged(object sender, EventArgs e) { string str = ConvertLib.ToString(txt_ProviderName.EditValue); xtraTabControl1.Enabled = !String.IsNullOrEmpty(str); str = String.IsNullOrEmpty(str) ? "Error" : str; ProviderName = str; }
private void gridView1_ValidatingEditor(object sender, DevExpress.XtraEditors.Controls.BaseContainerValidateEditorEventArgs e) { if (String.IsNullOrEmpty(ConvertLib.ToString(e.Value))) { e.Valid = false; e.ErrorText = gridView1.FocusedColumn.Caption + "不能为空!"; } }
public List <ModuleModel> GetModuleALL() { List <ModuleModel> lst = new List <ModuleModel>(); var modules = GetLocalAllModules(); DataSet ds = new bllModules().GetUserModules(Loginer.CurrentLoginer.Account); DataTable dtModules = ds.Tables[sys_Modules._TableName]; DataTable dtModulesFun = ds.Tables[sys_ModulesFunction._TableName]; foreach (IModule m in modules.Modules) { DataRow drModule = dtModules.Select($"{sys_Modules.ModuleID}='{m.ModuleID}'").FirstOrDefault(); ModuleModel module = new ModuleModel() { ModuleImg = m.ModuleImg, ModuleName = m.ModuleName, ModuleID = m.ModuleID, Sort = -1, ModuleMainType = (m is Form) ? m.GetType() : null }; if (drModule != null) { module.ModuleName = ConvertLib.ToString(drModule[sys_Modules.ModuleName]); module.Sort = ConvertLib.ToInt(drModule[sys_Modules.Sort]); module.IsNew = false; } foreach (ModuleFunction fun in m.FunctionCollection) { fun.Sort = -1; DataRow drFun = dtModulesFun.Select($"{sys_ModulesFunction.FunctionID}='{fun.FunctionID}'").FirstOrDefault(); if (drFun != null) { fun.FunctionName = ConvertLib.ToString(drFun[sys_ModulesFunction.FunctionName]); fun.Sort = ConvertLib.ToInt(drFun[sys_ModulesFunction.Sort]); byte[] imgByte = drFun[sys_ModulesFunction.Image] as byte[]; if (imgByte != null && imgByte.Length > 0) { fun.FormIcon = Common.ImageLibrary.ConvertBytesToImage(imgByte); } fun.IsNew = false; } fun.UserAuthority = GZFramework.UI.Core.FunctionAuthority.All; module.functions.Add(fun); } if (module.functions.Count > 0) { lst.Add(module); } } SortModule(lst); return(lst); }
void UpdateAuthority(TreeListNode Node) { if (Node.HasChildren) { foreach (TreeListNode Cnode in Node.Nodes) { UpdateAuthority(Cnode); } } else { if (Node.Checked) { if (ConvertLib.ToInt(Node.GetValue("AuthorityID")) <= 0) { return; } string filter = String.Format("{0}='{1}'", dt_MyRoleAuthority.FunctionID, Node.GetValue("ParentKey")); var v = EditData.Tables[dt_MyRoleAuthority._TableName].Select(filter); DataRow dr; if (v.Length > 0) { dr = v[0]; dr[dt_MyRoleAuthority.Authority] = ConvertLib.ToInt(dr[dt_MyRoleAuthority.Authority]) + ConvertLib.ToInt(Node.GetValue("AuthorityID")); } else { dr = EditData.Tables[dt_MyRoleAuthority._TableName].Rows.Add(); dr[dt_MyRoleAuthority.RoleID] = EditData.Tables[dt_MyRole._TableName].Rows[0][dt_MyRole.RoleID]; dr[dt_MyRoleAuthority.FunctionID] = Node.GetValue("ParentKey"); dr[dt_MyRoleAuthority.Authority] = Node.GetValue("AuthorityID"); } } else { string filter = String.Format("{0}='{1}'", dt_MyRoleAuthority.FunctionID, Node.GetValue("ParentKey")); //string stringFormat = String.Format("{0}='{1}' AND {2}='{3}'", // dt_MyRoleAuthority.FunctionID, Node.GetValue("ParentKey"), dt_MyRoleAuthority.Authority, Node.GetValue("AuthorityID")); DataRow[] drs = EditData.Tables[dt_MyRoleAuthority._TableName].Select(filter); if (drs.Length > 0) { int authority = 0; if (drs.Length > 0) { authority = ConvertLib.ToInt(drs[0][dt_MyRoleAuthority.Authority]); } int NoteValue = ConvertLib.ToInt(Node.GetValue("AuthorityID")); if ((authority & NoteValue) == NoteValue)//包含权限 { drs[0][dt_MyRoleAuthority.Authority] = authority - NoteValue; } } } } }
protected frmApp(DataRow row) { dr = row; frmAppResult LoadResult = (frmAppResult)ConvertLib.ToInt(row["AppStatus"]); InitializeComponent(); btn_Access.Enabled = LoadResult == frmAppResult.未审核; btn_Abort.Enabled = LoadResult == frmAppResult.已审核; btn_Stop.Enabled = LoadResult == frmAppResult.未审核; }
private void btn_OK_Click(object sender, EventArgs e) { Num = ConvertLib.ToInt(txtNum.EditValue); if (Num <= 0) { Msg.Warning("数量必须大于0"); return; } DialogResult = DialogResult.Cancel; }
private void btn_OK_Click(object sender, EventArgs e) { bool b = LibraryTools.IsNotEmpBaseEdit(txtItemNo, "货号不能为空!"); if (b == false) { return; } Data = new DataTable(); Data.Columns.Add(nameof(tb_PODetail.ItemNo), typeof(System.String)); Data.Columns.Add(nameof(tb_PODetail.ItemName), typeof(System.String)); Data.Columns.Add(nameof(tb_PODetail.CategoryID), typeof(System.String)); Data.Columns.Add(nameof(tb_PODetail.POPrice), typeof(System.Decimal)); Data.Columns.Add(nameof(tb_PODetail.SOPrice), typeof(System.Decimal)); Data.Columns.Add(nameof(tb_PODetail.Color), typeof(System.String)); Data.Columns.Add(nameof(tb_PODetail.Size), typeof(System.String)); Data.Columns.Add(nameof(tb_PODetail.Qty), typeof(System.Int16)); Data.Columns.Add(nameof(tb_PODetail.TotalPOAmount), typeof(System.Decimal)); foreach (DataRow row in dtQty.Rows) { string color = ConvertLib.ToString(row["Color"]); for (int i = 0; i < dtSize.Rows.Count; i++) { string fileName = "Qty_" + (i + 1); int qty = ConvertLib.ToInt(row[fileName]); if (qty > 0) { DataRow dr = Data.NewRow(); dr[tb_PODetail.ItemNo] = txtItemNo.EditValue; if (!String.IsNullOrEmpty(ConvertLib.ToString(txtItemName.EditValue))) { dr[tb_PODetail.ItemName] = txtItemName.EditValue; } dr[tb_PODetail.CategoryID] = txtCategory.EditValue; if (!String.IsNullOrEmpty(ConvertLib.ToString(txtPOPrice.EditValue))) { dr[tb_PODetail.POPrice] = txtPOPrice.EditValue; } if (!String.IsNullOrEmpty(ConvertLib.ToString(txtSOPrice.EditValue))) { dr[tb_PODetail.SOPrice] = txtSOPrice.EditValue; } dr[tb_PODetail.Color] = color; dr[tb_PODetail.Size] = dtSize.Rows[i]["DataName"]; dr[tb_PODetail.Qty] = qty; dr[tb_PODetail.TotalPOAmount] = ConvertLib.ToDecimal(txtPOPrice.EditValue, 0) * qty; Data.Rows.Add(dr); } } } Data.AcceptChanges(); this.DialogResult = DialogResult.OK; }
private List <ModuleModel> GetModuleConfig() { List <ModuleModel> lst = new List <ModuleModel>(); var lstModules = GetLocalAllModules(); DataSet ds = new bllModules().GetUserModules(Loginer.CurrentLoginer.Account); DataTable dtModules = ds.Tables[sys_Modules._TableName]; DataTable dtModulesFun = ds.Tables[sys_ModulesFunction._TableName]; foreach (DataRow dr in dtModules.Rows) { var m = lstModules.Modules[dr[sys_Modules.ModuleID].ToString()]; if (m == null) { continue; } ModuleModel module = new ModuleModel() { ModuleImg = m.ModuleImg, ModuleName = dr[sys_Modules.ModuleName] + "", ModuleID = m.ModuleID, Sort = ConvertLib.ToInt(dr[sys_Modules.Sort]), IsNew = false, ModuleMainType = (m is Form) ? m.GetType() : null }; dtModulesFun.DefaultView.RowFilter = String.Format("{0}='{1}'", sys_ModulesFunction.ModuleID, dr[sys_Modules.ModuleID]); foreach (DataRow row in dtModulesFun.DefaultView.ToTable().Rows) { var fun = m.FunctionCollection[row[sys_ModulesFunction.FunctionID].ToString()]; fun.UserAuthority = ConvertLib.ToInt(row["UserAuthority"]); fun.FunctionName = ConvertLib.ToString(row[sys_ModulesFunction.FunctionName]); fun.Sort = ConvertLib.ToInt(row[sys_ModulesFunction.Sort]); fun.IsNew = false; byte[] imgByte = row[sys_ModulesFunction.Image] as byte[]; if (imgByte != null && imgByte.Length > 0) { fun.FormIcon = Common.ImageLibrary.ConvertBytesToImage(imgByte); } if (fun == null) { continue; } module.functions.Add(fun); } if (module.functions.Count > 0) { lst.Add(module); } } SortModule(lst); return(lst); }
private frmDialogSaleEdit(DataRow row) { InitializeComponent(); DataSource = row; txtBarCode.Text = ConvertLib.ToString(DataSource[tb_SODetail.BarCode]); txtItemNo.Text = ConvertLib.ToString(DataSource[tb_SODetail.ItemNo]); txtItemName.Text = ConvertLib.ToString(DataSource[tb_SODetail.ItemName]); txtQty.EditValue = DataSource[tb_SODetail.Qty]; txtUnitPrice.EditValue = DataSource[tb_SODetail.UnitPrice]; txtTotalAmount.EditValue = DataSource[tb_SODetail.TotalAmount]; txtRemark.EditValue = DataSource[tb_SODetail.Remark]; }
bool ValidatePwd() { string pwd = ConvertLib.ToString(txt_pwd.EditValue); bllLogin bll = new Business.bllLogin(); bool Success = bll.VerifyPwdEx(Loginer.CurrentLoginer.Account, pwd); if (Success == false) { txt_pwd.ErrorText = "密码错误!"; } return(Success); }
private void btn_OK_Click(object sender, EventArgs e) { if (ConvertLib.ToString(txt_DBName.EditValue) == "") { txt_DBName.ErrorText = "名称不能为空!"; return; } else { this.DialogResult = DialogResult.OK; } }
/// <summary> /// 绑定RadioGroup组控件的数据源 /// </summary> /// <param name="edit">RadioGroup组控件</param> /// <param name="dataSource">数据源</param> /// <param name="bindField">取值字段</param> public static void BindingRadioEdit(RadioGroup edit, DataTable dataSource, string displayMember, string valueMember) { foreach (DataRow dr in dataSource.Rows) { string strName = ConvertLib.ToString(dr[displayMember]); //获取名称 string strVaule = ConvertLib.ToString(dr[valueMember]); //获取值 DevExpress.XtraEditors.Controls.RadioGroupItem rgItem = new DevExpress.XtraEditors.Controls.RadioGroupItem() { Description = strName, Value = strVaule }; edit.Properties.Items.Add(rgItem); } }
//删除 private void btn_Delete_Click(object sender, EventArgs e) { DataRow dr = gv_Summary.GetFocusedDataRow(); if (dr == null) { return; } string DBCode = ConvertLib.ToString(dr[sys_DataBaseList.DBCode]); bll.Delete(DBCode); gv_Summary.DeleteSelectedRows(); Msg.ShowInformation("删除成功!"); }
private void btn_OK_Click(object sender, EventArgs e) { decimal amount = ConvertLib.ToDecimal(txtAmount.EditValue, 0); AmountIn = ConvertLib.ToDecimal(txtIn.EditValue, 0); AmountOut = ConvertLib.ToDecimal(txtOut.EditValue, 0); if (AmountIn < amount) { Msg.ShowError("收款金额不能小于应收款"); } else { this.DialogResult = DialogResult.OK; } }
/// <summary> /// 验证用户名密码 /// </summary> /// <param name="User"></param> /// <param name="Pwd"></param> /// <param name="dr"></param> /// <returns></returns> public Loginer VerifyPwd(string User, string Pwd, string LoginDBCode) { Pwd = PwdEncrypt(Pwd); SqlParameterProvider p = new SqlParameterProvider(); p.AddParameter("@Account", SqlDbType.VarChar, User); p.AddParameter("@Pwd", SqlDbType.VarChar, Pwd); p.AddParameter("@LoginDBCode", SqlDbType.VarChar, LoginDBCode); DataTable dt = DataBaseFactoryEx.CreateDataBase(Loginer.CurrentLoginer.SystemDBCode).GetTableSP("usp_UserLogin", "tmp", p); if (dt.Rows.Count == 0) { return(null); } else { DataRow row = dt.Rows[0]; Loginer user = new Loginer(); user.Account = (string)row[dt_MyUser.Account]; user.UserName = (string)row[dt_MyUser.UserName]; user.IsSysAdmin = Object.Equals(row[dt_MyUser.IsSysAdmain], "Y"); user.IsSysLock = Object.Equals(row[dt_MyUser.IsSysLock], "Y"); user.LoginDBCode = ConvertLib.ToString(row[dt_MyUserDBs.DBCode]); user.IsDBAdmin = Object.Equals(row[dt_MyUserDBs.IsDBAdmin], "Y"); user.IsDBLock = Object.Equals(row[dt_MyUserDBs.IsDBLock], "Y"); if (user.IsSysAdmin && String.IsNullOrEmpty(user.LoginDBCode)) { user.LoginDBCode = LoginDBCode; } return(user); } //var v = DatabaseFactory.CreateDataBaseEx(Loginer.CurrentLoginer.SystemDBCode).ExecuteDataReader(sql, new { Account = User, Pwd = Pwd }, row => //{ // return new Loginer() // { // Account = (string)row[dt_MyUser.Account], // UserName = (string)row[dt_MyUser.UserName], // IsDBAdmin = Object.Equals(row[dt_MyUser.IsAdmain], "Y") // }; //}); //if (v.Count() > 0) // return v.First(); //else // return null; }
void LoadConfigDBList() { bllDataBaseList bll = new bllDataBaseList(); DataTable dt = bll.GetUserDBList(Loginer.CurrentLoginer.Account); foreach (DataRow dr in dt.Rows) { string DBCode = ConvertLib.ToString(dr[sys_DataBaseList.DBCode]); string DBConnection = Encrypt.DESDecrypt(ConvertLib.ToString(dr[sys_DataBaseList.DBConnection]), Globals.KeyConnectionStr); string DBProviderName = ConvertLib.ToString(dr[sys_DataBaseList.DBProviderName]); dic.Add(DBCode, new DabaBaseModel() { ConnnectionString = DBConnection, ProviderName = DBProviderName }); } }
/// <summary> /// /// </summary> /// <param name="edit"></param> /// <param name="EmpErrorText">空值时提醒</param> /// <param name="EIA">ErrorIcon显示位置</param> /// <returns>不为空返回Ture,空返回false</returns> public static bool VerificationNotEmpEditValue(BaseEdit edit, string EmpErrorText, ErrorIconAlignment EIA = ErrorIconAlignment.MiddleRight) { if (edit.Visible == false) { return(true); } if (String.IsNullOrEmpty(ConvertLib.ToString(edit.EditValue))) { if (EmpErrorText != "") { edit.ErrorText = EmpErrorText; edit.ErrorIconAlignment = EIA; } return(false); } return(true); }
public static DialogResult ShowForm(ref string DBName) { frmDialogChangeDBText frm = new frmDialogChangeDBText(); frm.ShowIcon = frm.ShowInTaskbar = false; frm.StartPosition = FormStartPosition.CenterScreen; frm.txt_DBName.EditValue = DBName; var v = frm.ShowDialog(); if (v == DialogResult.OK) { DBName = ConvertLib.ToString(frm.txt_DBName.EditValue); } return(v); }