Exemplo n.º 1
0
        protected string SaveObject()
        {
            UserData = new UserData();
            UserData.CheckSession();
            wsSky wsd;

            wsd = new wsSky();
            otAnyActionResp wssod;

            ServicePointManager.Expect100Continue    = false;
            wsd.UnsafeAuthenticatedConnectionSharing = true;
            wsd.Credentials = UserData.NetCred;
            wsd.Timeout     = 2000000;
            otAnyActionData AnyActionData = AnyActionDataForSaveObjectAttrs(ObjectRef);

            wssod = wsd.fAnyAction(UserData.UserRef, AnyActionData);
            otAnyActionParam[] aap = wssod.prAnyActionParams;

            // - параметры пока сохраняются поштучно AnyActionData = AnyActionDataForSaveObjectContent(ObjectRef);
            //wssod = wsd.fAnyAction(UserData.UserRef, AnyActionData);
            //aap = wssod.prAnyActionParams;

            string objref = ApplTools.AnyActionDataValue(aap, "vRef");

            return(objref);
        }
Exemplo n.º 2
0
        protected void AddNewParamToObject()
        {
            if (hidformmode.Value == "mnew")
            {
                ObjectRef = SaveObject();
            }

            UserData = new UserData();
            UserData.CheckSession();
            wsSky wsd;

            wsd = new wsSky();
            otAnyActionResp wssod;

            ServicePointManager.Expect100Continue    = false;
            wsd.UnsafeAuthenticatedConnectionSharing = true;
            wsd.Credentials = UserData.NetCred;
            wsd.Timeout     = 2000000;
            otAnyActionData AnyActionData = AnyActionDataForAddNewParamToObject(ObjectRef);

            wssod = wsd.fAnyAction(UserData.UserRef, AnyActionData);
            otAnyActionParam[] aap = wssod.prAnyActionParams;

            string objref = ApplTools.AnyActionDataValue(aap, "vRef");

            Response.Redirect("TemplatePage.aspx?objref=" + objref);
        }
Exemplo n.º 3
0
        protected void SaveObject()
        {
            UserData = new UserData();
            UserData.CheckSession();
            wsSky wsd;

            wsd = new wsSky();
            otAnyActionResp wssod;

            ServicePointManager.Expect100Continue    = false;
            wsd.UnsafeAuthenticatedConnectionSharing = true;
            wsd.Credentials = UserData.NetCred;
            wsd.Timeout     = 2000000;
            otAnyActionData AnyActionData = AnyActionDataForSaveObject(ObjectRef);

            wssod = wsd.fAnyAction(UserData.UserRef, AnyActionData);
            if (wssod.prRespHeader.prRespResult < 0)
            {
                (Master.FindControl("lMasterTextTop") as Label).Text = wssod.prRespHeader.prRespMessage;
            }
            else
            {
                otAnyActionParam[] aap    = wssod.prAnyActionParams;
                string             objref = ApplTools.AnyActionDataValue(aap, "prObjectRef");
                Response.Redirect("ParamPage.aspx?objref=" + objref);
            }
        }
Exemplo n.º 4
0
        protected int WSCallCheckUser(string LoginText, string PasswordText)
        {
            int   _Result;
            wsSky ws;

            ws = new wsSky();
            otCheckUser wsres;

            ServicePointManager.Expect100Continue   = false;
            ws.UnsafeAuthenticatedConnectionSharing = true;
            ws.Credentials = NetCred;
            ws.Timeout     = 2000000;
            wsres          = ws.fCheckUser(LoginText, PasswordText);
            _Result        = wsres.prRespHeader.prRespResult;
            if (_Result > 0)
            {
                UserRef1C = wsres.prUserRef;
            }

            else
            {
                UserRef = "";
            }
            return(_Result);
        }
Exemplo n.º 5
0
        private otPacientListRow[] DetailList(string UserRef)
        {
            wsSky wsd;

            wsd = new wsSky();
            otPacientListPage wssod;

            ServicePointManager.Expect100Continue    = false;
            wsd.UnsafeAuthenticatedConnectionSharing = true;
            wsd.Credentials = UserData.NetCred;
            wsd.Timeout     = 2000000;
            //int vStateID = (int)Session["OrdersStateFilter"];
            int    OrderField  = 0;
            string SearchText  = FilterTextBox.Text;
            int    SearchField = 0;
            string Date1       = "";
            string Date2       = "";

            wssod       = wsd.fPacientListPage(UserRef, PageNumber, RowsPerPage, OrderField, SearchText, SearchField, Date1, Date2);
            RecordCount = wssod.prRecordCount;
            (Master.FindControl("lMasterTextTop") as Label).Text = wssod.prRespHeader.prRespMessage;
            //(Master.FindControl("lGridTextBottom") as Label).Text = wssod.prRespHeader.prRespInfo;
            otPacientListRow[] DetailList = wssod.prPacientListRows;
            return(DetailList);
        }
