Exemple #1
0
        private void metroButton2_MouseClick(object sender, MouseEventArgs e)
        {
            string paname = textBoxProjectName.Text;


            int time = Convert.ToInt32(textBoxProjectTime.Text);


            PRO news = new PRO
            {
                puser   = LoginUI.userlogged,
                ptime   = time,
                pname   = paname,
                pstatus = 0
            };

            pp.PROs.InsertOnSubmit(news);

            try
            {
                pp.SubmitChanges();
                MessageBox.Show("Add Done");
                textBoxProjectName.Text = "";
                textBoxProjectTime.Text = "";
            }
            catch (Exception re)
            {
                //Debug.WriteLine(re);
                MessageBox.Show(re.ToString());
            }
        }
 private void detach_PROs(PRO entity)
 {
     this.SendPropertyChanging();
     entity.user = null;
 }
 private void attach_PROs(PRO entity)
 {
     this.SendPropertyChanging();
     entity.user = this;
 }
 partial void DeletePRO(PRO instance);
 partial void UpdatePRO(PRO instance);
 partial void InsertPRO(PRO instance);