Esempio n. 1
0
        /// <summary>
        /// 更新出勤天数
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        public static int UpPayDay(Entity.Person p)
        {
            DateTime time = System.DateTime.Now;
            string   sql  = "update Pay set PayDay+=1 where PID=" + p.pID + " and year(PayTime)=" + time.Year + " and Month(PayTime)=" + time.Month + "";

            return((int)DBHelper.GetLine(sql));
        }
Esempio n. 2
0
 public MyInfo(Main ma, Entity.Person per)
 {
     this.m = ma;
     this.p = per;
     InitializeComponent();
     show();
 }
Esempio n. 3
0
        private void btn_find_Click(object sender, EventArgs e)
        {
            Entity.Work       wr = new Entity.Work();
            Entity.Department dp = new Entity.Department();
            Entity.Person     pr = new Entity.Person();
            if (radioButton1.Checked)
            {
                wr.wTime = this.dateTimePicker1.Value;
                dataGridView1.DataSource = BLL.WorkBLL.work5(wr, this.dateTimePicker2.Value);
                int i = this.dataGridView1.Rows.Count;
                if (i == 0)
                {
                    Msg.Box.Show("未查找到您所要的信息!");
                }
            }
            else if (radioButton2.Checked)
            {
                dp.depID = int.Parse(this.comboBox1.SelectedValue.ToString());

                dataGridView1.DataSource = BLL.WorkBLL.work2(dp);
                int i = this.dataGridView1.Rows.Count;
                if (i == 0)
                {
                    Msg.Box.Show("未查找到您所要的信息");
                }
            }
            else
            {
                Msg.Box.Show("您还未勾选查询方式!");
                return;
            }
        }
Esempio n. 4
0
 public Main(Entity.Person per)
 {
     this.p = per;
     InitializeComponent();
     LoadMenu();
     LoadInfo();
 }
Esempio n. 5
0
        private void btn_no_Click(object sender, EventArgs e)
        {
            if (this.textBox1.Text == "")
            {
                Msg.Box.Show("请先选中需要操作的人员!");
                return;
            }

            Entity.Person dd    = new Entity.Person();
            bool          isDel = Msg.Box.RShow("是否确认删除 【" + this.textBox2.Text + "】 的信息?", Msg.Box.Ico.Question);

            if (isDel == false)
            {
                return;
            }
            dd.pID = int.Parse(this.textBox1.Text);
            bool DGP = BLL.FindBLL.DDPR(dd);

            if (DGP == true)
            {
                Msg.Box.Show("【 " + this.textBox2.Text + " 】已经从应聘人员中移除!", "成功提示", Msg.Box.Ico.Info);
                this.dataGridView1.DataSource = BLL.FindBLL.CPL();
                textBox1.Text = textBox2.Text = textBox3.Text = textBox4.Text = textBox5.Text = textBox6.Text = "";
                return;
            }
        }
Esempio n. 6
0
 public Menu(Main ma, Entity.Person per)
 {
     this.m = ma;
     this.p = per;
     InitializeComponent();
     MsgCount();
 }
Esempio n. 7
0
 public MsgRead(Main ma, Entity.Person per)
 {
     this.m = ma;
     this.p = per;
     InitializeComponent();
     msg.pID = p.pID;
     this.dgv_msg.DataSource = EBLL.MsgBLL.LoadMsg(msg);
 }
Esempio n. 8
0
 private void WorkInfo_Load(object sender, EventArgs e)
 {
     this.dataGridView1.DataSource = BLL.WorkBLL.Work4();
     Entity.Person pr = new Entity.Person();
     this.comboBox1.DataSource = BLL.WorkBLL.Work3();
     comboBox1.DisplayMember   = "DepName";
     comboBox1.ValueMember     = "DepID";
 }
