public bool Insert(DTO_DanhMucPhong DMP) { SqlCommand sqlCommand = new SqlCommand("insert into PHONG values ('" + DMP.MaPNG + "','" + DMP.Loai_PNG + "', '" + QLKS.Container.FormatMoney(DMP.Don_Gia).ToString() + "',N'" + DMP.Ghi_Chu + "' , '" + DMP.Tinh_Trang + "' )", sqlConnection); sqlCommand.ExecuteNonQuery(); return(true); }
public bool Update(DTO_DanhMucPhong DMP) { SqlCommand sqlCommand = new SqlCommand("update PHONG set LOAI_PNG='" + DMP.Loai_PNG + "', DON_GIA='" + QLKS.Container.FormatMoney(DMP.Don_Gia).ToString() + "', GHI_CHU=N'" + DMP.Ghi_Chu + "' where MAPNG='" + DMP.MaPNG + "'", sqlConnection); sqlCommand.ExecuteNonQuery(); return(true); }
public GUI_DanhMucPhong() { InitializeComponent(); DanhMucPhong_BUS = new BUS_DanhMucPhong(); DanhMucPhong_DTO = new DTO_DanhMucPhong(); LoadData(); LoadCheckBox(); rbtnA.Checked = true; rbtnA_CheckedChanged(this, new EventArgs()); }
public bool Update(DTO_DanhMucPhong cs) { return(DMP.Update(cs)); }
public bool Insert(DTO_DanhMucPhong cs) { return(DMP.Insert(cs)); }