public static SPBaseModel SPBase() { var db = new SPBaseModel(ConnectionString); db.Database.CommandTimeout = 180; return(db); }
private void button1_Click(object sender, EventArgs e) { listBox1.Items.Add("sdsdsdsd"); using (var db = new SPBaseModel("SPBaseModel")) { var ddd = db.Banks.ToList(); } }
private void WbGridView_FocusedRowObjectChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowObjectChangedEventArgs e) { var focused_row = e.Row as WBListMake_Result; TechProcDetBS.DataSource = null; using (SPBaseModel _db = Database.SPBase()) { TechProcDetBS.DataSource = _db.v_TechProcDet.Where(w => w.WbillId == focused_row.WbillId).OrderBy(o => o.Num).ToList(); } }
private void Form1_Load(object sender, EventArgs e) { var satrt_date = DateTime.Now.AddDays(-1000); var end_date = DateTime.Now.AddYears(100); int top_row = WbGridView.TopRowIndex; using (SPBaseModel _db = Database.SPBase()) { WBListMakeBS.DataSource = _db.WBListMake(satrt_date, end_date, 2, "*", 0, -20).ToList(); //WBGridControl.DataSource = _db.WBListMake(satrt_date, end_date, -1, "*", 0, -20).ToList(); } WbGridView.TopRowIndex = top_row; }
public BaseReport() { _db = Database.SPBase(); }