本文整理汇总了C#中DevExpress.GetItemValue方法的典型用法代码示例。如果您正苦于以下问题:C# DevExpress.GetItemValue方法的具体用法?C# DevExpress.GetItemValue怎么用?C# DevExpress.GetItemValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DevExpress
的用法示例。
在下文中一共展示了DevExpress.GetItemValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckCheckListBox
public static void CheckCheckListBox(DevExpress.XtraEditors.CheckedListBoxControl checkListBox, string tableName, string fieldName, string whereStr)
{
int i = 0;
while (i < checkListBox.ItemCount)
{
checkListBox.SetItemCheckState(i, ((Services.Database.SelectFieldValue(tableName, fieldName, whereStr + checkListBox.GetItemValue(i).ToString() + "'") != null) ? CheckState.Checked : CheckState.Unchecked));
i = i + 1;
}
}
示例2: SetCheckedListValue
private void SetCheckedListValue(DevExpress.XtraEditors.CheckedListBoxControl control,string strSQL,string target)
{
//Clear Item List
control.Refresh();
for (int i=0;i<control.Items.Count;i++)
control.SetItemChecked(i,false);
DataSet _ds = new DataSet();
SqlHelper.FillDataset(connection,CommandType.StoredProcedure,"UP_GETDATA",_ds,new string[] {"table"}, new SqlParameter("@strSQL", strSQL) );
DataView dv;
dv = _ds.Tables["table"].DefaultView;
//set check value
try
{
for (int i=0; i< dv.Count; i++ )
{
for (int j=0; j<control.ItemCount; j++)
{
if (dv[i].Row[target].ToString()== control.GetItemValue(j).ToString())
{
control.SetItemChecked(j,true);
break;
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
示例3: SaveCheckListBox
public static void SaveCheckListBox(DevExpress.XtraEditors.CheckedListBoxControl CheckListBox, string Tablename, string LinkFieldvalue, string LinkFieldName, string FieldName, string KeyFieldName, string SeqName, SecurityService.UserInfo userInfo, ref List<string> SqlList)
{
try
{
if (LinkFieldvalue != null)
{
SqlList.Add("Delete " + Tablename + " Where " + LinkFieldName + " = '" + LinkFieldvalue + "'");
int i = 0;
while (i < CheckListBox.ItemCount)
{
if (CheckListBox.GetItemCheckState(i) == CheckState.Checked)
{
string ID = "";
string[] fields = { LinkFieldName, FieldName, LinkFieldvalue, CheckListBox.GetItemValue(i).ToString() };
SqlList.Add(Services.Database.SaveTableData(Tablename, KeyFieldName, ref ID, SeqName, userInfo.LoginUserName, fields));
}
i = i + 1;
}
}
}
catch (Exception Err)
{
MessageBox.Show("Дараахи алдаа гарлаа : " + Err.Message.ToString(), "Алдаа", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}