Exemplo n.º 6
0
        protected otServiceShow GetServiceWS()
        {
            if (UserData == null)
            {
                ServiceRef = Request.QueryString["serref"];
                if (ServiceRef == null)
                {
                    ServiceRef = "";
                }
                ;
                UserData = new UserData();
                UserData.CheckSession();
                PacientRef = Request.QueryString["pacref"];
                if (PacientRef != null)
                {
                    UserData.SetUserParam(2, PacientRef);
                }
                else
                {
                    PacientRef = "";
                }
                UserData = new UserData();
                UserData.CheckSession();
            }
            wsSky         wsd = UserData.NewWS();
            otServiceShow wssod;

            wssod      = wsd.fServiceShow(UserData.UserRef, ServiceRef);
            ServiceRef = wssod.prServiceRef;
            return(wssod);
        }
Exemplo n.º 7
0
        private void DeleteObject(string vRef)
        {
            UserData = new UserData();
            UserData.CheckSession();
            wsSky wsd;

            wsd = new wsSky();
            otAnyActionResp wssod;

            ServicePointManager.Expect100Continue    = false;
            wsd.UnsafeAuthenticatedConnectionSharing = true;
            wsd.Credentials = UserData.NetCred;
            wsd.Timeout     = 2000000;
            otAnyActionData AnyActionData = AnyActionDataForDeleteObject(ObjectRef);

            wssod = wsd.fAnyAction(UserData.UserRef, AnyActionData);
            if (wssod.prRespHeader.prRespResult < 0)
            {
                (Master.FindControl("lMasterTextTop") as Label).Text = wssod.prRespHeader.prRespMessage;
            }
            else
            {
                Response.Redirect("TemplateList.aspx");
            }
        }
Exemplo n.º 8
0
        public wsSky NewWS()
        {
            wsSky wsd;

            wsd = new wsSky();

            ServicePointManager.Expect100Continue    = false;
            wsd.UnsafeAuthenticatedConnectionSharing = true;
            wsd.Credentials = NetCred;
            wsd.Timeout     = 2000000;

            return(wsd);
        }
Exemplo n.º 9
0
        protected void SaveNewService()
        {
            UserData = new UserData();
            UserData.CheckSession();
            wsSky           wsd = UserData.NewWS();
            otAnyActionResp wssod;
            otAnyActionData AnyActionData = AnyActionDataForNewService();

            wssod = wsd.fAnyAction(UserData.UserRef, AnyActionData);
            //tb_SurName.Text = wssod.prAnyActionParams[0].prValue;
            otAnyActionParam[] aap           = wssod.prAnyActionParams;
            string             NewServiceRef = ApplTools.AnyActionDataValue(aap, "vServiceRef");

            Response.Redirect("ServicePage.aspx?serref=" + NewServiceRef);
        }
Exemplo n.º 10
0
        protected void FillDataTypeList()
        {
            wsSky           wsd = UserData.NewWS();
            otAnyActionResp wssod;
            otAnyActionData AnyActionData = AnyActionDataForDataTypeList();

            wssod = wsd.fAnyAction(UserData.UserRef, AnyActionData);

            otAnyActionParam[] DataTypeList = wssod.prAnyActionParams;
            dsDataTypeCB = new tAnyParamList(DataTypeList);

            cbDataTypeList.DataSource     = dsDataTypeCB;
            cbDataTypeList.DataTextField  = "prName";
            cbDataTypeList.DataValueField = "prValue";
            cbDataTypeList.DataBind();
        }
Exemplo n.º 11
0
        protected void SaveServiceParams()
        {
            otParamValueEdit[] PVE = ParseParamControls();
            UserData = new UserData();
            UserData.CheckSession();
            wsSky           wsd = UserData.NewWS();
            otAnyActionResp wssod;

            otAnyActionParam[] vServiceHeaderParams = new otAnyActionParam[2];
            vServiceHeaderParams[0]         = new otAnyActionParam();
            vServiceHeaderParams[0].prName  = "vFormMode";
            vServiceHeaderParams[0].prValue = "1";
            vServiceHeaderParams[1]         = new otAnyActionParam();
            vServiceHeaderParams[1].prName  = "vServiceRef";
            vServiceHeaderParams[1].prValue = ServiceRef;

            wssod = wsd.fServiceEdit(UserData.UserRef, vServiceHeaderParams, PVE);
        }
