internal Wxkf Getwxkfbyygid(int ygid) { string sql = "select * from wxkf where yg_id=" + ygid; var cmd = sqlHelper.PrepareTextSqlCommand(sql); using (var reader = cmd.ExecuteReader()) { Wxkf m = null; if (reader.Read()) { m = new Wxkf { Id = reader.GetValue <int>("id"), Kf_id = reader.GetValue <int>("kf_id"), Kf_nick = reader.GetValue <string>("kf_nick"), Kf_account = reader.GetValue <string>("kf_account"), Yg_id = reader.GetValue <int>("yg_id"), Yg_name = reader.GetValue <string>("yg_name"), Ms_id = reader.GetValue <int>("ms_id"), Ms_name = reader.GetValue <string>("ms_name"), Comid = reader.GetValue <int>("comid"), Isonline = reader.GetValue <int>("isonline"), Isbinded = reader.GetValue <int>("isbinded"), Iszongkf = reader.GetValue <int>("iszongkf"), Isrun = reader.GetValue <int>("isrun"), Kf_status = reader.GetValue <int>("kf_status"), Auto_accept = reader.GetValue <int>("auto_accept"), Accepted_case = reader.GetValue <int>("accepted_case") }; } return(m); } }
internal int BindWxdkf(Wxkf m) { string sql = "update wxkf set iszongkf=" + m.Iszongkf + ",isbinded=" + m.Isbinded + ", yg_id=" + m.Yg_id + ",yg_name='" + m.Yg_name + "',ms_id=" + m.Ms_id + ",ms_name='" + m.Ms_name + "',isrun=" + m.Isrun + ",createtime='" + m.Createtime + "',createuserid=" + m.Createuserid + " where comid=" + m.Comid + " and kf_id=" + m.Kf_id; var cmd = sqlHelper.PrepareTextSqlCommand(sql); return(cmd.ExecuteNonQuery()); }
internal Wxkf GetChannel_Wxkf(int channelid, int comid, string isonline, string isrun) { string sql = "select * from Wxkf where comid =" + comid + " and isonline in (" + isonline + ") and isrun in (" + isrun + ") and yg_id in (select id from b2b_company_manageuser where com_id=" + comid + " and tel in " + " (select mobile from Member_Channel where id=" + channelid + " and com_id=" + comid + "))"; var cmd = sqlHelper.PrepareTextSqlCommand(sql); using (var reader = cmd.ExecuteReader()) { Wxkf m = null; if (reader.Read()) { m = new Wxkf { Id = reader.GetValue <int>("id"), Kf_id = reader.GetValue <int>("kf_id"), Kf_nick = reader.GetValue <string>("kf_nick"), Kf_account = reader.GetValue <string>("kf_account"), Yg_id = reader.GetValue <int>("yg_id"), Yg_name = reader.GetValue <string>("yg_name"), Ms_id = reader.GetValue <int>("ms_id"), Ms_name = reader.GetValue <string>("ms_name"), Comid = reader.GetValue <int>("comid"), Isonline = reader.GetValue <int>("isonline"), Isbinded = reader.GetValue <int>("isbinded"), Iszongkf = reader.GetValue <int>("iszongkf"), Isrun = reader.GetValue <int>("isrun"), Kf_status = reader.GetValue <int>("kf_status"), Auto_accept = reader.GetValue <int>("auto_accept"), Accepted_case = reader.GetValue <int>("accepted_case") }; } return(m); } }
internal Wxkf Getwxkf(int kfid, int comid) { string sql = "SELECT * FROM [EtownDB].[dbo].[Wxkf] where kf_id=" + kfid + " and comid=" + comid; var cmd = sqlHelper.PrepareTextSqlCommand(sql); using (var reader = cmd.ExecuteReader()) { Wxkf m = null; if (reader.Read()) { m = new Wxkf() { Id = reader.GetValue <int>("id"), Kf_id = reader.GetValue <int>("kf_id"), Kf_nick = reader.GetValue <string>("kf_nick"), Kf_account = reader.GetValue <string>("kf_account"), Yg_id = reader.GetValue <int>("yg_id"), Yg_name = reader.GetValue <string>("yg_name"), Ms_id = reader.GetValue <int>("ms_id"), Ms_name = reader.GetValue <string>("ms_name"), Comid = reader.GetValue <int>("comid"), Isonline = reader.GetValue <int>("isonline"), Isbinded = reader.GetValue <int>("isbinded"), Iszongkf = reader.GetValue <int>("iszongkf"), Isrun = reader.GetValue <int>("isrun"), Kf_status = reader.GetValue <int>("kf_status"), Auto_accept = reader.GetValue <int>("auto_accept"), Accepted_case = reader.GetValue <int>("accepted_case") }; } return(m); } }
public int BindWxdkf(Wxkf m) { using (var helper = new SqlHelper()) { int d = new InternalWxkf(helper).BindWxdkf(m); return(d); } }