Esempio n. 1
0
        public int execute(DataLoad data)
        {
            int  status = 0;
            Logs log    = new Logs();

            try
            {
                QueryLocal local = new QueryLocal();
                if (!Is_Exist_Server(data))
                {
                    string id = NewProduct(data);
                    local.Insert_Posting(data.CateProdId, Int32.Parse(id));
                    status = 1;
                }
                else
                {
                    status = 2;
                }
                var db = DBConnection.Instance();
                db.Close();
                return(status);
            }
            catch (Exception ex)
            {
                log.IErrors("Logic - Execute: " + ex.Message);
                return(status);
            }
        }
Esempio n. 2
0
        public void Excute()
        {
            QueryLocal action  = new QueryLocal();
            var        results = action.GetProduct();

            foreach (var i in results)
            {
                Logic call = new Logic();
                call.execute(i);
            }
        }