public int UpdateKho(Info.KhoInfo info) { try { cn.ExecuteNonQuery("sp_UpdateKHO", new string[] { "@MAKHO", "@TEN", "@DIACHI", "@DIENTHOAI", "@NGAYLAP", "@TINHTRANG", "@SODK" }, new object[] { info.Makho, info.Ten, info.Diachi, info.Dienthoai, info.Ngaylap, info.Tinhtrang, info.Sodk }); return(1); } catch (Exception ex) { //ghi log throw ex; // return id; } }
public int InsertKho(Info.KhoInfo info) { int id = 0; try { id = cn.ExecuteInsert("sp_InsertKHO", new string[] { "@TEN", "@DIACHI", "@DIENTHOAI", "@NGAYLAP", "@TINHTRANG", "@SODK" }, new object[] { info.Ten, info.Diachi, info.Dienthoai, info.Ngaylap, info.Tinhtrang, info.Sodk }); return(id); } catch (Exception ex) { //ghi log throw ex; // return id; } }