Esempio n. 1
0
 public ENDistributorsOrder()
 {
     id     = 0;
     cad    = new CADDistributorsOrder();
     line   = new ENLineDistributorsOrder();
     status = 'P';
     total  = 0;
     lines  = new List <ENLineDistributorsOrder>();
 }
Esempio n. 2
0
 public ENDistributorsOrder()
 {
     id = 0;
     cad = new CADDistributorsOrder();
     line = new ENLineDistributorsOrder();
     status = 'P';
     total = 0;
     lines = new List<ENLineDistributorsOrder>();
 }
Esempio n. 3
0
        public ENLineDistributorsOrder Read(int id)
        {
            try
            {
                ENLineDistributorsOrder ret = new ENLineDistributorsOrder();

                List <object> param = new List <object>();
                param.Add((object)id);

                ret.FromRow(cad.Select(param));

                return(ret);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 4
0
        public List <ENLineDistributorsOrder> Filter(string where)
        {
            List <ENLineDistributorsOrder> ret = new List <ENLineDistributorsOrder>();
            DataTable table = cad.SelectWhere(where);

            try
            {
                foreach (DataRow row in table.Rows)
                {
                    ENLineDistributorsOrder course = new ENLineDistributorsOrder();
                    course.FromRow(row);
                    ret.Add(course);
                }
                return(ret);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 5
0
        public void AddLine(ENNewBook book, int quantity)
        {
            ENLineDistributorsOrder line = new ENLineDistributorsOrder(0, this.id, book, quantity);

            lines.Add(line);
        }
Esempio n. 6
0
 public void AddLine(ENNewBook book, int quantity)
 {
     ENLineDistributorsOrder line = new ENLineDistributorsOrder(0, this.id, book, quantity);
     lines.Add(line);
 }
Esempio n. 7
0
        public List<ENLineDistributorsOrder> ReadAll()
        {
            List<ENLineDistributorsOrder> ret = new List<ENLineDistributorsOrder>();
            DataTable table = cad.SelectAll();

            try
            {

                foreach (DataRow row in table.Rows)
                {
                    ENLineDistributorsOrder course = new ENLineDistributorsOrder();
                    course.FromRow(row);
                    ret.Add(course);

                }
                return ret;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 8
0
        public ENLineDistributorsOrder Read(int id)
        {
            try
            {
                ENLineDistributorsOrder ret = new ENLineDistributorsOrder();

                List<object> param = new List<object>();
                param.Add((object)id);

                ret.FromRow(cad.Select(param));

                return ret;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Esempio n. 9
0
 public JsonResult DLinesUpdate(ENLineDistributorsOrder line)
 {
     try
     {
         line.Save();
         return Json(new { Result = "OK" });
     }
     catch (Exception ex)
     {
         return Json(new { Result = "ERROR", Message = ex.Message });
     }
 }