コード例 #1
0
 private void RaiseSuccessEventHander(DIC_RELIGION item)
 {
     if (this.Success != null)
     {
         this.Success(this, item);
     }
 }
コード例 #2
0
 public void RaiseUpdatedEventHander(DIC_RELIGION Item)
 {
     if (this.Updated != null)
     {
         this.Updated(this, Item);
     }
 }
コード例 #3
0
 public override void Change()
 {
     if (!(MyRule.Get(MyLogin.RoleId, "bbiReligion") != "OK"))
     {
         if (MyRule.AllowAccess)
         {
             DIC_RELIGION dICRELIGION = new DIC_RELIGION();
             object       cellValue   = base.GetCellValue(this.m_RowClickEventArgs.RowIndex, "ReligionCode");
             if (cellValue != null)
             {
                 base.SetWaitDialogCaption("Đang kiểm tra dữ liệu....");
                 if (!(dICRELIGION.Get(cellValue.ToString()) != "OK"))
                 {
                     this.DoHide();
                     xfmReligionAdd _xfmReligionAdd = new xfmReligionAdd(Actions.Update, dICRELIGION);
                     _xfmReligionAdd.Updated += new xfmReligionAdd.UpdatedEventHander(this.frm_Updated);
                     _xfmReligionAdd.Added   += new xfmReligionAdd.AddedEventHander(this.frm_Added);
                     _xfmReligionAdd.ShowDialog();
                 }
                 else
                 {
                     this.DoHide();
                     XtraMessageBox.Show("Dữ liệu không tồn tại", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                 }
             }
         }
         else
         {
             MyRule.Notify();
         }
     }
 }
コード例 #4
0
ファイル: frm_TON_GIAO_EDIT.cs プロジェクト: ds-v-bui/tho
        private bool Insert()
        {
            new_entity = new DIC_RELIGION();
            new_entity.ReligionCode = txt_RELIGION_CODE.Text;
            new_entity.ReligionName = txt_RELIGION_NAME.Text;
            new_entity.Description  = txt_DESCRIPTION.Text;
            //new_entity.IsManager = chk_IS_MANAGER.Checked;
            new_entity.Active = true;
            ENT_RETURN validate = LOGIC_CHECK.Check_Data(new_entity);

            if (validate.Status)
            {
                DAO_DIC_RELIGION.Add(new_entity);
                if (parent != null)
                {
                    parent.dg_DATA.DataSource = DAO_DIC_RELIGION.Get_Data();
                }
            }
            else
            {
                XtraMessageBox.Show(validate.Message, "Lỗi..!!!!");
                return(false);
            }
            return(true);
        }
コード例 #5
0
 private void RaiseItemSelectedEventHander(DIC_RELIGION item)
 {
     if (this.ItemSelected != null)
     {
         this.ItemSelected(this, item);
     }
 }
コード例 #6
0
        public static ENT_RETURN Check_Data(DIC_RELIGION e)
        {
            ENT_RETURN ret     = new ENT_RETURN();
            string     err_msg = string.Empty;

            // BEGIN CHECK
            if (Is_Empty_String(e.ReligionName))
            {
                err_msg += GLOBAL.err_code["E016"];
            }
            if (Is_Over_MaxLength(e.ReligionName, 100))
            {
                err_msg += GLOBAL.err_code["E017"];
            }
            if (Is_Over_MaxLength(e.Description, 200))
            {
                err_msg += GLOBAL.err_code["E003"];
            }
            // END CHECK
            if (err_msg != string.Empty)
            {
                ret.Message = err_msg;
                ret.Status  = false;
            }
            return(ret);
        }
コード例 #7
0
        protected override string uc_Save()
        {
            string str;

            if (MyRule.Get(MyLogin.RoleId, "bbiReligion") != "OK")
            {
                str = "";
            }
            else if (MyRule.AllowAdd)
            {
                //  SYS_LOG.Insert("Danh Mục Tôn Giáo", "Thêm", this.txtID.Text);
                base.SetWaitDialogCaption("Đang lưu dữ liệu...");
                Cursor.Current = Cursors.WaitCursor;
                DIC_RELIGION dICRELIGION = new DIC_RELIGION(this.txtID.Text, this.txtNAME.Text, this.txtDescription.Text, this.chxUse.Checked);
                string       str1        = dICRELIGION.Insert();
                if (str1 == "OK")
                {
                    this.RaiseSuccessEventHander(dICRELIGION);
                }
                Cursor.Current = Cursors.Default;
                this.DoHide();
                if (str1 != "OK")
                {
                    XtraMessageBox.Show(str1, "Cảnh Báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                str = str1;
            }
            else
            {
                MyRule.Notify();
                str = "";
            }
            return(str);
        }
コード例 #8
0
        protected override void Add()
        {
            base.Add();
            DIC_RELIGION dICRELIGION = new DIC_RELIGION();

            this.txtID.Text = dICRELIGION.NewID();
            this.txtNAME.Focus();
        }
コード例 #9
0
ファイル: frm_TON_GIAO_EDIT.cs プロジェクト: ds-v-bui/tho
 private void frm_EDIT_Load(object sender, EventArgs e)
 {
     old_entity = new DIC_RELIGION();
     old_entity.ReligionCode = CODE;
     old_entity             = DAO_DIC_RELIGION.Select_Record(old_entity);
     txt_RELIGION_CODE.Text = old_entity.ReligionCode;
     txt_RELIGION_NAME.Text = old_entity.ReligionName;
     txt_DESCRIPTION.Text   = old_entity.Description;
 }
コード例 #10
0
        public xfmReligionAdd(Actions Action)
        {
            this.InitializeComponent();
            this.Init();
            this.ucAdd.Status = Action;
            DIC_RELIGION dICRELIGION = new DIC_RELIGION();

            this.ucAdd.SetData(dICRELIGION.NewID());
            this.Text = "Thêm";
        }
コード例 #11
0
        private void UpdateRow(DIC_RELIGION item, RowClickEventArgs e)
        {
            AdvBandedGridView advBandedGridView = this.gbList;
            int rowIndex = e.RowIndex;

            advBandedGridView.SetRowCellValue(rowIndex, "Active", item.Active);
            advBandedGridView.SetRowCellValue(rowIndex, "ReligionCode", item.ReligionCode);
            advBandedGridView.SetRowCellValue(rowIndex, "ReligionName", item.ReligionName);
            advBandedGridView.SetRowCellValue(rowIndex, "Description", item.Description);
            advBandedGridView.UpdateCurrentRow();
        }
コード例 #12
0
 public void SetData(DIC_RELIGION item)
 {
     this.txtID.Text = item.ReligionCode;
     //  SYS_LOG.Insert("Danh Mục Tôn Giáo", "Xem", this.txtID.Text);
     if (this.m_Status == Actions.Update)
     {
         this.txtID.Properties.ReadOnly = true;
     }
     this.txtNAME.Text        = item.ReligionName;
     this.txtDescription.Text = item.Description;
     this.chxUse.Checked      = item.Active;
 }
コード例 #13
0
        private void AddRow(DIC_RELIGION Item)
        {
            AdvBandedGridView advBandedGridView = this.gbList;
            int focusedRowHandle = advBandedGridView.FocusedRowHandle;

            advBandedGridView.AddNewRow();
            focusedRowHandle = advBandedGridView.FocusedRowHandle;
            advBandedGridView.SetRowCellValue(focusedRowHandle, "Active", Item.Active);
            advBandedGridView.SetRowCellValue(focusedRowHandle, "ReligionCode", Item.ReligionCode);
            advBandedGridView.SetRowCellValue(focusedRowHandle, "ReligionName", Item.ReligionName);
            advBandedGridView.SetRowCellValue(focusedRowHandle, "Description", Item.Description);
            advBandedGridView.UpdateCurrentRow();
        }
コード例 #14
0
        protected override string uc_Delete()
        {
            DIC_RELIGION dICRELIGION = new DIC_RELIGION()
            {
                ReligionCode = this.txtID.Text
            };
            string str = dICRELIGION.Delete();

            if (str == "OK")
            {
                this.RaiseSuccessEventHander(dICRELIGION);
            }
            return(str);
        }
コード例 #15
0
 public xfmReligionAdd(Actions Action, DIC_RELIGION Item)
 {
     this.InitializeComponent();
     this.Init();
     this.ucAdd.Status = Action;
     if (Action == Actions.Update)
     {
         this.ucAdd.SetData(Item);
         this.Text = "Cập nhật";
     }
     else if (Action == Actions.Delete)
     {
         this.ucAdd.SetData(Item.ReligionCode);
     }
 }
コード例 #16
0
 private void ucAdd_Success(object sender, DIC_RELIGION Item)
 {
     if (this.ucAdd.Status == Actions.Add)
     {
         this.RaiseAddedEventHander(Item);
     }
     else if (this.ucAdd.Status == Actions.Update)
     {
         this.RaiseUpdatedEventHander(Item);
     }
     if (this.ucAdd.IsClose == CloseOrNew.Close)
     {
         base.Close();
     }
     this.ucAdd.Clear();
 }
コード例 #17
0
ファイル: DAO_DIC_RELIGION.cs プロジェクト: ds-v-bui/tho
        public static DIC_RELIGION Select_Record(DIC_RELIGION clsDIC_RELIGIONPara)
        {
            DIC_RELIGION  clsDIC_RELIGION = new DIC_RELIGION();
            SqlConnection connection      = DAO_BASE.Get_Connection();
            string        selectStatement
                = "SELECT "
                  + "     [ReligionCode] "
                  + "    ,[ReligionName] "
                  + "    ,[Description] "
                  + "    ,[Active] "
                  + "FROM "
                  + "     [DIC_RELIGION] "
                  + "WHERE "
                  + "     [ReligionCode] = @ReligionCode "
                  + "";
            SqlCommand selectCommand = new SqlCommand(selectStatement, connection);

            selectCommand.CommandType = CommandType.Text;
            selectCommand.Parameters.AddWithValue("@ReligionCode", clsDIC_RELIGIONPara.ReligionCode);
            try
            {
                connection.Open();
                SqlDataReader reader
                    = selectCommand.ExecuteReader(CommandBehavior.SingleRow);
                if (reader.Read())
                {
                    clsDIC_RELIGION.ReligionCode = System.Convert.ToString(reader["ReligionCode"]);
                    clsDIC_RELIGION.ReligionName = reader["ReligionName"] is DBNull ? null : reader["ReligionName"].ToString();
                    clsDIC_RELIGION.Description  = reader["Description"] is DBNull ? null : reader["Description"].ToString();
                    clsDIC_RELIGION.Active       = reader["Active"] is DBNull ? null : (Boolean?)reader["Active"];
                }
                else
                {
                    clsDIC_RELIGION = null;
                }
                reader.Close();
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            finally
            {
                connection.Close();
            }
            return(clsDIC_RELIGION);
        }
コード例 #18
0
        private void txtID_KeyDown(object sender, KeyEventArgs e)
        {
            TextEdit textEdit = (TextEdit)sender;

            if (e.KeyCode == Keys.Return | e.KeyCode == Keys.Tab)
            {
                DIC_RELIGION dICRELIGION = new DIC_RELIGION();
                if (this.m_Status == Actions.Add)
                {
                    if (dICRELIGION.Exist(textEdit.Text))
                    {
                        this.Err.SetError(textEdit, "Mã đã tồn tại.");
                        textEdit.Focus();
                    }
                }
            }
        }
コード例 #19
0
ファイル: frm_TON_GIAO_EDIT.cs プロジェクト: ds-v-bui/tho
        private void btn_SAVE_Click(object sender, EventArgs e)
        {
            new_entity = new DIC_RELIGION();
            new_entity.ReligionCode = txt_RELIGION_CODE.Text;
            new_entity.ReligionName = txt_RELIGION_NAME.Text;
            new_entity.Description  = txt_DESCRIPTION.Text;
            new_entity.Active       = old_entity.Active;
            ENT_RETURN validate = LOGIC_CHECK.Check_Data(new_entity);

            if (validate.Status)
            {
                DAO_DIC_RELIGION.Update(old_entity, new_entity);

                this.DialogResult = DialogResult.OK;
            }
            else
            {
                XtraMessageBox.Show(validate.Message, "Lỗi..!!!!");
            }
        }
コード例 #20
0
        public override void ReLoad()
        {
            base.SetWaitDialogCaption("Đang nạp dữ liệu...");
            DIC_RELIGION dICRELIGION = new DIC_RELIGION();

            this.gcList.DataSource = dICRELIGION.GetList();
            base.SetWaitDialogCaption("Đang nạp cấu hình...");
            this.List_Init(this.gbList);
            base.SetWaitDialogCaption("Nạp quyền sử dụng...");
            MyRule.Get(MyLogin.RoleId, "bbiReligion");
            if (!MyRule.AllowPrint)
            {
                this.ucToolBar.bbiPrint.Visibility = BarItemVisibility.Never;
            }
            MyRule.Get(MyLogin.RoleId, "bbiReligion");
            if (!MyRule.AllowExport)
            {
                this.ucToolBar.bbiExport.Visibility = BarItemVisibility.Never;
            }
            MyRule.Get(MyLogin.RoleId, "bbiReligion");
            if (!MyRule.AllowAdd)
            {
                this.ucToolBar.bbiAdd.Visibility = BarItemVisibility.Never;
            }
            MyRule.Get(MyLogin.RoleId, "bbiReligion");
            if (!MyRule.AllowDelete)
            {
                this.ucToolBar.bbiDelete.Visibility = BarItemVisibility.Never;
            }
            MyRule.Get(MyLogin.RoleId, "bbiReligion");
            if (!MyRule.AllowEdit)
            {
                this.ucToolBar.bbiEdit.Visibility = BarItemVisibility.Never;
            }
            base.SetWaitDialogCaption("Đã xong...");
            this.DoHide();
        }
コード例 #21
0
ファイル: DAO_DIC_RELIGION.cs プロジェクト: ds-v-bui/tho
        public static bool Add(DIC_RELIGION clsDIC_RELIGION)
        {
            SqlConnection connection = DAO_BASE.Get_Connection();
            string        insertStatement
                = "INSERT "
                  + "     [DIC_RELIGION] "
                  + "     ( "
                  + "     [ReligionCode] "
                  + "    ,[ReligionName] "
                  + "    ,[Description] "
                  + "    ,[Active] "
                  + "     ) "
                  + "VALUES "
                  + "     ( "
                  + "     @ReligionCode "
                  + "    ,@ReligionName "
                  + "    ,@Description "
                  + "    ,@Active "
                  + "     ) "
                  + "";
            SqlCommand insertCommand = new SqlCommand(insertStatement, connection);

            insertCommand.CommandType = CommandType.Text;
            insertCommand.Parameters.AddWithValue("@ReligionCode", clsDIC_RELIGION.ReligionCode);
            if (clsDIC_RELIGION.ReligionName != null)
            {
                insertCommand.Parameters.AddWithValue("@ReligionName", clsDIC_RELIGION.ReligionName);
            }
            else
            {
                insertCommand.Parameters.AddWithValue("@ReligionName", DBNull.Value);
            }
            if (clsDIC_RELIGION.Description != null)
            {
                insertCommand.Parameters.AddWithValue("@Description", clsDIC_RELIGION.Description);
            }
            else
            {
                insertCommand.Parameters.AddWithValue("@Description", DBNull.Value);
            }
            if (clsDIC_RELIGION.Active.HasValue == true)
            {
                insertCommand.Parameters.AddWithValue("@Active", clsDIC_RELIGION.Active);
            }
            else
            {
                insertCommand.Parameters.AddWithValue("@Active", DBNull.Value);
            }
            try
            {
                connection.Open();
                int count = insertCommand.ExecuteNonQuery();
                if (count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            finally
            {
                connection.Close();
            }
        }
コード例 #22
0
ファイル: DAO_DIC_RELIGION.cs プロジェクト: ds-v-bui/tho
        public static bool Delete(DIC_RELIGION clsDIC_RELIGION)
        {
            SqlConnection connection = DAO_BASE.Get_Connection();
            string        deleteStatement
                = "DELETE FROM "
                  + "     [DIC_RELIGION] "
                  + "WHERE "
                  + "     [ReligionCode] = @OldReligionCode "
                  + " AND ((@OldReligionName IS NULL AND [ReligionName] IS NULL) OR [ReligionName] = @OldReligionName) "
                  + " AND ((@OldDescription IS NULL AND [Description] IS NULL) OR [Description] = @OldDescription) "
                  + " AND ((@OldActive IS NULL AND [Active] IS NULL) OR [Active] = @OldActive) "
                  + "";
            SqlCommand deleteCommand = new SqlCommand(deleteStatement, connection);

            deleteCommand.CommandType = CommandType.Text;
            deleteCommand.Parameters.AddWithValue("@OldReligionCode", clsDIC_RELIGION.ReligionCode);
            if (clsDIC_RELIGION.ReligionName != null)
            {
                deleteCommand.Parameters.AddWithValue("@OldReligionName", clsDIC_RELIGION.ReligionName);
            }
            else
            {
                deleteCommand.Parameters.AddWithValue("@OldReligionName", DBNull.Value);
            }
            if (clsDIC_RELIGION.Description != null)
            {
                deleteCommand.Parameters.AddWithValue("@OldDescription", clsDIC_RELIGION.Description);
            }
            else
            {
                deleteCommand.Parameters.AddWithValue("@OldDescription", DBNull.Value);
            }
            if (clsDIC_RELIGION.Active.HasValue == true)
            {
                deleteCommand.Parameters.AddWithValue("@OldActive", clsDIC_RELIGION.Active);
            }
            else
            {
                deleteCommand.Parameters.AddWithValue("@OldActive", DBNull.Value);
            }
            try
            {
                connection.Open();
                int count = deleteCommand.ExecuteNonQuery();
                if (count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            finally
            {
                connection.Close();
            }
        }
コード例 #23
0
ファイル: DAO_DIC_RELIGION.cs プロジェクト: ds-v-bui/tho
        public static bool Update(DIC_RELIGION oldDIC_RELIGION,
                                  DIC_RELIGION newDIC_RELIGION)
        {
            SqlConnection connection = DAO_BASE.Get_Connection();
            string        updateStatement
                = "UPDATE "
                  + "     [DIC_RELIGION] "
                  + "SET "
                  + "     [ReligionCode] = @NewReligionCode "
                  + "    ,[ReligionName] = @NewReligionName "
                  + "    ,[Description] = @NewDescription "
                  + "    ,[Active] = @NewActive "
                  + "WHERE "
                  + "     [ReligionCode] = @OldReligionCode "
                  + " AND ((@OldReligionName IS NULL AND [ReligionName] IS NULL) OR [ReligionName] = @OldReligionName) "
                  + " AND ((@OldDescription IS NULL AND [Description] IS NULL) OR [Description] = @OldDescription) "
                  + " AND ((@OldActive IS NULL AND [Active] IS NULL) OR [Active] = @OldActive) "
                  + "";
            SqlCommand updateCommand = new SqlCommand(updateStatement, connection);

            updateCommand.CommandType = CommandType.Text;
            updateCommand.Parameters.AddWithValue("@NewReligionCode", newDIC_RELIGION.ReligionCode);
            if (newDIC_RELIGION.ReligionName != null)
            {
                updateCommand.Parameters.AddWithValue("@NewReligionName", newDIC_RELIGION.ReligionName);
            }
            else
            {
                updateCommand.Parameters.AddWithValue("@NewReligionName", DBNull.Value);
            }
            if (newDIC_RELIGION.Description != null)
            {
                updateCommand.Parameters.AddWithValue("@NewDescription", newDIC_RELIGION.Description);
            }
            else
            {
                updateCommand.Parameters.AddWithValue("@NewDescription", DBNull.Value);
            }
            if (newDIC_RELIGION.Active.HasValue == true)
            {
                updateCommand.Parameters.AddWithValue("@NewActive", newDIC_RELIGION.Active);
            }
            else
            {
                updateCommand.Parameters.AddWithValue("@NewActive", DBNull.Value);
            }
            updateCommand.Parameters.AddWithValue("@OldReligionCode", oldDIC_RELIGION.ReligionCode);
            if (oldDIC_RELIGION.ReligionName != null)
            {
                updateCommand.Parameters.AddWithValue("@OldReligionName", oldDIC_RELIGION.ReligionName);
            }
            else
            {
                updateCommand.Parameters.AddWithValue("@OldReligionName", DBNull.Value);
            }
            if (oldDIC_RELIGION.Description != null)
            {
                updateCommand.Parameters.AddWithValue("@OldDescription", oldDIC_RELIGION.Description);
            }
            else
            {
                updateCommand.Parameters.AddWithValue("@OldDescription", DBNull.Value);
            }
            if (oldDIC_RELIGION.Active.HasValue == true)
            {
                updateCommand.Parameters.AddWithValue("@OldActive", oldDIC_RELIGION.Active);
            }
            else
            {
                updateCommand.Parameters.AddWithValue("@OldActive", DBNull.Value);
            }
            try
            {
                connection.Open();
                int count = updateCommand.ExecuteNonQuery();
                if (count > 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (SqlException ex)
            {
                throw ex;
            }
            finally
            {
                connection.Close();
            }
        }
コード例 #24
0
 private void frm_Added(object sender, DIC_RELIGION e)
 {
     this.AddRow(e);
 }
コード例 #25
0
 private void frm_Updated(object sender, DIC_RELIGION Item)
 {
     this.UpdateRow(Item, this.m_RowClickEventArgs);
 }
コード例 #26
0
        public override void Delete()
        {
            object cellValue;

            if (!(MyRule.Get(MyLogin.RoleId, "bbiReligion") != "OK"))
            {
                if (MyRule.AllowDelete)
                {
                    if (ClsOption.System2.IsQuestion)
                    {
                        if (XtraMessageBox.Show("Bạn có muốn xóa không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
                        {
                            return;
                        }
                    }
                    base.SetWaitDialogCaption("Đang xóa...");
                    string            str  = "";
                    bool              flag = false;
                    AdvBandedGridView advBandedGridView = this.gbList;
                    int[]             selectedRows      = advBandedGridView.GetSelectedRows();
                    DIC_RELIGION      dICRELIGION       = new DIC_RELIGION();
                    for (int i = (int)selectedRows.Length; i > 0; i--)
                    {
                        flag      = true;
                        cellValue = base.GetCellValue(selectedRows[i - 1], "ReligionCode");
                        if (cellValue != null)
                        {
                            //  SYS_LOG.Insert("Danh Mục Tôn Giáo", "Xoá", cellValue.ToString());
                            str = dICRELIGION.Delete(cellValue.ToString());
                            if (str == "OK")
                            {
                                advBandedGridView.DeleteRow(selectedRows[i - 1]);
                            }
                            else if (str != "OK")
                            {
                                MessageBox.Show(string.Concat("Thông tin không được xóa\n", str), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                            }
                        }
                    }
                    this.DoHide();
                    if (!flag)
                    {
                        if (advBandedGridView.DataSource != null)
                        {
                            RowClickEventArgs rowClickEventArg = new RowClickEventArgs((advBandedGridView == null ? -1 : advBandedGridView.FocusedRowHandle), (advBandedGridView.FocusedColumn == null ? -1 : advBandedGridView.FocusedColumn.ColumnHandle), (advBandedGridView.FocusedColumn == null ? "" : advBandedGridView.FocusedColumn.FieldName));
                            this.m_RowClickEventArgs = rowClickEventArg;
                            cellValue = null;
                            cellValue = base.GetCellValue(rowClickEventArg.RowIndex, "ReligionCode");
                            if (cellValue != null)
                            {
                                //   SYS_LOG.Insert("Danh Mục Tôn Giáo", "Xoá", cellValue.ToString());
                                base.SetWaitDialogCaption("Đang xóa...");
                                str = dICRELIGION.Delete(cellValue.ToString());
                                if (str == "OK")
                                {
                                    advBandedGridView.DeleteRow(rowClickEventArg.RowIndex);
                                }
                                else if (str != "OK")
                                {
                                    MessageBox.Show(string.Concat("Thông tin không được xóa\n", str), "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Hand);
                                }
                                this.DoHide();
                            }
                        }
                    }
                }
                else
                {
                    MyRule.Notify();
                }
            }
        }