Exemplo n.º 12
0
        private otAnyActionParam[] DetailList(string UserRef)
        {
            wsSky wsd;

            wsd = new wsSky();
            otAnyActionResp wssod;

            ServicePointManager.Expect100Continue    = false;
            wsd.UnsafeAuthenticatedConnectionSharing = true;
            wsd.Credentials = UserData.NetCred;
            wsd.Timeout     = 2000000;
            //int vStateID = (int)Session["OrdersStateFilter"];
            otAnyActionData AnyActionData = AnyActionDataForTemplateList();

            wssod = wsd.fAnyAction(UserRef, AnyActionData);
            //***RecordCount = wssod.prRecordCount;
            (Master.FindControl("lMasterTextTop") as Label).Text = wssod.prRespHeader.prRespMessage;

            otAnyActionParam[] DetailList = wssod.prAnyActionParams;
            return(DetailList);
        }
Exemplo n.º 13
0
        protected void FillTemplateList()
        {
            wsSky           wsd = UserData.NewWS();
            otAnyActionResp wssod;
            otAnyActionData AnyActionData = AnyActionDataForTemplateList();

            wssod = wsd.fAnyAction(UserData.UserRef, AnyActionData);


            otAnyActionParam[] TemplateList = wssod.prAnyActionParams;
            dsTemplates = new tAnyParamList(TemplateList);


            cbTemplates.DataSource     = dsTemplates;
            cbTemplates.DataTextField  = "prName";
            cbTemplates.DataValueField = "prValue";
            cbTemplates.DataBind();

            //NewRow = new otStringRow();
            //NewRow.prRowText = ReasonRef;
            //NewRow.prRowValue
        }
Exemplo n.º 14
0
        //private int GetUserParamBySessionUID(string SessionUId_)
        //{
        //    //по UserID находим UserRef и полeчаем все параметры пользователя в UserData из fShowUserInfo
        //    int UserIDSQL = -1;
        //    SqlCommand SQLProc = NewSQLProc("dbo.pr_GetUserParamBySessionUID");
        //    SQLProc.Parameters.Add("@SessionUID", SqlDbType.VarChar).Value = SessionUId_;
        //    SQLProc.Parameters.Add("@ResultVar", SqlDbType.Int).Value = -1;
        //    SQLConn.Open();
        //    SqlDataReader Reader = SQLProc.ExecuteReader();
        //    while (Reader.Read())
        //    {
        //        UserIDSQL = (int)Reader["UserID"];
        //        UserRef = (string)Reader["UserRefSQL"];
        //        SessionDate = (DateTime)Reader["CreateDate"];
        //        LoginText = (string)Reader["LoginText"];
        //        AdminUser = (int)Reader["AdminUser"];
        //        CurPacientRef = (string)Reader["CurPacientRef"];

        //    }
        //    Reader.Close();
        //    SQLConn.Close();
        //    return UserIDSQL;
        //}       //надо бы ее удалить
        public int GetUserInfo()
        {
            int   _Result = -1;
            wsSky ws;

            ws = new wsSky();
            otShowUserInfo wsres;

            ServicePointManager.Expect100Continue   = false;
            ws.UnsafeAuthenticatedConnectionSharing = true;
            ws.Credentials = NetCred;
            ws.Timeout     = 2000000;
            wsres          = ws.fShowUserInfo(UserRef, CurPacientRef);
            _Result        = wsres.prRespHeader.prRespResult;
            if (_Result > 0)
            {
                CompanyName     = wsres.prCompanyName;
                UserName        = wsres.prUserName;
                IsGuest         = (wsres.prIsGuest == 1);
                LastEvent       = wsres.prLastEvent;
                LastEventDate   = wsres.prLastEventDate;
                LastEventStyle  = wsres.prLastEventStyle;
                PacientLinkText = wsres.prPacientLinkText;

                UploadPath = wsres.prUploadPath;
                if ((UploadPath.Length > 2) && (UploadPath.Reverse().Substring(1, 1) != "\\"))
                {
                    UploadPath = UploadPath + "\\";
                }
            }

            else
            {
                CompanyName = wsres.prRespHeader.prRespMessage;
                UserName    = "";
            }
            return(_Result);
        }