Esempio n. 9
0
 public Leave(Main ma, Entity.Person per)
 {
     this.m = ma;
     this.p = per;
     InitializeComponent();
     this.txt_uid.Text        = p.pID.ToString();
     this.dgv_main.DataSource = EBLL.WorkBLL.LoadLeave(p);
 }
Esempio n. 10
0
 public Train(Main ma, Entity.Person per)
 {
     this.m = ma;
     this.p = per;
     InitializeComponent();
     a.pID = p.pID;
     dataGridView1.DataSource = EBLL.TrainBLL.TPNotes(a);
 }
Esempio n. 11
0
 public Express(Main ma, Entity.Person per)
 {
     this.m = ma;
     this.p = per;
     InitializeComponent();
     ap.pID = p.pID;
     dataGridView1.DataSource = EBLL.MoneyBLL.unio(ap);
 }
Esempio n. 12
0
 public Goods(Main ma, Entity.Person per)
 {
     this.m = ma;
     this.p = per;
     InitializeComponent();
     gc.pID = p.pID;
     this.dataGridView1.DataSource = EBLL.GoodsBLL.LoadGoods();
     LoadCode();
 }
Esempio n. 13
0
        public void Decrypt(SCMS.Foundation.Security.SymmetricCipherProvider symmetricCipherProvider)
        {
            if (symmetricCipherProvider == null)
            {
                throw new Exception("The provided symmetric cipher provider is not instantiated.", new ArgumentNullException("symmetricCipherProvider"));
            }

            Supervisor.Person = new Entity.Person(Supervisor.Person, SCMS.Foundation.Security.EncryptionStatus.EncryptionStatusDecrypted, symmetricCipherProvider);
            Person            = new Entity.Person(Person, SCMS.Foundation.Security.EncryptionStatus.EncryptionStatusDecrypted, symmetricCipherProvider);
        }
