Ejemplo n.º 1
0
 public TaskWayBillM(int id, int id_wb, int id_obj, int id_type, int id_mt, ETypeTask type)
 {
     _id      = id;
     _id_obj  = id_obj;
     _id_type = id_type;
     _id_wb   = id_wb;
     _id_mt   = id_mt;
     _type    = type;
 }
Ejemplo n.º 2
0
 public TaskM(int id, int id_car, DateTime begin_date, DateTime end_date, int id_obj, int id_type, int id_mt, ETypeTask type)
 {
     _id         = id;
     _id_obj     = id_obj;
     _id_type    = id_type;
     _id_car     = id_car;
     _begin_date = begin_date;
     _end_date   = end_date;
     _id_mt      = id_mt;
     _type       = type;
 }
Ejemplo n.º 3
0
        public RoutesVM(int id_org, ETypeTask task_type)
        {
            _id_org    = id_org;
            _type_task = task_type;

            LoadOdhs();
            LoadZones();
            AddHandler();
            AddZoneSelectedHandler();
            OdhsFind("");
            FindZone("");
            LoadRoutes();
        }
Ejemplo n.º 4
0
 public TaskInTableM(int id, int id_car, string car_nomer, DateTime begin_date, DateTime end_date,
                     int id_obj, string obj_name, int id_type, string type_name, int id_mt, ETypeTask type, EStatusTask status,
                     string fio, DateTime create_date, int garNumber) : base(id, id_car, begin_date, end_date, id_obj, id_type, id_mt, type)
 {
     _car_nomer   = car_nomer;
     _obj_name    = obj_name;
     _type_name   = type_name;
     _status      = status;
     _fio         = fio;
     _create_date = create_date;
     _garNumber   = garNumber;
 }
Ejemplo n.º 5
0
        private void GetParams()
        {
            using (var sqlCmd = App.SqlWork())
            {
                sqlCmd.sql = "SELECT autobase.get_automap_task_orgs_ids();";
                MainPluginClass.OrgsIds = sqlCmd.ExecuteScalar <string[]>();
                if (OrgsIds == null)
                {
                    MainPluginClass.OrgsIds = new string[] { };
                }
            }
            using (var sqlCmd = App.SqlWork())
            {
                sqlCmd.sql = "SELECT name, values FROM autobase.params;";
                sqlCmd.ExecuteReader();
                while (sqlCmd.CanRead())
                {
                    if (sqlCmd.GetValue <string>("name") == "automap_url")
                    {
                        try
                        {
                            MTAPI_Helper.mt_url = sqlCmd.GetValue <string[]>("values")[0];
                        }
                        catch
                        {
                        }
                    }
                    if (sqlCmd.GetValue <string>("name") == "automap_route_name")
                    {
                        try
                        {
                            MainPluginClass.RouteTabName = sqlCmd.GetValue <string[]>("values")[0];
                        }
                        catch
                        {
                        }
                    }
                    if (sqlCmd.GetValue <string>("name") == "automap_zone_name")
                    {
                        try
                        {
                            MainPluginClass.ZoneTabName = sqlCmd.GetValue <string[]>("values")[0];
                        }
                        catch
                        {
                        }
                    }
                    if (sqlCmd.GetValue <string>("name") == "automap_task_type")
                    {
                        try
                        {
                            string type = sqlCmd.GetValue <string[]>("values")[0];
                            switch (type)
                            {
                            case "all":
                                MainPluginClass._type_task = ETypeTask.all;
                                break;

                            case "route":
                                MainPluginClass._type_task = ETypeTask.route;
                                break;

                            case "zone":
                                MainPluginClass._type_task = ETypeTask.zone;
                                break;

                            default:
                                MainPluginClass._type_task = ETypeTask.all;
                                break;
                            }
                        }
                        catch
                        {
                        }
                    }
                    if (sqlCmd.GetValue <string>("name") == "automap_sync_waybills")
                    {
                        try
                        {
                            MainPluginClass.SyncOrgAutomapIds = sqlCmd.GetValue <string[]>("values");
                        }
                        catch
                        {
                        }
                    }
                }
            }
        }