internal B2b_order_bespeak Geteffectivebespeak(string pno) { string sql = "select top 1 * from b2b_order_bespeak where pno='" + pno + "' and beaspeakstate in (0,1)"; var cmd = sqlHelper.PrepareTextSqlCommand(sql); using (var reader = cmd.ExecuteReader()) { B2b_order_bespeak m = null; if (reader.Read()) { m = new B2b_order_bespeak() { Id = reader.GetValue <int>("id"), Bespeakdate = reader.GetValue <DateTime>("Bespeakdate"), beaspeakstate = reader.GetValue <int>("beaspeakstate"), Comid = reader.GetValue <int>("Comid"), Idcard = reader.GetValue <string>("Idcard"), Bespeakname = reader.GetValue <string>("Bespeakname"), beaspeaktype = reader.GetValue <int>("beaspeaktype"), Bespeaknum = reader.GetValue <int>("Beaspeaknum"), Orderid = reader.GetValue <int>("Orderid"), Phone = reader.GetValue <string>("Phone"), Pno = reader.GetValue <string>("Pno"), Proid = reader.GetValue <int>("Proid"), Proname = reader.GetValue <string>("Proname"), remark = reader.GetValue <string>("remark"), Remark = reader.GetValue <string>("Remark"), subtime = reader.GetValue <DateTime>("subtime"), }; } return(m); } }
public int Subbespeak(B2b_order_bespeak m) { using (var helper = new SqlHelper()) { return(new Internalb2b_order_bespeak(helper).Subbespeak(m)); } }