Пример #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());
            }
        }
Пример #2
0
 private void detach_PROs(PRO entity)
 {
     this.SendPropertyChanging();
     entity.user = null;
 }
Пример #3
0
 private void attach_PROs(PRO entity)
 {
     this.SendPropertyChanging();
     entity.user = this;
 }
Пример #4
0
 partial void DeletePRO(PRO instance);
Пример #5
0
 partial void UpdatePRO(PRO instance);
Пример #6
0
 partial void InsertPRO(PRO instance);