Ejemplo n.º 1
0
        public bool ThemDuLieu(DungSaiNCC dungSaiNCC)
        {
            string[] names  = new string[] { "@id", "@mancc", "@nhomvt", "@subquery" };
            object[] values = new object[] { dungSaiNCC.ID, dungSaiNCC.MaNCC, dungSaiNCC.NhomVT, dungSaiNCC.SubQuery };
            string   query  = "INSERT INTO DungSaiNCC(ID, MaNCC, NhomVT, SubQuery) VALUES(@id, @mancc, @nhomvt, @subquery)";

            return(_sQLiteProvider.ExecuteNonQuery(query, names, values));
        }
        public int InsertDungSai(string maNCC, string nhomVT, string subQuery)
        {
            DungSaiNCC dungSaiNCC = new DungSaiNCC();

            dungSaiNCC.MaNCC    = maNCC;
            dungSaiNCC.NhomVT   = nhomVT;
            dungSaiNCC.SubQuery = subQuery;
            return(_dungSaiNCCDAL.InsertDungSai(dungSaiNCC));
        }
Ejemplo n.º 3
0
 public int InsertDungSai(DungSaiNCC dungSaiNCC)
 {
     string[] names     = new string[] { "@mancc", "@nhomvt", "@subquery" };
     object[] values    = new object[] { dungSaiNCC.MaNCC, dungSaiNCC.NhomVT, dungSaiNCC.SubQuery };
     string[] namesOut  = new string[] { "@id" };
     object[] valuesOut = new object[] { SqlDbType.Int };
     _provider.ExecuteNonQuery("Proc_InsertDungSai", names, values, namesOut, ref valuesOut);
     return(!string.IsNullOrEmpty(valuesOut[0].ToString()) ? (int)valuesOut[0] : 0);
 }
        public bool UpdateDungSai(int id, string maNCC, string nhomVT, string subQuery)
        {
            DungSaiNCC dungSaiNCC = new DungSaiNCC();

            dungSaiNCC.ID       = id;
            dungSaiNCC.MaNCC    = maNCC;
            dungSaiNCC.NhomVT   = nhomVT;
            dungSaiNCC.SubQuery = subQuery;
            return(_dungSaiNCCDAL.UpdateDungSai(dungSaiNCC));
        }
Ejemplo n.º 5
0
 public bool UpdateDungSai(DungSaiNCC dungSaiNCC)
 {
     string[] names  = new string[] { "@id", "@mancc", "@nhomvt", "@subquery" };
     object[] values = new object[] { dungSaiNCC.ID, dungSaiNCC.MaNCC, dungSaiNCC.NhomVT, dungSaiNCC.SubQuery };
     return(_provider.ExecuteNonQuery("Proc_UpdateDungSai", names, values));
 }