コード例 #1
0
 public int UpdatePattiIn(PattiIn piObj)
 {
     using (var db = new eTempleDbDB())
     {
         return(db.Update(piObj));
     }
 }
コード例 #2
0
 private void ShowPI(PattiIn piObj)
 {
     txtId.Text = piObj.Id.ToString();
     cmbServiceID.SelectedValue = piObj.ServiceId;
     numPattiNumbers.Value      = piObj.PattiNumbers;
     dtpInDate.Value            = piObj.InDate;
 }
コード例 #3
0
 public void SavePattiIn(PattiIn piObj)
 {
     using (var db = new eTempleDbDB())
     {
         db.Save(piObj);
     }
 }
コード例 #4
0
        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();
        }