protected void SaveInfo() { HandlingPackaging_Info info = new HandlingPackaging_Info(int.Parse(txtKey.Text)); info.Datetime = DateTime.ParseExact(txtDatetime.Text, "dd/MM/yyyy", CultureInfo.InvariantCulture); info.Type = txtType.Text; info.Place = txtPlace.Text; info.Treatment = txtTreatment.Text; info.MemberKey = Convert.ToInt16(Session["EmployeeKey"]); info.Save(); }
protected void LoadInfo(int Key) { HandlingPackaging_Info info = new HandlingPackaging_Info(Key); if (Key == 0) { DateTime time = DateTime.Now; txtDatetime.Text = time.ToString("dd/MM/yyyy"); } else { txtDatetime.Text = info.Datetime.ToString("dd/MM/yyyy"); } txtType.Text = info.Type; txtPlace.Text = info.Place; txtTreatment.Text = info.Treatment; }