Esempio n. 1
0
        public static int InsertReciept(ReceiptHed entity)
        {
            try
            {
                XMLTool xmlcreate = new XMLTool();
                string  xmlString = xmlcreate.Serialize(entity);

                _connectionName = ConfigurationManager.ConnectionStrings["ConnFSMS"].ConnectionString;
                using (IDbConnection db = new SqlConnection(_connectionName))
                {
                    var resfult = db.QuerySingle <int>("SP_SaveReciept", new { XMLDetails = xmlString }, commandType: CommandType.StoredProcedure);
                    return(1);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 2
0
        public static int InsertSalesPrint(DifferentLog entity)
        {
            try
            {
                XMLTool xmlcreate = new XMLTool();
                string  xmlString = xmlcreate.Serialize(entity);

                _connectionName = ConfigurationManager.ConnectionStrings["ConnFSMS"].ConnectionString;
                using (IDbConnection db = new SqlConnection(_connectionName))
                {
                    var resfult = db.QuerySingle <DifferentLog>("SP_UpdateSalesEntries", new { XMLDetails = xmlString }, commandType: CommandType.StoredProcedure);
                    return(1);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }