public static Object ConvertMaskValue(Object PDefaultValue) { Object value; switch (PDefaultValue.ToString()) { case "@CompanyId": value = ISecurityHandler.CompanyId; break; case "@SecurityUserId": value = ISecurityHandler.SecurityUserId; break; case "@Date": ITransactionHandler VTransactionHandler = new ITransactionHandler(); DataTable VDataTable = new DataTable(); try { VTransactionHandler.LoadData("SELECT GETDATE() AS CurrentDate", ref VDataTable, null); value = VDataTable.Rows[0][0].ToString(); } finally { VDataTable.Dispose(); } break; case "@CurrentMonthFrom": value = IDateHandler.CurrentMonth(true).ToString("MM'/'dd'/'yyyy"); break; case "@CurrentMonthTo": value = IDateHandler.CurrentMonth(false).ToString("MM'/'dd'/'yyyy"); break; default: value = PDefaultValue; break; } return(value); }