示例#1
0
        private static void analysisGroup1(string prams)
        {
            Bll.group g_bll = new Gunark.BLL.group();
            int       j     = -1;

            string[] attributes  = prams.Split('|');
            int      group_count = int.Parse(attributes[0].Substring(0, attributes[0].IndexOf("&")));

            for (int i = 0; i < group_count; i++)
            {
                Model.group group = new Gunark.Model.group();
                if (i == 0)
                {
                    group.GROUP_ID = attributes[++j].Substring(attributes[0].IndexOf("&") + 1);
                }
                else
                {
                    group.GROUP_ID = attributes[++j];
                }
                group.GROUP_LEADER = attributes[++j];
                group.AVAILABLE    = int.Parse(attributes[++j]);
                ++j;
                if (i != group_count - 1)
                {
                    ++j;
                }
                g_bll.Add(group);
            }
        }
示例#2
0
 private static void analysisGroup1(string prams)
 {
     Bll.group g_bll = new Gunark.BLL.group();
     int j = -1;
     string[] attributes = prams.Split('|');
     int group_count = int.Parse(attributes[0].Substring(0,attributes[0].IndexOf("&")));
     for (int i = 0; i < group_count; i++)
     {
         Model.group group = new Gunark.Model.group();
         if(i == 0)
             group.GROUP_ID = attributes[++j].Substring(attributes[0].IndexOf("&") + 1);
         else
             group.GROUP_ID = attributes[++j];
         group.GROUP_LEADER = attributes[++j];
         group.AVAILABLE = int.Parse(attributes[++j]);
         ++j;
         if (i != group_count - 1)
             ++j;
         g_bll.Add(group);
     }
 }
