Example #1
0
 public static TB_BUYER GetPersonById(int id)
 {
     return(PersonDao.GetBuyerById(id));
 }
Example #2
0
        public void Delete(decimal id)
        {
            PersonDao pdao = new PersonDao();

            pdao.Delete(id);
        }
Example #3
0
        public static bool AltPwd(TB_BUYER buyer, int id)
        {
            int res = PersonDao.AltPwd(buyer, id);

            return(res > 0);
        }
Example #4
0
        public PersonModel ConsultOne(decimal id)
        {
            PersonDao pdao = new PersonDao();

            return(pdao.ConsultOne(id));
        }
Example #5
0
        public void Update()
        {
            PersonDao pdao = new PersonDao();

            pdao.Update(this);
        }
Example #6
0
 public PersonBusiness(MardisContext mardisContext)
 {
     _personDao = new PersonDao(mardisContext);
 }
Example #7
0
        public List <PersonModel> Consult()
        {
            PersonDao pdao = new PersonDao();

            return(pdao.Consult());
        }
 public HumanResourcesService(ManagedEmployeeDao managedEmployeeDao, GenderDao genderDao, MaritalStatusDao maritalStatusDao, PersonDao personDao, EmployeeDao employeeDao, BusinessEntityDao businessEntityDao)
 {
     _managedEmployeeDao = managedEmployeeDao;
     _genderDao          = genderDao;
     _maritalStatusDao   = maritalStatusDao;
     _personDao          = personDao;
     _employeeDao        = employeeDao;
     _businessEntityDao  = businessEntityDao;
 }
Example #9
0
 public AuthComponent()
 {
     _personDao = new PersonDao();
 }
Example #10
0
        public PublishUI()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            List <PersonInfo> datasource_person = PersonDao.getAllPersonInfo();
            PersonInfo        person            = new PersonInfo();

            person.Fullname = "全部责任人";
            person.Id       = 0;
            datasource_person.Insert(0, person);
            this.comboBox2.DataSource    = datasource_person;
            this.comboBox2.DisplayMember = "Fullname";
            this.comboBox2.ValueMember   = "Id";


            List <ModuleInfo> datasource_module = ModuleDao.getAllModuleInfo();
            ModuleInfo        all = new ModuleInfo();

            all.Fullname = "全部模块";
            all.Id       = 0;
            datasource_module.Insert(0, all);
            this.comboBox1.DataSource         = datasource_module;
            this.comboBox1.DisplayMember      = "Fullname";
            this.comboBox1.ValueMember        = "Id";
            this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox1.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;

            //----------------------------------
            TreeNode root1 = new TreeNode();

            root1.Text = "未发布";
            TreeNode root = new TreeNode();

            root.Text = ftphost;
            string[] list = this.ListDirectory("/");
            if (list != null)
            {
                foreach (var element in list)
                {
                    TreeNode temp = new TreeNode(element);
                    temp.Nodes.Add(new TreeNode());
                    root.Nodes.Add(temp);
                }
            }
            this.treeView1.Nodes.Add(root1);
            this.treeView1.Nodes.Add("今日发布");
            this.treeView1.Nodes.Add(root);
            this.treeView1.Nodes[1].Expand();
            this.treeView1.AfterExpand    += new TreeViewEventHandler(treeView1_AfterExpand);
            this.treeView1.NodeMouseClick += new TreeNodeMouseClickEventHandler(treeView1_NodeMouseClick);
            this.treeView1.Leave          += new EventHandler(treeView1_Leave);
            this.treeView1.BeforeSelect   += new TreeViewCancelEventHandler(treeView1_BeforeSelect);
            treeView1.SelectedNode         = treeView1.Nodes[0];
            //让选中项背景色呈现蓝色
            treeView1.SelectedNode.BackColor = Color.SteelBlue;
            //前景色为白色
            treeView1.SelectedNode.ForeColor = Color.White;

            this.exListView1.MySortBrush      = SystemBrushes.ControlLight;
            this.exListView1.MyHighlightBrush = Brushes.Goldenrod;
            this.exListView1.GridLines        = true;
            this.exListView1.ControlPadding   = 4;

            ImageList colimglst = new ImageList();

            colimglst.ImageSize             = new Size(1, 25); // this will affect the row height
            this.exListView1.SmallImageList = colimglst;

            this.exListView1.Columns.Add(new EXColumnHeader("更新包名称", 200));
            this.exListView1.Columns.Add(new EXEditableColumnHeader("上传路径", 180));
            this.exListView1.Columns.Add(new EXColumnHeader("进度", 120));
            this.exListView1.Columns.Add(new EXColumnHeader("状态", 150));
            this.exListView1.Columns.Add(new EXColumnHeader("操作", 45));

            this.currentpage = 1;
            this.label3.Text = string.Format(currentstr, this.currentpage);
            this.label5.Text = string.Format(pagestr, this.pagesize);
            this.label4.Text = string.Format(countstr, (count % pagesize == 0)?count / pagesize:count / pagesize + 1, this.count);

            System.DateTime dt = System.DateTime.Now;
            dateTimePicker1.Value = dt.AddDays(-7);


            getPublishPackageList();
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
Example #11
0
    public void Visit(Person person)
    {
        var personDao = new PersonDao();

        personDao.Save(person);
    }
 public PersonController()
 {
     _personDao     = new PersonDao();
     _authComponent = new AuthComponent();
 }
