예제 #1
0
 private void SavebtnClick(object sender, EventArgs e)
 {
     var data = new Sqlmanager.Dbentry { Id = _id, Name = namebox.Text, Email = emailbox.Text, Adress = adressbox.Text, Zipcode = zipbox.Text, Country = countrybox.Text, Area = areabox.Text, Office = officebox.Text, Mobile = mobilebox.Text, Home = homebox.Text, Company = companybox.Text, Other = otherbox.Text.Replace(Environment.NewLine, "\\n") };
     if(string.IsNullOrEmpty(_id))
         Main.Sql.AddContact(data);
     else {
         Main.Sql.UpdContact(data);
         Main.ShowLast(true, _id);
     }
     _id = "";
 }
예제 #2
0
파일: AddForm.cs 프로젝트: DevEase/Random
        private void SavebtnClick(object sender, EventArgs e)
        {
            var data = new Sqlmanager.Dbentry {
                Id = _id, Name = namebox.Text, Email = emailbox.Text, Adress = adressbox.Text, Zipcode = zipbox.Text, Country = countrybox.Text, Area = areabox.Text, Office = officebox.Text, Mobile = mobilebox.Text, Home = homebox.Text, Company = companybox.Text, Other = otherbox.Text.Replace(Environment.NewLine, "\\n")
            };

            if (string.IsNullOrEmpty(_id))
            {
                Main.Sql.AddContact(data);
            }
            else
            {
                Main.Sql.UpdContact(data);
                Main.ShowLast(true, _id);
            }
            _id = "";
        }