示例#1
0
        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);
            }
        }
示例#2
0
 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);
     }
 }
示例#3
0
 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);
     }
 }
示例#4
0
        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);
        }
示例#5
0
        public void Insert(int TestGroupId,string TestDataId)
        {
            TTestgroupDtl item = new TTestgroupDtl();

            item.TestGroupId = TestGroupId;

            item.TestDataId = TestDataId;

            item.Save(UserName);
        }