Exemplo n.º 1
0
        void setRight()
        {
            if (_strUserCode!="0")
            {
                strRights = new Sys_OperatorPosition().GetOperatorPosition(_strUserCode);
                //strRights = strRights.Replace("s2302", "s2301").Replace("s2305", "s2301").Replace("s2306", "s2301");
                //strRights = strRights.Replace("s2304", "s2303");
                //strRights = strRights.Replace("s2208", "s2207");

                if (!(strRights.Contains(",s2302,") || strRights.Contains(",s2305,") || strRights.Contains(",s2306,")))
                {
                    //picCheckBang.Visible = true;
                    TabWeight.TabPages.Remove(tabLoadWeight);
                }

                //if (strRights.Contains(",s2304,"))
                //{
                //    PicCheckSpreadWeight.Visible = true;
                //}

                if (!strRights.Contains(",s2207,"))
                {
                    //PicOutWeight.Visible = true;
                    TabWeight.TabPages.Remove(TabOutWeight);
                }
            }
        }
 private void TwiceWeightPrint_Click(object sender, EventArgs e)
 {
     StaticParameter.IsMatchIp = "1";
     if (StaticParameter.IsMatchIp == "1")
     {
         if (StaticParameter.UserCode == "0")
         {
             new RoomSearch.LoadWeightSearch(this).ShowDialog();
         }
         else
         {
             string strrightlist = new Sys_OperatorPosition().GetOperatorPosition(_strUserCode);
             if (strrightlist.Contains("s2501"))
             {
                 new RoomSearch.LoadWeightSearch(this).ShowDialog();
             }
             else
             {
                 alSound.Alarm("你没有重车过磅二次打印权限");
             }
         }
     }
     else if (StaticParameter.IsMatchIp == "0")
     {
         alSound.Alarm("该站的IP地址与该站的名称不匹配");
     }
     else if (StaticParameter.IsMatchIp == "-1")
     {
         alSound.Alarm("该站的IP地址存在于多个磅房中");
     }
     else
     {
         alSound.Alarm("该站的IP地址不存在");
     }
 }
Exemplo n.º 3
0
        private void TwiceEmptyPrint_Click(object sender, EventArgs e)
        {
            if (StaticParameter.IsMatchIp == "1")
            {
                if (StaticParameter.UserCode == "0")
                {
                    new EmptyBang.CarInfoSearch(this).ShowDialog();
                }
                else
                {
                    string strrightlist = new Sys_OperatorPosition().GetOperatorPosition(_strUserCode);
                    if (strrightlist.Contains("s2504"))
                    {
                        new EmptyBang.CarInfoSearch(this).ShowDialog();
                    }
                    else
                    {
                        alSound.Alarm("你没有车辆信息登记二次打印权限");
                    }
                }

            }
            else if (StaticParameter.IsMatchIp == "0")
            {
                alSound.Alarm("该站的IP地址与该站的名称不匹配");
            }
            else if (StaticParameter.IsMatchIp == "-1")
            {
                alSound.Alarm("该站的IP地址存在于多个磅房中");
            }
            else
            {
                alSound.Alarm("该站的IP地址不存在");
            }
        }
 /// <summary>
 /// 重车二次打印
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TwiceWeightPrint_Click(object sender, EventArgs e)
 {
     if (StaticParameter.UserCode != "0")
     {
         if (StaticParameter.IsMatchIp == "1")//首先判断用户的ip地址是否匹配数据,如果匹配那么就判断用户编号是否为0(超级管理员),是就显示二次打印窗体,不是0那么就判断该用户下的权限是否含有“s2501”,如果有这个就显示二次打印,否则就语音报警
         {
             if (StaticParameter.UserCode == "0")
             {
                 new WeightBang.LoadWeightSearch(this).ShowDialog();
                 //new RoomSearch.LoadWeightSearch(this).ShowDialog();
                 //new RoomSearch.LoadWeightSearch(this, this.lblDepart.Text).ShowDialog();
             }
             else
             {
                 string strrightlist = new Sys_OperatorPosition().GetOperatorPosition(_strUserCode);
                 if (strrightlist.Contains("s2501"))
                 {
                     new WeightBang.LoadWeightSearch(this).ShowDialog();
                     //new RoomSearch.LoadWeightSearch(this).ShowDialog();
                     //new RoomSearch.LoadWeightSearch(this, this.lblDepart.Text).ShowDialog();
                 }
                 else
                 {
                     alSound.Alarm("你没有重车过磅二次打印权限");
                 }
             }
         }
         else if (StaticParameter.IsMatchIp == "0")
         {
             alSound.Alarm("该站的IP地址与该站的名称不匹配");
         }
         else if (StaticParameter.IsMatchIp == "-1")
         {
             alSound.Alarm("该站的IP地址存在于多个磅房中");
         }
         else
         {
             alSound.Alarm("该站的IP地址不存在");
         }
     }
     else
     {
         new WeightBang.LoadWeightSearch(this).ShowDialog();
         //new RoomSearch.LoadWeightSearch(this).ShowDialog();
     }
 }
Exemplo n.º 5
0
 private void pictureBox1_Click(object sender, EventArgs e)
 {
     if (StaticParameter.IsMatchIp == "1")
     {
         if (StaticParameter.UserCode == "0")
         {
             new NavicertCard.NavicertSearch(this).ShowDialog();
         }
         else
         {
             string strrightlist = new Sys_OperatorPosition().GetOperatorPosition(_strUserCode);
             if (strrightlist.Contains("s2505"))
             {
                 new NavicertCard.NavicertSearch(this).ShowDialog();
             }
             else
             {
                 alSound.Alarm("你没有准运卡办理二次打印权限");
             }
         }
     }
     else if (StaticParameter.IsMatchIp == "0")
     {
         alSound.Alarm("该站的IP地址与该站的名称不匹配");
     }
     else if (StaticParameter.IsMatchIp == "-1")
     {
         alSound.Alarm("该站的IP地址存在于多个磅房中");
     }
     else
     {
         alSound.Alarm("该站的IP地址不存在");
     }
 }