private void LoadRecord() { Int32 iID = Convert.ToInt32(Common.Decrypt(Request.QueryString["id"], Session.SessionID)); Data.Unit clsUnit = new Data.Unit(); Data.UnitDetails clsDetails = clsUnit.Details(iID); clsUnit.CommitAndDispose(); lblUnitID.Text = clsDetails.UnitID.ToString(); txtUnitCode.Text = clsDetails.UnitCode; txtUnitName.Text = clsDetails.UnitName; }
private void SaveRecord() { Data.Unit clsUnit = new Data.Unit(); Data.UnitDetails clsDetails = new Data.UnitDetails(); clsDetails.UnitID = Convert.ToInt16(lblUnitID.Text); clsDetails.UnitCode = txtUnitCode.Text; clsDetails.UnitName = txtUnitName.Text; clsUnit.Update(clsDetails); clsUnit.CommitAndDispose(); }
private Int32 SaveRecord() { Data.UnitDetails clsDetails = new Data.UnitDetails(); clsDetails.UnitCode = txtUnitCode.Text; clsDetails.UnitName = txtUnitName.Text; Data.Unit clsUnit = new Data.Unit(); int id = clsUnit.Insert(clsDetails); clsUnit.CommitAndDispose(); return(id); }
private Int32 SaveRecord() { Data.UnitDetails clsDetails = new Data.UnitDetails(); clsDetails.UnitCode = txtUnitCode.Text; clsDetails.UnitName = txtUnitName.Text; Data.Unit clsUnit = new Data.Unit(); int id = clsUnit.Insert(clsDetails); clsUnit.CommitAndDispose(); return id; }