public static DataTable TimTheoLoai(int mode, string maLoai, string MaNH, ref int sl) { Provider provider = new Provider(); string store = "sp_TimTheoLoai"; if (mode == 3) { store = "sp_TimTheoLoai_Fix"; } SqlCommand cm = provider.CreateCommandStoreName(store); cm.Parameters.Add("@maLoai", SqlDbType.VarChar, 5); cm.Parameters.Add("@maNH", SqlDbType.VarChar, 5); cm.Parameters.Add("@dem", SqlDbType.Int); cm.Parameters["@maLoai"].Value = maLoai; cm.Parameters["@maNH"].Value = MaNH; cm.Parameters["@dem"].Direction = ParameterDirection.Output; string name = "@dem"; return(provider.ExecSelectCommand_Output(cm, name, ref sl)); }
public static DataTable TimTheoLoai(int mode,string maLoai, string MaNH,ref int sl) { Provider provider = new Provider(); string store="sp_TimTheoLoai"; if(mode==3) store = "sp_TimTheoLoai_Fix"; SqlCommand cm = provider.CreateCommandStoreName(store); cm.Parameters.Add("@maLoai", SqlDbType.VarChar, 5); cm.Parameters.Add("@maNH", SqlDbType.VarChar, 5); cm.Parameters.Add("@dem", SqlDbType.Int); cm.Parameters["@maLoai"].Value = maLoai; cm.Parameters["@maNH"].Value = MaNH; cm.Parameters["@dem"].Direction = ParameterDirection.Output; string name="@dem"; return provider.ExecSelectCommand_Output(cm, name,ref sl); }