Exemple #1
0
        public override BaseActionResult Execute(Context context)
        {
            DataSetActionResult dsAr = new DataSetActionResult();

            dsAr.DataSetData = new DataSet();
            try
            {
                switch (context.MessageName.Trim())
                {
                case "GetAllNotesInDB":
                    string userId   = CommonGlobalSettings.Utilities.GetParameter("UserGuid", context.Parameters);
                    string roleName = CommonGlobalSettings.Utilities.GetParameter("Role", context.Parameters);
                    return(GetAllNotesInDB(userId, roleName));

                case "GetBillBoardDictionaryData":
                    return(GetBillBoardDictionaryData());

                default:
                {
                    dsAr.ReturnMessage = null;
                    dsAr.Result        = false;
                    return(dsAr);
                }
                }
            }
            catch (Exception e)
            {
                logger.Error((long)ModuleEnum.Framework_WS, ModuleInstanceName.Framework, 1, e.Message, Application.StartupPath.ToString(),
                             (new System.Diagnostics.StackFrame(true)).GetFileName(),
                             Convert.ToInt32(new System.Diagnostics.StackFrame(true).GetFileLineNumber().ToString()));
                dsAr.ReturnMessage = null;
                dsAr.Result        = false;
                return(dsAr);
            }
        }
Exemple #2
0
        public override BaseActionResult Execute(Context context)
        {
            BaseActionResult bar = new BaseActionResult();

            try
            {
                switch (context.MessageName)
                {
                case "About_VersionThanks":
                {
                    ArrayActionResult result = new ArrayActionResult();
                    bar = result as BaseActionResult;

                    AboutBusiness.GetAboutInfo(result);
                }
                break;

                default:
                    break;
                }
            }
            catch (Exception ex)
            {
                bar.ReturnMessage = ex.Message;
                bar.Result        = false;
                bar.recode        = -1;

                lm.Error((long)ModuleEnum.Framework_Client, ModuleInstanceName.Framework, 53, ex.Message, Application.StartupPath.ToString(), (new System.Diagnostics.StackFrame(true)).GetFileName(),
                         (new System.Diagnostics.StackFrame(true)).GetFileLineNumber());
            }
            return(bar);
        }
Exemple #3
0
        public override BaseActionResult Execute(Context context)
        {
            DataSetActionResult dsAr = new DataSetActionResult();

            dsAr.DataSetData = new DataSet();
            try
            {
                switch (context.MessageName.Trim())
                {
                case "LoadExaminTemplatesByModality":
                    return(LoadExaminTemplatesByModality(context.Parameters));

                case "AddExaminTemplate":
                    return(AddExaminTemplate(context.Model as ExaminTemplateModel));

                case "EditExaminTemplate":
                    return(EditExaminTemplate(context.Model as ExaminTemplateModel));

                case "DeleteExaminTemplate":
                    return(DeleteExaminTemplate(context.Parameters));

                case "LoadExaminTemplateByGuid":
                    return(LoadExaminTemplateByGuid(context.Parameters));

                case "LoadExaminTemplateByShortcut":
                    return(LoadExaminTemplateByShortcut(context.Parameters));

                case "ExistExaminShortcut":
                    return(ExistShortcut(context.Parameters));

                case "ExistExaminTemplateName":
                    return(ExistExaminTemplateName(context.Parameters));

                default:
                {
                    dsAr.ReturnMessage = null;
                    dsAr.Result        = false;
                    return(dsAr);
                }
                }
            }
            catch (Exception e)
            {
                lm.Error((long)ModuleEnum.Templates_WS, ModuleInstanceName.Templates, 1, e.Message, Application.StartupPath.ToString(),
                         (new System.Diagnostics.StackFrame(true)).GetFileName(),
                         Convert.ToInt32(new System.Diagnostics.StackFrame(true).GetFileLineNumber().ToString()));
                dsAr.ReturnMessage = null;
                dsAr.Result        = false;
                return(dsAr);
            }
        }
Exemple #4
0
        public override bool AddNewLeafNode(string strItemGuid, string strParentID, int depth, string strItemName, int itemOrder, int type, string strUserID, string strTemplateGuid, string strGender, ReportTemplateModel model)
        {
            RisDAL dataAccess = new RisDAL();

            model.CheckItemName = model.CheckItemName.Replace("'", "''");
            model.DoctorAdvice  = model.DoctorAdvice.Replace("'", "''");
            //model.TechInfo  = model.TechInfo.Replace("'", "''");
            //model.WYG = model.WYG.Replace("'", "''");
            //model.WYS = model.WYS.Replace("'", "''");
            string sql = string.Format("Insert into tReportTemplateDirec(ItemGUID,ParentID,Depth,ItemName,ItemOrder,Type,UserGuid,TemplateGuid,Leaf) values('{0}','{1}',{2},'{3}',{4},{5},'{6}','{7}',{8})"
                                       , strItemGuid, strParentID, depth, strItemName, itemOrder, type, strUserID, strTemplateGuid, 1);
            string sql1 = string.Format("Insert into tReportTemplate(TemplateGuid,TemplateName,ModalityType,BodyPart,CheckItemName,DoctorAdvice,ShortcutCode,ACRCode,ACRAnatomicDesc,ACRPathologicDesc,BodyCategory) values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}','{8}','{9}','{10}')"
                                        , strTemplateGuid, model.TemplateName, model.ModalityType, model.BodyPart, model.CheckItemName, model.DoctorAdvice, model.ShortcutCode, model.ACRCode, model.ACRAnatomicDesc, model.ACRPathologicDesc, model.BodyCategory);

            try
            {
                dataAccess.BeginTransaction();
                dataAccess.ExecuteNonQuery(sql, RisDAL.ConnectionState.KeepOpen);

                dataAccess.ExecuteNonQuery(sql1, RisDAL.ConnectionState.KeepOpen);
                byte [] byteWYS        = System.Text.Encoding.Default.GetBytes(model.WYS);
                byte [] byteWYG        = System.Text.Encoding.Default.GetBytes(model.WYG);
                byte [] byteAppendInfo = System.Text.Encoding.Default.GetBytes(model.AppendInfo);
                byte [] byteTechInfo   = System.Text.Encoding.Default.GetBytes(model.TechInfo);

                dataAccess.CommitTransaction();
                dataAccess.WriteLargeObj("tReportTemplate", "TemplateGuid", strTemplateGuid, "WYS", byteWYS, byteWYS.Length, RisDAL.ConnectionState.CloseOnExit);
                dataAccess.WriteLargeObj("tReportTemplate", "TemplateGuid", strTemplateGuid, "WYG", byteWYG, byteWYG.Length, RisDAL.ConnectionState.CloseOnExit);
                dataAccess.WriteLargeObj("tReportTemplate", "TemplateGuid", strTemplateGuid, "AppendInfo", byteAppendInfo, byteAppendInfo.Length, RisDAL.ConnectionState.CloseOnExit);
                dataAccess.WriteLargeObj("tReportTemplate", "TemplateGuid", strTemplateGuid, "TechInfo", byteTechInfo, byteTechInfo.Length, RisDAL.ConnectionState.CloseOnExit);
            }
            catch (Exception e)
            {
                lm.Error((long)ModuleEnum.Templates_DA, ModuleInstanceName.Templates, 1, e.Message, Application.StartupPath.ToString(),
                         (new System.Diagnostics.StackFrame(true)).GetFileName(),
                         Convert.ToInt32(new System.Diagnostics.StackFrame(true).GetFileLineNumber().ToString()));
                return(false);
            }
            finally
            {
                if (dataAccess != null)
                {
                    dataAccess.Dispose();
                }
            }

            return(true);
        }
Exemple #5
0
        public override BaseActionResult Execute(Context context)
        {
            BaseActionResult bar = new BaseActionResult();

            bar.Result = false;

            try
            {
                switch (context.MessageName.Trim())
                {
                case "GetCurDomain":
                    bar.ReturnString = ConfigurationManager.AppSettings["Domain"];
                    bar.Result       = true;
                    break;

                case "GetCurSite":
                    SiteBusiness sb = new SiteBusiness();
                    bar.ReturnString = sb.GetSite(ConfigurationManager.AppSettings["Site"]);
                    if (string.IsNullOrWhiteSpace(bar.ReturnString))
                    {
                        bar.ReturnString = ConfigurationManager.AppSettings["Site"];
                    }
                    bar.Result = true;
                    break;

                default:
                    bar.ReturnMessage = null;

                    break;
                }
            }
            catch (Exception e)
            {
                logger.Error((long)ModuleEnum.Framework_WS, ModuleInstanceName.Framework, 1, e.Message, Application.StartupPath.ToString(),
                             (new System.Diagnostics.StackFrame(true)).GetFileName(),
                             Convert.ToInt32(new System.Diagnostics.StackFrame(true).GetFileLineNumber().ToString()));
                bar.ReturnMessage = null;
            }
            return(bar);
        }
Exemple #6
0
        public override BaseActionResult Execute(Context context)
        {
            bar.DataSetData = new DataSet();
            try
            {
                switch (context.MessageName.Trim())
                {
                case "GetFilterSite":
                {
                    string       UserGuid     = CommonGlobalSettings.Utilities.GetParameter("UserGuid", context.Parameters);
                    string       RoleName     = CommonGlobalSettings.Utilities.GetParameter("RoleName", context.Parameters);
                    string       CurSite      = CommonGlobalSettings.Utilities.GetParameter("CurSite", context.Parameters);
                    string       MatchingName = CommonGlobalSettings.Utilities.GetParameter("MatchingName", context.Parameters);
                    SiteBusiness sb           = new SiteBusiness();
                    bar.DataSetData = sb.GetFilterSite(UserGuid, RoleName, CurSite, MatchingName);
                    bar.Result      = true;
                    break;
                }

                default:
                {
                    bar.ReturnMessage = null;
                    bar.Result        = false;
                    break;
                }
                }
            }
            catch (Exception e)
            {
                logger.Error((long)ModuleEnum.Framework_WS, ModuleInstanceName.Framework, 1, e.Message, Application.StartupPath.ToString(),
                             (new System.Diagnostics.StackFrame(true)).GetFileName(),
                             Convert.ToInt32(new System.Diagnostics.StackFrame(true).GetFileLineNumber().ToString()));
                bar.ReturnMessage = null;
                bar.Result        = false;
                return(bar);
            }
            return(bar);
        }
Exemple #7
0
        /// <summary>
        /// Error log
        /// </summary>
        /// <param name="errCode"></param>
        /// <param name="errDesc"></param>
        /// <param name="errFileName"></param>
        /// <param name="errLineNo"></param>
        public static void RISLog_Error(long errCode, string errDesc, string errFileName, long errLineNo)
        {
            if (_log == null)
            {
                _log = new LogManagerForServer(ReportCommon.ProfileName._REPORTLOGLEVEL_FORSERVER, "0400");
            }

            if (_log != null)
            {
                _log.Error(
                    System.Convert.ToInt32(ReportCommon.ModuleID.Report),
                    "Report",
                    errCode,
                    errDesc,
                    "",
                    errFileName,
                    errLineNo);
            }
            else
            {
                System.Diagnostics.Debug.Assert(false);
            }
        }
Exemple #8
0
        public override BaseActionResult Execute(Context context)
        {
            LoadImageBusiness   loadimageBusiness = new LoadImageBusiness();
            DataSetActionResult dsar = new DataSetActionResult();

            dsar.Result = false;

            try
            {
                switch (context.MessageName.Trim())
                {
                case "GetExamInfo":
                {
                    string strExamDomain = CommonGlobalSettings.Utilities.GetParameter("ExamDomain", context.Parameters);
                    string strAccNo      = CommonGlobalSettings.Utilities.GetParameter("AccNo", context.Parameters);

                    dsar.DataSetData = loadimageBusiness.GetExamInfo(strExamDomain, strAccNo);
                    dsar.Result      = true;
                }
                break;

                default:
                    dsar.ReturnMessage = null;

                    break;
                }
            }
            catch (Exception e)
            {
                logger.Error((long)ModuleEnum.Framework_WS, ModuleInstanceName.Framework, 1, e.Message, Application.StartupPath.ToString(),
                             (new System.Diagnostics.StackFrame(true)).GetFileName(),
                             Convert.ToInt32(new System.Diagnostics.StackFrame(true).GetFileLineNumber().ToString()));
                dsar.ReturnMessage = e.Message;
            }
            return(dsar);
        }