Example #13
0
        public Main()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.LocalMachine;
            Microsoft.Win32.RegistryKey dbc = key.OpenSubKey("software\\WisoftWatchClient", true);
            //注册热键(窗体句柄,热键ID,辅助键,实键)   
            RegisterHotKey(this.Handle, 888, (int)KeyModifiers.Ctrl ,  Keys.N);
            RegisterHotKey(this.Handle, 999,  ((int)KeyModifiers.Ctrl + (int)KeyModifiers.Shift),  Keys.A);
                     string username  = ConfigurationManager.AppSettings["Username"];
                     string password  = ConfigurationManager.AppSettings["Password"];
                     bool   checkpass = true;
                     string errorstr  = "";
                    
                                if (dbc == null || dbc.GetValue("Username") == null)
            {
                                {
                             checkpass = false;
                             errorstr  = "对不起,您的设置可能有问题,请重新设置!";

                            
                }
            }
                            else if (string.IsNullOrEmpty(username))
            {
                                {
                             checkpass = false;
                             errorstr  = "您好像是第一次登录系统,请设置用户名密码";

                            
                }
            }
                            else if (PersonDao.getAllPersonInfo(username, password).Count != 1)
            {
                                {
                             checkpass = false;
                             errorstr  = "您的用户名密码好像不正确,请设置用户名密码";

                            
                }
            }
                            else if (dbc.GetValue("Version").ToString() != "0.4.3")
            {
                                {
                             System.Diagnostics.Process.Start("notepad.exe", System.Environment.CurrentDirectory + "\\releasenote.txt");

                             dbc.SetValue("Version", "0.4.3");

                            
                }
            }
                    
                                if (!checkpass)
            {
                         MessageBox.Show(errorstr);

                Dbconfig db = new Dbconfig();
                if (db.ShowDialog() != DialogResult.OK)
                {
                    //this.Load += new EventHandler(main_Load);
                    this.Close();
                    System.Windows.Forms.Application.Exit();
                    //return;
                }
                else
                {
                    if (dbc.GetValue("Version").ToString() != "0.4.3")
                    {
                                        {
                                     System.Diagnostics.Process.Start("notepad.exe", System.Environment.CurrentDirectory + "\\releasenote.txt");

                                     dbc.SetValue("Version", "0.4.3");

                                    
                        }
                    }
                    InitializeComponent();
                    username = ConfigurationManager.AppSettings["Username"];
                    if (string.IsNullOrEmpty(username))
                    {
                        this.Text = this.Text + "--未登录";
                    }
                    else
                    {
                        this.Text = this.Text + "--" + username;
                    }
                }
            }
            else
            {
                try {
                    SqlDBUtil.CheckDBState();
                } catch (Exception) {
                    MessageBox.Show("数据库异常", "DBERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.Close();
                    System.Windows.Forms.Application.Exit();
                }
                GlobalParams.User = PersonDao.getAllPersonInfo(username, password)[0];
                InitializeComponent();
                this.Text = this.Text + "--" + username;
            }

            this.notifyIcon1.Visible = true;

            this.notifyIcon1.MouseClick += new MouseEventHandler(notifyIcon1_Click);
            this.SizeChanged            += new EventHandler(Main_MinimumSizeChanged);
            this.Closing += new CancelEventHandler(Main_Closing);
            LoadModules();

            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }
