public int UpdatePattiIn(PattiIn piObj) { using (var db = new eTempleDbDB()) { return(db.Update(piObj)); } }
private void ShowPI(PattiIn piObj) { txtId.Text = piObj.Id.ToString(); cmbServiceID.SelectedValue = piObj.ServiceId; numPattiNumbers.Value = piObj.PattiNumbers; dtpInDate.Value = piObj.InDate; }
public void SavePattiIn(PattiIn piObj) { using (var db = new eTempleDbDB()) { db.Save(piObj); } }
private void btnSubmit_Click(object sender, EventArgs e) { int piId = 0; int.TryParse(txtId.Text, out piId); var piObj = new PattiIn { Id = piId, ServiceId = (cmbServiceID.SelectedItem as Service).Id, PattiNumbers = Convert.ToInt32(numPattiNumbers.Text), InDate = Convert.ToDateTime(dtpInDate.Value), EnteredOn = DateTime.Now, EnteredBy = 1 }; var piDao = new PattiInDao(); piDao.SavePattiIn(piObj); ShowPattiIn(); }