public void UpdateCity(Vendor.BusinessLayer.CityBL argCity) { SqlConnection conn; conn = new SqlConnection(); conn = BsfGlobal.OpenWorkFlowDB(); SqlTransaction tran = conn.BeginTransaction(); try { string sSql = "Update CityMaster set CityName= '" + argCity.CityName + "',StateId= " + argCity.StateId + "," + "CountryId=" + argCity.CountryId + " Where CityID = " + argCity.CityId; SqlCommand Command = new SqlCommand(sSql, conn, tran); Command.ExecuteNonQuery(); tran.Commit(); } catch { tran.Rollback(); } finally { conn.Close(); } }
public void InsertCity(Vendor.BusinessLayer.CityBL argCity) { SqlConnection conn; conn = new SqlConnection(); conn = BsfGlobal.OpenWorkFlowDB(); SqlTransaction tran = conn.BeginTransaction(); try { string sSql = "Insert into CityMaster(CityName,StateId,CountryID) " + "Values('" + argCity.CityName + "'," + argCity.StateId + "," + argCity.CountryId + ")"; SqlCommand Command = new SqlCommand(sSql, conn, tran); Command.ExecuteNonQuery(); tran.Commit(); } catch { tran.Rollback(); } finally { conn.Close(); } }
public frmCityEntry() { InitializeComponent(); m_oCity = new Vendor.BusinessLayer.CityBL(); m_oCountry = new Vendor.BusinessLayer.CountryBL(); m_oState = new Vendor.BusinessLayer.StateBL(); }
public frmCityMaster() { InitializeComponent(); m_oCity = new Vendor.BusinessLayer.CityBL(); }
public void InsertCity(Vendor.BusinessLayer.CityBL argCity) { m_oCity.InsertCity(argCity); }
public void UpdateCity(Vendor.BusinessLayer.CityBL argCity) { m_oCity.UpdateCity(argCity); }