Ejemplo n.º 1
0
 private void grdTestType_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         if (grdTestType.CurrentRow.IsChecked)
         {
             LUserTestType obj = new LUserTestType();
             obj.UserName   = Utility.sDbnull(grdUser.GetValue("PK_sUID"));
             obj.TestTypeId = Utility.Int32Dbnull(grdTestType.GetValue("TestType_ID"));
             obj.IsNew      = true;
             obj.Save();
         }
         else
         {
             new Delete().From(LUserTestType.Schema.Name).Where(LUserTestType.Columns.UserName).
             IsEqualTo(grdUser.GetValue("PK_sUID")).And(LUserTestType.Columns.TestTypeId).
             IsEqualTo(grdTestType.GetValue("TestType_ID")).Execute();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
Ejemplo n.º 2
0
 private void grdTestType_RowCheckStateChanged(object sender, RowCheckStateChangeEventArgs e)
 {
     try
     {
         if (grdTestType.CurrentRow.IsChecked)
         {
             LUserTestType obj = new LUserTestType();
             obj.UserName = Utility.sDbnull(grdUser.GetValue("PK_sUID"));
             obj.TestTypeId = Utility.Int32Dbnull(grdTestType.GetValue("TestType_ID"));
             obj.IsNew = true;
             obj.Save();
         }
         else
         {
             new Delete().From(LUserTestType.Schema.Name).Where(LUserTestType.Columns.UserName).
                 IsEqualTo(grdUser.GetValue("PK_sUID")).And(LUserTestType.Columns.TestTypeId).
                 IsEqualTo(grdTestType.GetValue("TestType_ID")).Execute();
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg(ex.Message);
     }
 }
Ejemplo n.º 3
0
        public void Update(string UserName,int TestTypeId)
        {
            LUserTestType item = new LUserTestType();
            item.MarkOld();
            item.IsLoaded = true;

            item.UserName = UserName;

            item.TestTypeId = TestTypeId;

            item.Save(UserName);
        }
Ejemplo n.º 4
0
        public void Insert(string UserName,int TestTypeId)
        {
            LUserTestType item = new LUserTestType();

            item.UserName = UserName;

            item.TestTypeId = TestTypeId;

            item.Save(UserName);
        }