Beispiel #1
0
        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();
            }
        }
Beispiel #2
0
        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();
            }
        }
Beispiel #3
0
 public frmCityEntry()
 {
     InitializeComponent();
     m_oCity    = new Vendor.BusinessLayer.CityBL();
     m_oCountry = new Vendor.BusinessLayer.CountryBL();
     m_oState   = new Vendor.BusinessLayer.StateBL();
 }
Beispiel #4
0
 public frmStateMaster()
 {
     InitializeComponent();
     m_oState = new Vendor.BusinessLayer.StateBL();
 }
Beispiel #5
0
 public void UpdateState(Vendor.BusinessLayer.StateBL argState)
 {
     m_oState.UpdateState(argState);
 }
Beispiel #6
0
 public void InsertState(Vendor.BusinessLayer.StateBL argState)
 {
     m_oState.InsertState(argState);
 }