Example #14
0
 public PreparedPersonsTestsDataLocator()
 {
     _testDao     = new TestDao();
     _questionDao = new QuestionDao();
     _personDao   = new PersonDao();
 }
Example #15
0
        public static bool AltOrder(TB_ORDER order, int ORDER_NO)
        {
            int res = PersonDao.AltOrder(order, ORDER_NO);

            return(res > 0);
        }
Example #16
0
        public void Create()
        {
            PersonDao pdao = new PersonDao();

            pdao.Create(this);
        }
Example #17
0
 public PersonRepository(ISession session, IDomainEventDispatcher domainEventDispatcher)
 {
     _domainEventDispatcher = domainEventDispatcher;
     _personDao = new PersonDao(session.GetPort<System.Data.Common.DbConnection>());
 }
Example #18
0
        public TestListUI()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            TreeNode tmp = new TreeNode("全部");

            foreach (var element in Enum.GetNames(typeof(CommonConst.TestState)))
            {
                tmp.Nodes.Add(element);
            }
            treeView1.Nodes.Add(tmp);
            treeView1.ExpandAll();
            treeView1.SelectedNode = treeView1.Nodes[0].Nodes[0];
            //让选中项背景色呈现蓝色
            treeView1.SelectedNode.BackColor = Color.SteelBlue;
            //前景色为白色
            treeView1.SelectedNode.ForeColor = Color.White;
            System.DateTime dt = System.DateTime.Now;
            dateTimePicker1.Value = dt.AddDays(-7);

            List <PersonInfo> datasource_person = PersonDao.getAllPersonInfo();
            PersonInfo        person            = new PersonInfo();

            person.Fullname = "全部责任人";
            person.Id       = 0;
            datasource_person.Insert(0, person);
            this.comboBox2.DataSource    = datasource_person;
            this.comboBox2.DisplayMember = "Fullname";
            this.comboBox2.ValueMember   = "Id";


            List <ModuleInfo> datasource_module = ModuleDao.getAllModuleInfo();
            ModuleInfo        all = new ModuleInfo();

            all.Fullname = "全部模块";
            all.Id       = 0;
            datasource_module.Insert(0, all);
            this.comboBox1.DataSource         = datasource_module;
            this.comboBox1.DisplayMember      = "Fullname";
            this.comboBox1.ValueMember        = "Id";
            this.comboBox1.AutoCompleteSource = AutoCompleteSource.ListItems;
            this.comboBox1.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;

            this.comboBox3.Items.Add("全部等级");
            this.comboBox3.Items.AddRange(CommonConst.BUGLEVEL);
            this.comboBox3.SelectedIndex = 0;

            this.comboBox3.SelectedIndexChanged += new EventHandler(conditionChanged);
            this.comboBox1.SelectedIndexChanged += new EventHandler(conditionChanged);
            this.comboBox2.SelectedIndexChanged += new EventHandler(conditionChanged);

            treeView1.NodeMouseClick += new TreeNodeMouseClickEventHandler(treeView1_NodeMouseClick);
            treeView1.Leave          += new EventHandler(treeView1_Leave);
            treeView1.BeforeSelect   += new TreeViewCancelEventHandler(treeView1_BeforeSelect);

            this.listView1.DoubleClick        += new EventHandler(ListVew_DoubleClick);
            this.dateTimePicker1.ValueChanged += new EventHandler(conditionChanged);
            this.dateTimePicker2.ValueChanged += new EventHandler(conditionChanged);

            this.currentpage = 1;
            this.label3.Text = string.Format(currentstr, this.currentpage);
            this.label5.Text = string.Format(pagestr, this.pagesize);
            this.label4.Text = string.Format(countstr, (count % pagesize == 0)?count / pagesize:count / pagesize + 1, this.count);

            getTestUnitList();
            //
            // TODO: Add constructor code after the InitializeComponent() call.
            //
        }