Exemplo n.º 1
0
        void StreamlinePrinciple_getClientData(object sender, Streamline.BaseLayer.UserData e)
        {
            DataSet ClientInformation;

            try
            {
                ClientInformation = new DataSet();
                Streamline.BaseLayer.StreamlinePrinciple objPrinciple = (Streamline.BaseLayer.StreamlinePrinciple)sender;
                if (objPrinciple.RefreshClientData == true)
                {
                    int ClientId = (Int32)e.GetAppData;
                    Streamline.UserBusinessServices.UserInfo objUser = new Streamline.UserBusinessServices.UserInfo();

                    objPrinciple.ClientData        = objUser.GetClientInfo(ClientId);
                    objPrinciple.RefreshClientData = false;
                }
            }
            catch (Exception ex)
            {
                if (ex.Data["CustomExceptionInformation"] == null)
                {
                    ex.Data["CustomExceptionInformation"] = "StreamlinePrinciple_getUserData";
                }
                else
                {
                    ex.Data["CustomExceptionInformation"] = "";
                }
                if (ex.Data["DatasetInfo"] == null)
                {
                    ex.Data["DatasetInfo"] = "";
                }
                throw (ex);
            }
        }
Exemplo n.º 2
0
        void StreamlinePrinciple_getUserData(object sender, Streamline.BaseLayer.UserData e)
        {
            DataSet ClientInformation;
            DataSet DataSetStaffLocations;

            Streamline.UserBusinessServices.SharedTables objectSharedTables = null;
            objectSharedTables = new Streamline.UserBusinessServices.SharedTables();
            //Added by Loveena in ref to Task#2954
            DataSet DataSetLocations;

            try
            {
                ClientInformation     = new DataSet();
                DataSetStaffLocations = new DataSet();
                //Added in ref to Task#2954
                DataSetLocations = new DataSet();
                Streamline.BaseLayer.StreamlinePrinciple objPrinciple = (Streamline.BaseLayer.StreamlinePrinciple)sender;

                if (objPrinciple.RefreshUserData == true)
                {
                    DataRow drUser = (DataRow)e.GetAppData;
                    Streamline.UserBusinessServices.UserInfo objUser = new Streamline.UserBusinessServices.UserInfo();

                    objPrinciple.permissionList = objUser.GetPermission(Convert.ToInt32(drUser["StaffId"].ToString()));

                    objPrinciple.ClientsList = objUser.GetSharedClients(drUser["RowIdentifier"].ToString(), Convert.ToInt32(drUser["StaffId"].ToString()));
                    DataSetStaffLocations    = objectSharedTables.getLocations(Convert.ToInt32(drUser["StaffId"].ToString()));
                    //Following added with reference to Task #2394
                    objPrinciple.StaffPrescribingLocationsList = DataSetStaffLocations.Tables[0];
                    objPrinciple.RefreshUserData = false;
                    //Following commented with reference to Task #2394
                    //Streamline.UserBusinessServices.SharedTables.DataSetLocations = objectSharedTables.getLocations(Convert.ToInt32(drUser["StaffId"].ToString()));
                    objPrinciple._SystemReports = objUser.GetSystemReports();
                    //Added by Loveena in ref to Task#2954
                    DataSetLocations = objectSharedTables.GetAssociatedLocations(Convert.ToInt32(drUser["StaffId"].ToString()));
                    objPrinciple.StaffLocationsList = DataSetLocations.Tables[0];
                }

                //ClientInformation=objUser.GetClientInfo(

                // objPrinciple.objectClient=new Streamline.BaseLayer.Client();
            }
            catch (Exception ex)
            {
                if (ex.Data["CustomExceptionInformation"] == null)
                {
                    ex.Data["CustomExceptionInformation"] = "StreamlinePrinciple_getUserData";
                }
                else
                {
                    ex.Data["CustomExceptionInformation"] = "";
                }
                if (ex.Data["DatasetInfo"] == null)
                {
                    ex.Data["DatasetInfo"] = "";
                }
                throw (ex);
            }
            finally
            {
                DataSetStaffLocations = null;
            }
        }