Exemplo n.º 1
0
        /// <summary>
        /// 同步枪支信息
        /// </summary>
        /// <param name="unit_id"></param>
        /// <param name="gunark_id"></param>
        public static void syn_Gun_Info(string unit_id, string gunark_id)
        {
            BLL.gun_info           gun_info_bll  = new Gunark.BLL.gun_info();
            WebService.gunServices webService    = SingleWebService.getWebService();
            WebService.gunInfo[]   gun_info_list = webService.getGunInfo(unit_id, gunark_id);

            for (int i = 0; i < gun_info_list.Length; i++)
            {
                if (!gun_info_bll.Exists(gun_info_list[i].gun_Info_Id))
                {
                    Model.gun_info gun_info = new Gunark.Model.gun_info();
                    gun_info.GUN_INFO_ID         = gun_info_list[i].gun_Info_Id;
                    gun_info.GUNARK_ID           = gun_info_list[i].gunArk.gunarkId;
                    gun_info.UNIT_ID             = gun_info_list[i].unitInfo.unitInfoCode;
                    gun_info.GUN_NUMBER          = gun_info_list[i].gun_Bullet_Number;
                    gun_info.GUN_TYPE            = gun_info_list[i].gun_Bullet_Name;
                    gun_info.GUN_STATUS          = gun_info_list[i].gun_Bullet_Status.ToString();
                    gun_info.GUN_BULLET_LOCATION = gun_info_list[i].gun_Bullet_Location;
                    gun_info.LOSS_DESCRIPTION    = gun_info_list[i].loss_Description;
                    gun_info.REMARK   = gun_info_list[i].remark;
                    gun_info.SYN_FLAG = gun_info_list[i].syn_Flag;

                    gun_info_bll.Add(gun_info);
                }
            }
        }
        /// <summary>
        /// 同步枪支信息
        /// </summary>
        /// <param name="unit_id"></param>
        /// <param name="gunark_id"></param>
        public static void syn_Gun_Info(string unit_id, string gunark_id)
        {
            BLL.gun_info gun_info_bll = new Gunark.BLL.gun_info();
            WebService.gunServices webService = SingleWebService.getWebService();
            WebService.gunInfo[] gun_info_list = webService.getGunInfo(unit_id, gunark_id);

            for (int i = 0; i < gun_info_list.Length; i++)
            {
                if (!gun_info_bll.Exists(gun_info_list[i].gun_Info_Id))
                {
                    Model.gun_info gun_info = new Gunark.Model.gun_info();
                    gun_info.GUN_INFO_ID = gun_info_list[i].gun_Info_Id;
                    gun_info.GUNARK_ID = gun_info_list[i].gunArk.gunarkId;
                    gun_info.UNIT_ID = gun_info_list[i].unitInfo.unitInfoCode;
                    gun_info.GUN_NUMBER = gun_info_list[i].gun_Bullet_Number;
                    gun_info.GUN_TYPE = gun_info_list[i].gun_Bullet_Name;
                    gun_info.GUN_STATUS = gun_info_list[i].gun_Bullet_Status.ToString();
                    gun_info.GUN_BULLET_LOCATION = gun_info_list[i].gun_Bullet_Location;
                    gun_info.LOSS_DESCRIPTION = gun_info_list[i].loss_Description;
                    gun_info.REMARK = gun_info_list[i].remark;
                    gun_info.SYN_FLAG = gun_info_list[i].syn_Flag;

                    gun_info_bll.Add(gun_info);
                }
            }
        }