private void LoadData() { cboTestType.Enabled = TTestgroupDtl.CreateQuery().WHERE(TTestgroupDtl.Columns.TestGroupId, Utility.Int32Dbnull(txtID.Text)). GetRecordCount() <= 0; TTestgroupList obj = TTestgroupList.FetchByID(Utility.Int32Dbnull(txtID.Text)); if (obj != null) { txtName.Text = Utility.sDbnull(obj.TestGroupName, ""); cboTestType.SelectedValue = Utility.Int32Dbnull(obj.TestTypeId, -1); } }
private void grdTestData_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e) { try { if (grdTestData.CurrentRow.IsChecked) { TTestgroupDtl obj = new TTestgroupDtl(); obj.TestGroupId = Utility.Int32Dbnull(grdTestGroup.GetValue("TestGroup_ID")); obj.TestDataId = Utility.sDbnull(grdTestData.GetValue("TestData_ID")); obj.IsNew = true; obj.Save(); } else { new Delete().From(TTestgroupDtl.Schema.Name).Where(TTestgroupDtl.Columns.TestGroupId). IsEqualTo(grdTestGroup.GetValue("TestGroup_ID")).And(TTestgroupDtl.Columns.TestDataId). IsEqualTo(grdTestData.GetValue("TestData_ID")).Execute(); } } catch (Exception ex) { Utility.ShowMsg(ex.Message); } }
public void Update(int TestGroupId,string TestDataId) { TTestgroupDtl item = new TTestgroupDtl(); item.MarkOld(); item.IsLoaded = true; item.TestGroupId = TestGroupId; item.TestDataId = TestDataId; item.Save(UserName); }
public void Insert(int TestGroupId,string TestDataId) { TTestgroupDtl item = new TTestgroupDtl(); item.TestGroupId = TestGroupId; item.TestDataId = TestDataId; item.Save(UserName); }