예제 #1
0
        //从控件获取值,封装成实体返回
        Base_UserConfigManage GetEntity()
        {
            Base_UserConfigManage m = new Base_UserConfigManage();

            m.User_Office = textBox_Office.Text;
            if (IsModify == true)
            {
                m.User_Id = int.Parse(label_Id.Text);
            }

            m.User_Description = textBox_Desc.Text;
            m.User_DisableCmd  = textBox_DisableCmd.Text;
            m.User_Name        = textBox_UserName.Text;
            m.User_Pass        = textBox_UserPass.Text;
            if (rad_Enable.Checked)
            {
                m.User_Disable = true;
            }
            else
            {
                m.User_Disable = false;
            }

            m.User_BeginDate = dateTimePicker_BeginDate.Value;
            m.User_EndDate   = dateTimePicker_EndDate.Value;
            m.Customer_Id    = curr_CustomerId;

            return(m);
        }
예제 #2
0
        void LoadControl(Base_UserConfigManage m)//修改用户时加载
        {
            textBox_Office.Text     = m.User_Office;
            textBox_Desc.Text       = m.User_Description;
            textBox_DisableCmd.Text = m.User_DisableCmd;
            textBox_UserName.Text   = m.User_Name;
            textBox_UserPass.Text   = m.User_Pass;
            if (m.User_Disable)
            {
                rad_Enable.Checked = true;
            }
            else
            {
                rad_Unable.Checked = true;
            }
            dateTimePicker_BeginDate.Value = m.User_BeginDate;
            dateTimePicker_EndDate.Value   = m.User_EndDate;
            label_Id.Text = m.User_Id.ToString();

            //指令数量限制标志
            if (m.User_LimitFlag)
            {
                checkBox1.Checked      = true;
                numericUpDown1.Enabled = true;
            }
            else
            {
                checkBox1.Checked      = false;
                numericUpDown1.Enabled = false;
            }

            numericUpDown1.Value = m.User_LimitCount;
            label12.Text         = m.User_SendCount.ToString() + "条";
        }
예제 #3
0
 /// <summary>
 /// 修改一条放大用户的发送指令条数
 /// </summary>
 /// <param name="_Base_UserConfigManage"></param>
 /// <returns></returns>
 public bool Modify_Base_UserSendCmdCount(Base_UserConfigManage _Base_UserConfigManage)
 {
     try
     {
         return(remoteobj.Modify_Base_UserSendCmdCount(_Base_UserConfigManage));
     }
     catch (Exception ex)
     {
         OnError(ex.Message);
         return(false);
     }
 }
예제 #4
0
 /// <summary>
 /// 删除一条放大用户
 /// </summary>
 /// <param name="_Base_UserConfigManage"></param>
 /// <returns></returns>
 public bool Delete_Base_UserConfigManage(Base_UserConfigManage _Base_UserConfigManage)
 {
     try
     {
         return(remoteobj.Delete_Base_UserConfigManage(_Base_UserConfigManage));
     }
     catch (Exception ex)
     {
         OnError(ex.Message);
         return(false);
     }
 }
예제 #5
0
 void LoadControl(Base_UserConfigManage m)//修改用户时加载
 {
     textBox_Office.Text     = m.User_Office;
     textBox_Desc.Text       = m.User_Description;
     textBox_DisableCmd.Text = m.User_DisableCmd;
     textBox_UserName.Text   = m.User_Name;
     textBox_UserPass.Text   = m.User_Pass;
     if (m.User_Disable)
     {
         rad_Enable.Checked = true;
     }
     else
     {
         rad_Unable.Checked = true;
     }
     dateTimePicker_BeginDate.Value = m.User_BeginDate;
     dateTimePicker_EndDate.Value   = m.User_EndDate;
     label_Id.Text = m.User_Id.ToString();
 }
예제 #6
0
        //从控件获取值,封装成实体返回
        Base_UserConfigManage GetEntity()
        {
            Base_UserConfigManage m = new Base_UserConfigManage();

            m.User_Office = textBox_Office.Text;
            if (IsModify == true)
            {
                m.User_Id = int.Parse(label_Id.Text);
            }

            m.User_Description = textBox_Desc.Text;
            m.User_DisableCmd  = textBox_DisableCmd.Text;
            m.User_Name        = textBox_UserName.Text;
            m.User_Pass        = textBox_UserPass.Text;
            if (rad_Enable.Checked)
            {
                m.User_Disable = true;
            }
            else
            {
                m.User_Disable = false;
            }

            m.User_BeginDate = dateTimePicker_BeginDate.Value;
            m.User_EndDate   = dateTimePicker_EndDate.Value;
            m.Customer_Id    = curr_CustomerId;

            if (checkBox1.Checked)
            {
                m.User_LimitFlag = true;
            }
            else
            {
                m.User_LimitFlag = false;
            }

            int tmpcount = 0;

            int.TryParse(numericUpDown1.Value.ToString(), out tmpcount);
            m.User_LimitCount = tmpcount;

            return(m);
        }
예제 #7
0
파일: FormMain.cs 프로젝트: tinshen/pidDev
        private void button_DeleteUser_Click(object sender, EventArgs e)
        {
            int id = GetUserID();

            if (id == 0)
            {
                MessageBox.Show("请选择一条数据再删除!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            Base_UserConfigManage bm = ManageSpace.Manage.Get_Base_UserConfigManageById(id);

            if (ManageSpace.Manage.Delete_Base_UserConfigManage(bm))
            {
                LoadUserConfig();              //刷新缓存数据
                MessageBox.Show("删除成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("删除失败,请重试!" + ManageSpace.Manage.Error_Messages, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
예제 #8
0
파일: Manage.cs 프로젝트: tinshen/pidDev
 /// <summary>
 /// 修改用户发送指令条数
 /// </summary>
 /// <param name="bm"></param>
 /// <returns></returns>
 public static bool Modify_Base_UserSendCmdCount(Base_UserConfigManage bm)
 {
     return(configManage.Modify_Base_UserSendCmdCount(bm));
 }
예제 #9
0
파일: Manage.cs 프로젝트: tinshen/pidDev
 /// <summary>
 /// 修改用户
 /// </summary>
 /// <param name="bm"></param>
 /// <returns></returns>
 public static bool Modify_Base_UserConfigManage(Base_UserConfigManage bm)
 {
     return(configManage.Modify_Base_UserConfigManage(bm));
 }
예제 #10
0
파일: Manage.cs 프로젝트: tinshen/pidDev
 /// <summary>
 /// 添加一条用户
 /// </summary>
 /// <param name="bm"></param>
 /// <returns></returns>
 public static bool Add_Base_UserConfigManage(Base_UserConfigManage bm)
 {
     return(configManage.Add_Base_UserConfigManage(bm));
 }
예제 #11
0
파일: Manage.cs 프로젝트: tinshen/pidDev
 /// <summary>
 /// 删除一条用户
 /// </summary>
 /// <param name="bm"></param>
 /// <returns></returns>
 public static bool Delete_Base_UserConfigManage(Base_UserConfigManage bm)
 {
     return(configManage.Delete_Base_UserConfigManage(bm));
 }
예제 #12
0
 /// <summary>
 /// 修改用户
 /// </summary>
 /// <param name="user">要修改的用户实体</param>
 public FormAddModifyUser(Base_UserConfigManage user)
 {
     InitializeComponent();
     user_Temp = user;
     IsModify  = true;
 }