/// <summary>
 /// Determines whether [is account type matrix entered] [the specified item id].
 /// </summary>
 /// <param name="itemId">The item id.</param>
 /// <returns>
 ///   <c>true</c> if [is account type matrix entered] [the specified item id]; otherwise, <c>false</c>.
 /// </returns>
 public static bool IsAccountTypeMatrixEntered(int itemId)
 {
     var query = HCMIS.Repository.Queries.ItemActivity.SelectIsAccountTypeMatrixEntered(itemId);
     BLL.ItemActivity strItemActivity = new ItemActivity();
     strItemActivity.LoadFromRawSql(query);
     if (int.Parse(strItemActivity.GetColumn("Total").ToString()) > 0)
         return true;
     else
         return false;
 }
Example #2
0
        /// <summary>
        /// Determines whether [is account type matrix entered] [the specified item id].
        /// </summary>
        /// <param name="itemId">The item id.</param>
        /// <returns>
        ///   <c>true</c> if [is account type matrix entered] [the specified item id]; otherwise, <c>false</c>.
        /// </returns>
        public static bool IsAccountTypeMatrixEntered(int itemId)
        {
            var query = HCMIS.Repository.Queries.ItemActivity.SelectIsAccountTypeMatrixEntered(itemId);

            BLL.ItemActivity strItemActivity = new ItemActivity();
            strItemActivity.LoadFromRawSql(query);
            if (int.Parse(strItemActivity.GetColumn("Total").ToString()) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
 private void chkUsedInThisAccountType_CheckedChanged(object sender, EventArgs e)
 {
     DataRow dr = gridViewStoreItemMatrix.GetFocusedDataRow();
     int ID = int.Parse(dr["ID"].ToString());
     BLL.ItemActivity itemActivity = new ItemActivity();
     itemActivity.LoadByPrimaryKey(ID);
     itemActivity.UsedInThisStore = !itemActivity.UsedInThisStore;
     itemActivity.Save();
 }