Exemple #9
0
        public override BaseActionResult Execute(Context context)
        {
            DataSetActionResult dsAr = new DataSetActionResult();

            dsAr.DataSetData = new DataSet();
            try
            {
                switch (context.MessageName.Trim())
                {
                case "GetTemplateModalityType":
                    return(GetModalityType());

                case "LoadPhraseTemplatesByModality":
                    return(LoadPhraseTemplatesByModality(context.Parameters));

                case "AddPhraseTemplate":
                    return(AddPhraseTemplate(context.Model as PhraseTemplateModel));

                case "EditPhraseTemplate":
                    return(EditPhraseTemplate(context.Model as PhraseTemplateModel));

                case "DeletePhraseTemplate":
                    return(DeletePhraseTemplate(context.Parameters));

                case "LoadPhraseTemplateByGuid":
                    return(LoadPhraseTemplateByGuid(context.Parameters));

                case "LoadPhraseTemplateByShortcut":
                    return(LoadPhraseTemplateByShortcut(context.Parameters));

                case "ExistPhraseShortcut":
                    return(ExistShortcut(context.Parameters));

                case "ExistPhraseTemplateName":
                    return(ExsitPhraseTemplateName(context.Parameters));

                case "LoadChildren":
                    return(LoadChildren(context.Parameters));

                case "UpDownNode":
                    return(UpDownNode(context.Parameters));

                case "MovePhraseLeafNode":
                    return(MovePhraseLeafNode(context.Parameters, context.UserID));

                case "CopyPhraseLeafNode":
                    return(CopyPhraseLeafNode(context.Parameters, context.UserID));

                default:
                {
                    dsAr.ReturnMessage = null;
                    dsAr.Result        = false;
                    return(dsAr);
                }
                }
            }
            catch (Exception e)
            {
                logger.Error((long)ModuleEnum.Templates_WS, ModuleInstanceName.Templates, 1, e.Message, Application.StartupPath.ToString(),
                             (new System.Diagnostics.StackFrame(true)).GetFileName(),
                             Convert.ToInt32(new System.Diagnostics.StackFrame(true).GetFileLineNumber().ToString()));
                dsAr.ReturnMessage = null;
                dsAr.Result        = false;
                return(dsAr);
            }
        }
Exemple #10
0
        public override BaseActionResult Execute(Context context)
        {
            DataSetActionResult dsAr = new DataSetActionResult();

            dsAr.DataSetData = new DataSet();
            try
            {
                switch (context.MessageName.Trim())
                {
                case "LoadPrintTemplateInfo":
                    return(LoadPrintTemplateInfo(context.Parameters));

                case "AddPrintTemplate":
                    return(AddPrintTemplate(context.Model as BaseDataSetModel));

                case "DeletePrintTemplate":
                    return(DeletePrintTemplate(context.Parameters));

                case "LoadPrintTemplateType":
                    return(LoadPrintTemplateType());

                case "LoadSubPrintTemplateInfo":
                    return(LoadSubPrintTemplateInfo(context.Parameters));

                case "SetDefault":
                    return(SetDefault(context.Parameters));

                case "LoadPrintTemplateField":
                    return(LoadPrintTemplateField(context.Parameters));

                case "ModifyPrintTemplateFieldInfo":
                    return(ModifyPrintTemplateFieldInfo(context.Model as BaseDataSetModel));

                case "ModifyPrintTemplateName":
                    return(ModifyPrintTemplateName(context.Model as BaseDataSetModel));

                case "GetLatestVersion":
                    return(GetLatestVersion(context.Parameters));

                case "IsPrintTemplateSameName":
                    return(IsPrintTemplateSameName(context.Model as BaseDataSetModel));

                case "GetDefaultPrintTemplate":
                    return(GetDefaultPrintTemplate(context.Parameters));

                case "LoadPrintTemplateByName":
                    return(LoadPrintTemplateInfoByName(context.Model as BaseDataSetModel));

                case "LoadGeneralStatType":
                    return(LoadGeneralStatType());

                case "LoadExportTemplateType":
                    return(LoadExportTemplateType());

                case "LoadSubExportTemplateInfo":
                    return(LoadSubExportTemplateInfo());

                case "LoadExportTemplateInfo":
                    return(LoadExportTemplateInfo(context.Parameters));

                case "AddExportTemplate":
                    return(AddExportTemplate(context.Model as BaseDataSetModel));

                case "ModifyExportTemplate":
                    return(ModifyExportTemplate(context.Model as BaseDataSetModel));

                case "ModifyExportTemplateInfo":
                    return(ModifyExportTemplateInfo(context.Model as BaseDataSetModel));

                case "DeleteExportTemplate":
                    return(DeleteExportTemplate(context.Parameters));

                case "GetPrintTemplateNameByGuid":
                    return(GetPrintTemplateNameByGuid(context.Parameters));

                case "GetPrintData":
                    return(GetPrintData(context.Parameters));

                default:
                {
                    dsAr.ReturnMessage = null;
                    dsAr.Result        = false;
                    return(dsAr);
                }
                }
            }
            catch (Exception e)
            {
                logger.Error((long)ModuleEnum.Templates_WS, ModuleInstanceName.Templates, 1, e.Message, Application.StartupPath.ToString(),
                             (new System.Diagnostics.StackFrame(true)).GetFileName(),
                             Convert.ToInt32(new System.Diagnostics.StackFrame(true).GetFileLineNumber().ToString()));
                dsAr.ReturnMessage = null;
                dsAr.Result        = false;
                return(dsAr);
            }
        }
