public void UpdateState(Vendor.BusinessLayer.StateBL argState) { SqlConnection conn; conn = new SqlConnection(); conn = BsfGlobal.OpenWorkFlowDB(); SqlTransaction tran = conn.BeginTransaction(); try { string sSql = "Update StateMaster Set StateName='" + argState.StateName + "',CountryId= " + argState.CountryId + " " + "Where StateID = " + argState.StateId; SqlCommand Command = new SqlCommand(sSql, conn, tran); Command.ExecuteNonQuery(); tran.Commit(); } catch { tran.Rollback(); } finally { conn.Close(); } }
public void InsertState(Vendor.BusinessLayer.StateBL argState) { SqlConnection conn; conn = new SqlConnection(); conn = BsfGlobal.OpenWorkFlowDB(); SqlTransaction tran = conn.BeginTransaction(); try { string sSql = "Insert into dbo.StateMaster(StateName,CountryID) " + "Values('" + argState.StateName + "'," + argState.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 frmStateMaster() { InitializeComponent(); m_oState = new Vendor.BusinessLayer.StateBL(); }
public void UpdateState(Vendor.BusinessLayer.StateBL argState) { m_oState.UpdateState(argState); }
public void InsertState(Vendor.BusinessLayer.StateBL argState) { m_oState.InsertState(argState); }