Esempio n. 1
0
        public int InsertVendorMaster(Vendor.BusinessLayer.VendorBL argVendor)
        {
            SqlConnection conn;

            conn = new SqlConnection();
            conn = BsfGlobal.OpenVendorAnalDB();
            SqlTransaction tran = conn.BeginTransaction();
            int            iCId = 0;

            try
            {
                SqlCommand Command = new SqlCommand("Insert_VendorMaster", conn, tran);
                Command.CommandType = CommandType.StoredProcedure;
                Command.Parameters.Clear();
                Command.Parameters.AddWithValue("@VendorId", argVendor.VendorId);
                Command.Parameters["@VendorId"].Direction = ParameterDirection.Output;
                Command.Parameters.AddWithValue("@VendorName", argVendor.VendorName);
                Command.Parameters.AddWithValue("@Supply", argVendor.Supply);
                Command.Parameters.AddWithValue("@Contract", argVendor.Contract);
                Command.Parameters.AddWithValue("@Service", argVendor.Service);
                Command.Parameters.AddWithValue("@Address", argVendor.RegAddress);
                Command.Parameters.AddWithValue("@CityId", argVendor.CityId);
                Command.Parameters.AddWithValue("@Pin", argVendor.PinNo);
                Command.Parameters.AddWithValue("@STypeId", argVendor.STypeId);
                Command.Parameters.AddWithValue("@Company", argVendor.iCompany);
                Command.Parameters.AddWithValue("@SuppTypeId", argVendor.SuppTypeId);
                Command.Parameters.AddWithValue("@ChequeNo", argVendor.ChequeNo);
                Command.Parameters.AddWithValue("@Code", argVendor.Code);
                Command.ExecuteNonQuery();
                iCId = (int)Command.Parameters["@VendorId"].Value;
                tran.Commit();
                if (BsfGlobal.g_bVendorDB == true)
                {
                    BsfGlobal.RefreshSubLedger(1);
                }
            }
            catch
            {
                tran.Rollback();
            }
            finally
            {
                conn.Close();
            }
            return(iCId);
        }
Esempio n. 2
0
 public frmVendorFilter()
 {
     InitializeComponent();
     m_oVendor = new Vendor.BusinessLayer.VendorBL();
 }
Esempio n. 3
0
 public void UpdateVendorMaster(Vendor.BusinessLayer.VendorBL argVendor)
 {
     m_oVendor.UpdateVendorMaster(argVendor);
 }
Esempio n. 4
0
 public int InsertVendorMaster(Vendor.BusinessLayer.VendorBL argVendor)
 {
     return(m_oVendor.InsertVendorMaster(argVendor));
 }