Exemple #11
0
        public override BaseActionResult Execute(Context context)
        {
            DataSetActionResult dsAr = new DataSetActionResult();

            dsAr.DataSetData = new DataSet();
            try
            {
                switch (context.MessageName.Trim())
                {
                //case "AddReportTemplate":
                //    return AddReportTemplate(context.Parameters,context.Model as ReportTemplateModel);
                case "ModifyReportTemplate":
                    return(ModifyReportTemplate(context.Parameters, context.Model as ReportTemplateModel));

                case "DeleteReportTemplate":
                    return(DeleteReportTemplate(context.Parameters));

                case "GetReportTemplateByShortcut":
                    return(GetReportTemplateByShortcut(context.Parameters));

                case "GetReportTemplateByName":
                    return(GetReportTemplateByName(context.Parameters));

                case "GetReportTemplate":
                    return(GetReportTemplate(context.Parameters));

                case "AddNewNode":
                    return(AddNewNode(context.Model as BaseDataSetModel));

                case "AddNewLeafNode":
                    return(AddNewLeafNode(context.Model as ReportTemplateModel));

                case "EditNodeName":
                    return(EditNodeName(context.Model as BaseDataSetModel));

                case "AddNodeItemOrder":
                    return(AddNodeItemOrder(context.Parameters));

                case "MinusNodeItemOrde":
                    return(MinusNodeItemOrder(context.Parameters));

                case "DeleteNode":
                    return(DeleteNode(context.Parameters));

                case "GetSubNodes":
                    return(GetSubNodes(context.Parameters));

                case "IsLeaf":
                    return(IsLeaf(context.Parameters));

                case "GetTemplateGuid":
                    return(GetTemplateGuid(context.Parameters));

                case "GetItemGuid":
                    return(GetItemGuid(context.Parameters));

                case "GetParentGuid":
                    return(GetParentGuid(context.Parameters));

                case "GetReportInfo":
                    return(GetReportInfo(context.Parameters));

                case "MoveLeafNode":
                    return(MoveLeafNode(context.Parameters, context.UserID));

                case "CopyLeafNode":
                    return(CopyLeafNode(context.Parameters, context.UserID));

                default:
                {
                    dsAr.ReturnMessage = null;
                    dsAr.Result        = false;
                    return(dsAr);
                }
                }
            }
            catch (Exception e)
            {
                logger.Error((long)ModuleEnum.Templates_WS, ModuleInstanceName.Templates, 1, e.Message, Application.StartupPath.ToString(),
                             (new System.Diagnostics.StackFrame(true)).GetFileName(),
                             Convert.ToInt32(new System.Diagnostics.StackFrame(true).GetFileLineNumber().ToString()));
                dsAr.ReturnMessage = null;
                dsAr.Result        = false;
                return(dsAr);
            }
        }