Esempio n. 14
0
 /// <summary>
 /// 更新人员照片
 /// </summary>
 /// <param name="p"></param>
 /// <param name="name"></param>
 /// <returns></returns>
 public static bool UpLogo(Entity.Person p, string name)
 {
     if (DAL.PersonDAL.UpLogo(p, name) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 15
0
        //人员详情显示
        public void LoadMyInfo(PersonPlane pp, Entity.Person per)
        {
            this.panel.Controls.Clear();
            MyInfo p = new MyInfo(pp, per);

            p.LoadInfo();
            p.TopLevel = false;
            p.Dock     = DockStyle.Fill;
            this.panel.Controls.Add(p);
            p.Show();
        }
Esempio n. 16
0
        public void Create(Entity.Person person)
        {
            var personPO = _personRepository.FindById(person.PersonId);

            if (null != personPO)
            {
                throw new Exception("Person already exists");
            }
            person.Create();
            _personRepository.Insert(_personFactory.CreatePersonPO(person));
        }
Esempio n. 17
0
 /// <summary>
 /// 加载人员薪资
 /// </summary>
 /// <param name="p"></param>
 /// <returns></returns>
 public static string LoadMoney(Entity.Person p)
 {
     try
     {
         return(EDAL.LoginDAL.LoadMoney(p).ToString() + " 元");
     }
     catch (Exception)
     {
         return("未找到数据");
     }
 }
Esempio n. 18
0
 /// <summary>
 /// 验证密码
 /// </summary>
 /// <param name="p"></param>
 /// <returns></returns>
 public static bool ChackPass(Entity.Person p)
 {
     if ((int)EDAL.LoginDAL.ChackPass(p) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Esempio n. 19
0
        public DefaultQueryBuilderTest()
        {
            queryBuilder   = new DefaultQueryBuilder <Person>();
            withID         = new Entity.Person();
            withID.ID      = 3;
            withID.Name    = "withID";
            withID.Address = "Gangnam";
            withID.Email   = "*****@*****.**";
            withID.Age     = 29;

            type          = withID.GetType();
            propertyInfos = type.GetProperties();
            columnInfos   = type.GetProperties().Select(info => new ColumnInfo(info, info.GetCustomAttribute <ColumnAttribute>())).Where(info => info.ColumnAttribute != null).ToArray();
        }
Esempio n. 20
0
        /// <summary>
        /// 个人修改密码
        /// </summary>
        /// <param name="MY"></param>
        /// <returns></returns>
        public static bool XMy(Entity.Person MY)
        {
            string sql = string.Format("update Person set PPass='******' where PID='{1}'", MY.pPwd, MY.pID);
            int    i   = (int)DBHelper.GetLine(sql);

            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 21
0
        /// <summary>
        /// 修改个人全部信息的方法
        /// </summary>
        /// <param name="MY"></param>
        /// <returns></returns>
        public static bool XMyInfo(Entity.Person MY)
        {
            string sql = string.Format("update Person set PName='{0}',PSex='{1}',PEthnic='{2}',PAges='{3}',PPhone='{4}',PQQ='{5}',PMail='{6}',PSubject='{7}',PSchool='{8}',PFaction='{9}',PMarry='{10}',PInteresting='{11}',PBirthday='{12}',PCardID='{13}' where PID='{14}'", MY.pName, MY.pSex, MY.pEthnic, MY.pAge, MY.pPhone, MY.pQQ, MY.pMail, MY.pSubject, MY.pSchool, MY.pFaction, MY.pMarry, MY.pInteresting, MY.pBirthday, MY.pCardID, MY.pID);
            int    i   = (int)DBHelper.GetLine(sql);

            if (i > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 22
0
        public void Decrypt(SCMS.Foundation.Security.SymmetricCipherProvider symmetricCipherProvider)
        {
            if (symmetricCipherProvider == null)
            {
                throw new Exception("The provided symmetric cipher provider is not instantiated.", new ArgumentNullException("symmetricCipherProvider"));
            }

            Person      = new Entity.Person(Person, SCMS.Foundation.Security.EncryptionStatus.EncryptionStatusDecrypted, symmetricCipherProvider);
            Country     = string.IsNullOrEmpty(Country) ? string.Empty : symmetricCipherProvider.DecryptData(Country);
            Subdivision = string.IsNullOrEmpty(Subdivision) ? string.Empty : symmetricCipherProvider.DecryptData(Subdivision);
            City        = string.IsNullOrEmpty(City) ? string.Empty : symmetricCipherProvider.DecryptData(City);
            Address     = string.IsNullOrEmpty(Address) ? string.Empty : symmetricCipherProvider.DecryptData(Address);
            ZIP         = string.IsNullOrEmpty(ZIP) ? string.Empty : symmetricCipherProvider.DecryptData(ZIP);
            Phones      = Phones == null ? null : Phones.Select(p => string.IsNullOrEmpty(p) ? string.Empty : symmetricCipherProvider.DecryptData(p)).ToList();
        }
Esempio n. 23
0
 public void Create(Entity.Person person)
 {
     if (person != null)
     {
         if (person.Age > 0)
         {
             _personRepository.Insert(person);
             _unitOfWork.Commit();
         }
         else
         {
             throw new Exception($"Person's age should above 0. Age: {person.Age}");
         }
     }
 }
Esempio n. 24
0
        private void btn_use_Click(object sender, EventArgs e)
        {
            if (this.textBox1.Text == "")
            {
                Msg.Box.Show("请先选中需要操作的人员!");
                return;
            }
            Entity.Person cc = new Entity.Person();
            cc.pID    = int.Parse(this.textBox1.Text);
            cc.pState = "正式";
            bool XGP = BLL.FindBLL.xgPP(cc);

            if (XGP == true)
            {
                Msg.Box.Show("【 " + this.textBox2.Text + "】 已成为正式员工,请尽快与员工签署劳动合同!", "成功提示", Msg.Box.Ico.Info);
                this.dataGridView1.DataSource = BLL.FindBLL.SPL();
                textBox1.Text = textBox2.Text = textBox3.Text = textBox4.Text = textBox5.Text = textBox6.Text = "";
            }
        }
Esempio n. 25
0
        private void btn_up_Click(object sender, EventArgs e)
        {
            Entity.Person p = new Entity.Person();
            try
            {
                p.pID   = int.Parse(this.textBox10.Text);
                p.pName = this.textbox1.Text;
                char sex;
                if (this.radioButton1.Checked)
                {
                    sex = char.Parse(this.radioButton1.Text);
                }
                else
                {
                    sex = char.Parse(this.radioButton2.Text);
                }
                p.pSex         = sex;
                p.pEthnic      = this.textBox3.Text;
                p.pAge         = int.Parse(this.textBox2.Text);
                p.pPhone       = this.textBox4.Text;
                p.pQQ          = this.textBox5.Text;
                p.pMail        = this.textBox6.Text;
                p.pSubject     = this.textBox7.Text;
                p.pSchool      = this.textBox8.Text;
                p.pFaction     = this.textBox9.Text;
                p.pMarry       = this.comboBox1.Text;
                p.pInteresting = this.textBox11.Text;
                p.pBirthday    = this.dateTimePicker1.Value;
                p.pCardID      = this.textBox12.Text;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            bool xMY = EBLL.MyInfoBLL.XMY(p);

            if (xMY == true)
            {
                MessageBox.Show("恭喜您,信息修改成功!", "成功提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                show();
            }
        }
Esempio n. 26
0
        private void btn_no_Click(object sender, EventArgs e)
        {
            if (this.dataGridView1.Rows.Count == 0)
            {
                return;
            }
            if (this.textBox1.Text == "")
            {
                Msg.Box.Show("请选择信息");
                return;
            }


            bool isGo = Msg.Box.RShow("是否同意该员工的辞职申请?", Msg.Box.Ico.Question);

            if (isGo == true)
            {
                Entity.Person per = new Entity.Person();
                per.pID = int.Parse(this.dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[1].Value.ToString());

                Entity.Resignation RE = new Entity.Resignation();
                RE.rID = int.Parse(this.textBox1.Text);
                bool XG = BLL.ResignationBLL.SR(RE);
                if (XG == true)
                {
                    Msg.Box.Show("辞退成功!", "成功提示", Msg.Box.Ico.Info);
                    BLL.PersonBLL.Person1(per);
                    this.dataGridView1.DataSource = BLL.ResignationBLL.cr();
                }
                else
                {
                    Msg.Box.Show("辞退失败!", "失败示", Msg.Box.Ico.Info);
                    return;
                }
            }
            else
            {
                Msg.Box.Show("辞退失败!", "失败示", Msg.Box.Ico.Info);
                return;
            }
        }
Esempio n. 27
0
        public void Edit(Entity.Person person)
        {
            if (person != null)
            {
                if (person.Id <= 0)
                {
                    throw new Exception($"Invalid Id to save person. Id: {person.Id}");
                }



                if (person.Age.HasValue && (person.Age > 0))
                {
                    _personRepository.Edit(person);
                    _unitOfWork.Commit();
                }
                else
                {
                    throw new Exception($"Person's age should above 0. Age: {person.Age}");
                }
            }
        }
Esempio n. 28
0
 /// <summary>
 /// 修改个人辞职状态
 /// </summary>
 /// <param name="XMYINFO"></param>
 /// <returns></returns>
 public static bool czMy(Entity.Person XMYINFO)
 {
     return(EDAL.MyInfoDAL.czMy(XMYINFO));
 }
Esempio n. 29
0
 /// <summary>
 /// 传递修改个人信息方法
 /// </summary>
 /// <param name="XMYINFO"></param>
 /// <returns></returns>
 public static bool XMY(Entity.Person XMYINFO)
 {
     return(EDAL.MyInfoDAL.XMyInfo(XMYINFO));
 }
Esempio n. 30
0
 /// <summary>
 /// 传递查询个人信息方法
 /// </summary>
 /// <param name="myp"></param>
 /// <returns></returns>
 public static System.Data.DataTable MInfo(Entity.Person myp)
 {
     return(EDAL.MyInfoDAL.MInfo(myp));
 }
		private void submit_Click(object sender, RoutedEventArgs e)
		{
			if (((customId.Text == string.Empty) || (firstName.Text == string.Empty) || (lastName.Text == string.Empty) ||
				(street.Text == string.Empty) || (city.Text == string.Empty) ||
				(zip.Text == string.Empty) || (email.Text == string.Empty) ||
			  (name.Text == string.Empty) || (country.SelectedValue == null) || !this.marked)
				|| (this.c != "FO" && (this.ico.Text == string.Empty || this.icDph.Text == string.Empty
					|| this.dic.Text == string.Empty || this.name.Text == string.Empty)))
			{
				System.Windows.MessageBox.Show("Musia byť vyplnené poviné údaje");
				return;
			}
			if ((customId.Text.Contains(";")) || (titlePrefix.Text.Contains(";")) ||
						(firstName.Text.Contains(";")) || (lastName.Text.Contains(";")) ||
						(titleSuffix.Text.Contains(";")) || (street.Text.Contains(";")) ||
						(city.Text.Contains(";")) || (zip.Text.Contains(";")) || (email.Text.Contains(";")) ||
					  (name.Text.Contains(";")) || (mobile.Text.Contains(";")) || (ico.Text.Contains(";"))
			 || (dic.Text.Contains(";")) || (icDph.Text.Contains(";")))
			{
				System.Windows.MessageBox.Show("Znak ; je vyhradeni, prosím zmente vstup tak aby neobsahoval znak ; ");
				return;
			}
			Entity.Order order = new Entity.Order();
			order.products = new List<Interface.IOrderItem>();
			Entity.Company company = new Entity.Company();
			company.custom_id = customId.Text.ToString();

			Entity.Person person = new Entity.Person();
			person.titlePrefix = titlePrefix.Text.ToString();
			person.firstName = firstName.Text.ToString();
			person.lastName = lastName.Text.ToString();
			person.titleSuffix = titleSuffix.Text.ToString();

			Entity.Address address = new Entity.Address();
			address.street = street.Text.ToString();
			address.city = city.Text.ToString();
			address.zip = zip.Text.ToString();
			address.country = country.Text.ToString() == "Vyberte krajinu" ? "SVK" : country.Text.ToString();

			Entity.Contact contact = new Entity.Contact();
			contact.email = email.Text.ToString();
			contact.mobile = mobile.Text.ToString();

			company.person = person;
			company.address = address;
			company.contact = contact;

			switch (this.c.ToUpper())
			{
				case "PO":
					{ company.corporatePerson = Interface.CorporatePerson.PO; break; }
				default:
					{ company.corporatePerson = Interface.CorporatePerson.FO; break; }
			}
			if (this.c.ToUpper() != "FO")
			{
				company.name = name.Text.ToString();
				company.ico = ico.Text.ToString();
				company.dic = dic.Text.ToString();
				company.icDph = icDph.Text.ToString();
			}
			else
				company.name = company.person.getFullName();

			//company.id = 1;
			//if (Settings.Config.getCompanies().Count > 0)
			//	company.id = Settings.Config.getCompanies().LastOrDefault(x => x.id > 0).id + 1;

			//order.id = 1;
			//if (Settings.Config.getOrders().Count > 0)
			//	order.id = Settings.Config.getOrders().LastOrDefault(x => x.id > 0).id + 1;

			order.company = company;
			//Settings.Config.getCompanies().Add(company);
			//Settings.Config.getOrders().Add(order);
			Settings.Config.setTempOrder(order);
			onCreatedOrder(new EventArgs());
		}