示例#3
0
 public static void analysis(WebService.synInfo synInfo)
 {
     WebService.gunServices webService = SingleWebService.getWebService();
     #region model
     Model.gunark gunark = new Gunark.Model.gunark();
     Model.user user = new Gunark.Model.user();
     Model.group group = new Gunark.Model.group();
     Model.gbg gbg = new Gunark.Model.gbg();
     Model.fingerprint fingerPrint = new Gunark.Model.fingerprint();
     #endregion model
     #region bll
     Bll.user user_bll = new Gunark.BLL.user();
     Bll.gunark gunark_bll = new Gunark.BLL.gunark();
     Bll.group group_bll = new Gunark.BLL.group();
     Bll.gbg gbg_bll = new Gunark.BLL.gbg();
     Bll.fingerprint fingerPrint_bll = new Gunark.BLL.fingerprint();
     #endregion bll
     #region attritubes
     string[] attritubes = null;
     #endregion attritubes
     #region 同步类型
     switch (synInfo.syn_Type)
     {
         #region 枪柜
         case "枪柜信息增加"://通过
             gunark = analysisGunark(synInfo.syn_Param);
             gunark_bll.Add(gunark);
             //获取枪弹绑定关系
             attritubes = synInfo.syn_Param.Split('|');
             WebService.gunarkGroupGunBullet[] gggb = webService.getGunarkGroupGunBullet(attritubes[0]);
             for (int i = 0; i < gggb.Length; i++)
             {
                 Model.gbg ggbg = new Gunark.Model.gbg();
                 gbg.GGGBID = gggb[i].gggbId;
                 gbg.GROUP_ID = gggb[i].groupId;
                 gbg.GUN_LOCATION = gggb[i].gunLocation;
                 gbg.GUNARK_ID = gggb[i].gunarkId;
                 gbg.BULLET_LOCATION = int.Parse(gggb[i].bulletLocation);
                 gbg_bll.Add(gbg);
             }
             break;
         case "枪柜信息修改"://未通过
             gunark = analysisGunark(synInfo.syn_Param);
             gunark_bll.Update(gunark);
             break;
         case "注销"://未通过
             attritubes = synInfo.syn_Param.Split('|');
             gunark = gunark_bll.GetModel(attritubes[0]);
             gunark.GUNARK_STATUS = 0;
             gunark_bll.Update(gunark);
             break;
         case "是否枪弹对应"://未通过
             break;
         case "是否使用组权限"://未通过
             break;
         #endregion 枪柜
         #region 用户(用户绑定组未通过【寄存组有问题】、新增枪柜增加用户)
         case "增加用户":
             user = analysisUser(synInfo.syn_Param);
             user_bll.Add(user);
             break;
         case "更新用户":
             user = analysisUser(synInfo.syn_Param);
             user_bll.Update(user);
             break;
         case "枪柜增加用户":
             analysisUser1(synInfo.syn_Param);
             break;
         #endregion 用户
         #region 组信息(组增加已通过、新增枪柜增加组)
         case "增加班组":
             group = analysisGroup(synInfo.syn_Param);
             group_bll.Add(group);
             break;
         case "组注销":
             attritubes = synInfo.syn_Param.Split('|');
             group = group_bll.GetModel(attritubes[0]);
             group_bll.Update(group);
             break;
         case "枪柜增加组":
             analysisGroup1(synInfo.syn_Param);
             break;
         #endregion 组信息
         #region 枪弹组绑定关系(未测试)
         case "枪柜对应修改":
             attritubes = synInfo.syn_Param.Split('|');
             gbg = gbg_bll.GetModel(attritubes[0]);
             gbg.GUN_LOCATION = int.Parse(attritubes[2]);
             gbg.BULLET_LOCATION = int.Parse(attritubes[3]);
             gbg_bll.Update(gbg);
             break;
         case "枪位所属组修改":
             attritubes = synInfo.syn_Param.Split('|');
             gbg = gbg_bll.GetModelByGunPos(attritubes[0], attritubes[1]);
             gbg.GROUP_ID = attritubes[2];
             gbg_bll.Update(gbg);
             break;
         #endregion 枪弹组绑定关系
         #region 指纹信息(未测试)
         case "指纹增加":
             fingerPrint = analysisFingerPrint(synInfo.syn_Param);
             fingerPrint_bll.Add(fingerPrint);
             break;
         case "指纹修改":
             //通过USER_ID查
             fingerPrint = fingerPrint_bll.GetModelByUser(attritubes[1], attritubes[4]);
             fingerPrint.USER_FINGERPRINT = StrToByte(attritubes[6]);
             fingerPrint.USER_BAN = int.Parse(attritubes[7]);
             fingerPrint_bll.Update(fingerPrint);
             break;
         #endregion 指纹信息
         #region 增加任务(测试通过)
         case "增加任务":
             addTask(synInfo.syn_Param);
             break;
         #endregion 增加任务
         default:
             break;
     }
     #endregion 同步类型
 }