Exemplo n.º 15
0
        protected otTemplateShow GetServiceWS()
        {
            if (UserData == null)
            {
                ObjectRef = Request.QueryString["objref"];
                if (ObjectRef == null)
                {
                    ObjectRef = "";
                }
                ;
                UserData = new UserData();
                UserData.CheckSession();
                UserData = new UserData();
                UserData.CheckSession();
            }
            wsSky          wsd = UserData.NewWS();
            otTemplateShow wssod;

            wssod = wsd.fTemplateShow(UserData.UserRef, ObjectRef);
            (Master.FindControl("lMasterTextTop") as Label).Text = wssod.prRespHeader.prRespMessage;
            ObjectRef = wssod.prTemplateRef;
            return(wssod);
        }
Exemplo n.º 16
0
        private void CallWS(string UserRef)
        {
            wsSky wsd;

            wsd = new wsSky();
            otAnyActionResp wssod;

            ServicePointManager.Expect100Continue    = false;
            wsd.UnsafeAuthenticatedConnectionSharing = true;
            wsd.Credentials = UserData.NetCred;
            wsd.Timeout     = 2000000;
            otAnyActionData AnyActionData = AnyActionDataForParamPage();

            wssod = wsd.fAnyAction(UserRef, AnyActionData);
            (Master.FindControl("lMasterTextTop") as Label).Text = wssod.prRespHeader.prRespMessage;
            //tb_SurName.Text = wssod.prAnyActionParams[0].prValue;
            otAnyActionParam[] aap = wssod.prAnyActionParams;
            tb_ParamName.Text            = ApplTools.AnyActionDataValue(aap, "prName");
            tb_ParamCaption.Text         = ApplTools.AnyActionDataValue(aap, "prCaption");
            cbDataTypeList.SelectedValue = ApplTools.AnyActionDataValue(aap, "prDateTypeRef");
            tb_ParamCreateUser.Text      = ApplTools.AnyActionDataValue(aap, "prCreateUser");
            tb_ParamCreateDate.Text      = ApplTools.AnyActionDataValue(aap, "prCreateDate");
        }
Exemplo n.º 17
0
        private void CallWS(string UserRef)
        {
            wsSky wsd;

            wsd = new wsSky();
            otAnyActionResp wssod;

            ServicePointManager.Expect100Continue    = false;
            wsd.UnsafeAuthenticatedConnectionSharing = true;
            wsd.Credentials = UserData.NetCred;
            wsd.Timeout     = 2000000;
            otAnyActionData AnyActionData = AnyActionDataForPacientPage();

            wssod = wsd.fAnyAction(UserRef, AnyActionData);
            (Master.FindControl("lMasterTextTop") as Label).Text = wssod.prRespHeader.prRespMessage;
            //tb_SurName.Text = wssod.prAnyActionParams[0].prValue;
            otAnyActionParam[] aap = wssod.prAnyActionParams;
            tb_SurName.Text     = ApplTools.AnyActionDataValue(aap, "vSurName");
            tb_PhoneNumber.Text = ApplTools.AnyActionDataValue(aap, "vPhoneNumber");
            tb_FirstName.Text   = ApplTools.AnyActionDataValue(aap, "vFirstName");
            tb_EMail.Text       = ApplTools.AnyActionDataValue(aap, "vEMail");
            tb_FatherName.Text  = ApplTools.AnyActionDataValue(aap, "vFatherName");
            tb_CreateDate.Text  = ApplTools.AnyActionDataValue(aap, "vCreateDate");
            tb_DateBirth.Text   = ApplTools.AnyActionDataValue(aap, "vDateBirth");
            tb_CreateUser.Text  = ApplTools.AnyActionDataValue(aap, "vCreateUser");
            tb_Sex.Text         = ApplTools.AnyActionDataValue(aap, "vSex");
            tb_Source.Text      = ApplTools.AnyActionDataValue(aap, "vSource");
            tb_Passport.Text    = ApplTools.AnyActionDataValue(aap, "vPassport");
            tb_LastDate.Text    = ApplTools.AnyActionDataValue(aap, "vLastDate");
            tb_CardCode.Text    = ApplTools.AnyActionDataValue(aap, "vCardCode");
            tb_AddressReg.Text  = ApplTools.AnyActionDataValue(aap, "vAddressReg");
            tb_AddressHome.Text = ApplTools.AnyActionDataValue(aap, "vAddressHome");
            tb_Comment.Text     = ApplTools.AnyActionDataValue(aap, "vComment");
            tb_BloodGroup.Text  = ApplTools.AnyActionDataValue(aap, "vBloodGroup");
            tb_BloodRezus.Text  = ApplTools.AnyActionDataValue(aap, "vBloodRezus");
        }