Ejemplo n.º 1
0
        private bool upDateVIDCommandInfo(string eq_id, string carrier_id, string cmd_id, string source_port, string dest_port, int priority, int replace)
        {
            bool isSuccess = true;

            //using (DBConnection_EF con = new DBConnection_EF())
            using (DBConnection_EF con = DBConnection_EF.GetContext())
            {
                AVIDINFO vid_info = vidIvfoDAO.getByID(con, eq_id);
                if (vid_info != null)
                {
                    vid_info.MCS_CARRIER_ID = carrier_id;
                    vid_info.CARRIER_ID     = carrier_id;
                    vid_info.COMMAND_ID     = cmd_id;
                    vid_info.SOURCEPORT     = source_port;
                    vid_info.DESTPORT       = dest_port;
                    vid_info.PRIORITY       = priority;
                    vid_info.REPLACE        = replace;
                    //vid_info.CARRIER_LOC = dest_port;
                    vid_info.CARRIER_LOC = source_port; //A0.01
                    vidIvfoDAO.update(con);
                }
                else
                {
                    isSuccess = false;
                    //TODO Exception log
                }
            }
            return(isSuccess);
        }
Ejemplo n.º 2
0
        public bool upDateVIDCarrierID(string vhID, string carrierID)
        {
            bool isSuccess = true;

            using (DBConnection_EF con = DBConnection_EF.GetUContext())
            {
                AVIDINFO vid_info = vidIvfoDAO.getByID(con, vhID);
                if (vid_info != null)
                {
                    vid_info.CARRIER_ID = carrierID;
                    vidIvfoDAO.update(con);
                }
                else
                {
                    //TODO Exception log
                }
            }
            return(isSuccess);
        }