示例#4
0
        public static void analysis(WebService.synInfo synInfo)
        {
            WebService.gunServices webService = SingleWebService.getWebService();
            #region model
            Model.gunark      gunark      = new Gunark.Model.gunark();
            Model.user        user        = new Gunark.Model.user();
            Model.group       group       = new Gunark.Model.group();
            Model.gbg         gbg         = new Gunark.Model.gbg();
            Model.fingerprint fingerPrint = new Gunark.Model.fingerprint();
            #endregion model
            #region bll
            Bll.user        user_bll        = new Gunark.BLL.user();
            Bll.gunark      gunark_bll      = new Gunark.BLL.gunark();
            Bll.group       group_bll       = new Gunark.BLL.group();
            Bll.gbg         gbg_bll         = new Gunark.BLL.gbg();
            Bll.fingerprint fingerPrint_bll = new Gunark.BLL.fingerprint();
            #endregion bll
            #region attritubes
            string[] attritubes = null;
            #endregion attritubes
            #region  步类型
            switch (synInfo.syn_Type)
            {
                #region 枪柜
            case "枪柜信息增加":    //通过
                gunark = analysisGunark(synInfo.syn_Param);
                gunark_bll.Add(gunark);
                //获取枪弹绑定关系
                attritubes = synInfo.syn_Param.Split('|');
                WebService.gunarkGroupGunBullet[] gggb = webService.getGunarkGroupGunBullet(attritubes[0]);
                for (int i = 0; i < gggb.Length; i++)
                {
                    Model.gbg ggbg = new Gunark.Model.gbg();
                    gbg.GGGBID          = gggb[i].gggbId;
                    gbg.GROUP_ID        = gggb[i].groupId;
                    gbg.GUN_LOCATION    = gggb[i].gunLocation;
                    gbg.GUNARK_ID       = gggb[i].gunarkId;
                    gbg.BULLET_LOCATION = int.Parse(gggb[i].bulletLocation);
                    gbg_bll.Add(gbg);
                }
                break;

            case "枪柜信息修改":    //未通过
                gunark = analysisGunark(synInfo.syn_Param);
                gunark_bll.Update(gunark);
                break;

            case "注销":    //未通过
                attritubes           = synInfo.syn_Param.Split('|');
                gunark               = gunark_bll.GetModel(attritubes[0]);
                gunark.GUNARK_STATUS = 0;
                gunark_bll.Update(gunark);
                break;

            case "是否枪弹对应":    //未通过
                break;

            case "是否使用组权限":    //未通过
                break;

                #endregion 枪柜
                #region 用户(用户绑定组未通过【寄存组有问题】、新增枪柜增加用户)
            case "增加用户":
                user = analysisUser(synInfo.syn_Param);
                user_bll.Add(user);
                break;

            case "更新用户":
                user = analysisUser(synInfo.syn_Param);
                user_bll.Update(user);
                break;

            case "枪柜增加用户":
                analysisUser1(synInfo.syn_Param);
                break;

                #endregion 用户
                #region 组信息(组增加已通过、新增枪柜增加组)
            case "增加班组":
                group = analysisGroup(synInfo.syn_Param);
                group_bll.Add(group);
                break;

            case "组注销":
                attritubes = synInfo.syn_Param.Split('|');
                group      = group_bll.GetModel(attritubes[0]);
                group_bll.Update(group);
                break;

            case "枪柜增加组":
                analysisGroup1(synInfo.syn_Param);
                break;

                #endregion 组信息
                #region 枪弹组绑定关系(未测试)
            case "枪柜对应修改":
                attritubes          = synInfo.syn_Param.Split('|');
                gbg                 = gbg_bll.GetModel(attritubes[0]);
                gbg.GUN_LOCATION    = int.Parse(attritubes[2]);
                gbg.BULLET_LOCATION = int.Parse(attritubes[3]);
                gbg_bll.Update(gbg);
                break;

            case "枪位所属组修改":
                attritubes   = synInfo.syn_Param.Split('|');
                gbg          = gbg_bll.GetModelByGunPos(attritubes[0], attritubes[1]);
                gbg.GROUP_ID = attritubes[2];
                gbg_bll.Update(gbg);
                break;

                #endregion 枪弹组绑定关系
                #region 指纹信息(未测试)
            case "指纹增加":
                fingerPrint = analysisFingerPrint(synInfo.syn_Param);
                fingerPrint_bll.Add(fingerPrint);
                break;

            case "指纹修改":
                //通过USER_ID查
                fingerPrint = fingerPrint_bll.GetModelByUser(attritubes[1], attritubes[4]);
                fingerPrint.USER_FINGERPRINT = StrToByte(attritubes[6]);
                fingerPrint.USER_BAN         = int.Parse(attritubes[7]);
                fingerPrint_bll.Update(fingerPrint);
                break;

                #endregion 指纹信息
                #region 增加任务(测试通过)
            case "增加任务":
                addTask(synInfo.syn_Param);
                break;

                #endregion 增加任务
            default:
                break;
            }
            #endregion  步类型
        }