本文整理汇总了C#中DB.SelectTableView方法的典型用法代码示例。如果您正苦于以下问题:C# DB.SelectTableView方法的具体用法?C# DB.SelectTableView怎么用?C# DB.SelectTableView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB
的用法示例。
在下文中一共展示了DB.SelectTableView方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Fill_Products_LB
private void Fill_Products_LB()
{
try
{
DB db = new DB();
db.AddCondition("pro_name", Product_TB.Text, false, " like ");
db.AddCondition("pro_cat_id", Categories_CB.SelectedValue, Categories_CB.SelectedIndex < 1);
Products_DG.ItemsSource = db.SelectTableView( @"select products.*,cat_name from products join categories on pro_cat_id= cat_id");
}
catch
{
}
}
示例2: Fill_DG
private void Fill_DG()
{
DB db = new DB();
try
{
db.AddCondition("att_date", Date_DTP.Value.Value.Date);
Attendence_DG.ItemsSource = db.SelectTableView(@"SELECT att_id,time_format(att_attend,'%h:%i %p') att_attend,time_format(att_leave,'%h:%i %p') att_leave,per_name
FROM attendence
JOIN employees ON att_emp_id=emp_id
JOIN person ON per_id=emp_per_id");
}
catch
{
}
}
示例3: Fill_Products_LB
private void Fill_Products_LB()
{
try
{
int i = 2;
string query = @"select products.*,cat_name, 0 pro_amount,0 pro_status from products
join categories on pro_cat_id= cat_id
join products_properties p1 on psp_pro_id=pro_id";
DB db2 = new DB();
db2.AddCondition("pro_name", Product_TB.Text, false, " like ");
db2.AddCondition("pro_Serial", Serial_TB.Text, false, " like ");
db2.AddCondition("pro_cat_id", Categories_CB.SelectedValue, Categories_CB.SelectedIndex < 1);
foreach(ComboBox cb in Properties_WP.Children.OfType<ComboBox>().Where(c => c is ComboBox && c.SelectedIndex > 0))
{
db2.AddCondition("p" + i + ".psp_value", cb.SelectedValue, cb.SelectedIndex < 1, "=", "psp_value_" + i);
db2.AddCondition("p" + i + ".psp_prp_id", cb.Name.Split('_')[1], cb.SelectedIndex < 1, "=", "psp_prp_id" + i);
query += " join products_properties p" + i + " on p1.psp_pro_id = p" + i + ".psp_pro_id ";
i++;
}
Stock_DG.ItemsSource = db2.SelectTableView(query + "group by pro_id");
Get_Stock();
}
catch
{
}
}
示例4: Fill_Transaction_DG
private void Fill_Transaction_DG()
{
try
{
DB db = new DB();
db.AddCondition("trs_date", From_DTP.Value.Value.Date, false, ">=", "SD");
db.AddCondition("trs_date", To_DTP.Value.Value.Date, false, "<=", "ED");
db.AddCondition("trs_trn_id", Account_CB.SelectedValue);
Transaction_DG.ItemsSource = db.SelectTableView(@"select trs_no,trs_date,trd_serial,pro_name,trd_amount from transactions
join transactions_details on trd_trs_id = trs_id
join products on trd_pro_id = pro_id where" + Get_Products().Remove(0,3));
}
catch
{
}
}