public void Insert(Core.Business.JointReviewFormsAdditional jointReviewFormsAdditional)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@FormID", SqlDbType.UniqueIdentifier, jointReviewFormsAdditional.FormID);
            sql.AddParameter("@Name", SqlDbType.NVarChar, jointReviewFormsAdditional.Name);
            sql.AddParameter("@Model", SqlDbType.NVarChar, jointReviewFormsAdditional.Model);
            sql.AddParameter("@Nub", SqlDbType.Float, jointReviewFormsAdditional.Nub);
            sql.AddParameter("@Price", SqlDbType.NVarChar, jointReviewFormsAdditional.Price);
            sql.AddParameter("@Des", SqlDbType.NVarChar, jointReviewFormsAdditional.Des);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertJointReviewFormsAdditional");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) jointReviewFormsAdditional.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.UnitInfo unitInfo)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, unitInfo.Name);
            sql.AddParameter("@SuperUnit", SqlDbType.UniqueIdentifier, unitInfo.SuperUnit);
            sql.AddParameter("@Place", SqlDbType.NVarChar, unitInfo.Place);
            sql.AddParameter("@UnitSign", SqlDbType.NVarChar, unitInfo.UnitSign);
            sql.AddParameter("@UnitPostCode", SqlDbType.NVarChar, unitInfo.UnitPostCode);
            sql.AddParameter("@UnitPhone", SqlDbType.NVarChar, unitInfo.UnitPhone);
            sql.AddOutputParameter("@Code", SqlDbType.UniqueIdentifier);
            SqlDataReader reader = sql.ExecuteSPReader("usp_InsertUnitInfo");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) unitInfo.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.VirtualLabDataSon virtualLabDataSon)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, virtualLabDataSon.Name);
            sql.AddParameter("@Content", SqlDbType.NVarChar, virtualLabDataSon.Content);
            sql.AddParameter("@AddTime", SqlDbType.DateTime, virtualLabDataSon.AddTime);
            sql.AddParameter("@AddPerson", SqlDbType.NVarChar, virtualLabDataSon.AddPerson);
            sql.AddParameter("@HasAnnex", SqlDbType.Int, virtualLabDataSon.HasAnnex);
            sql.AddParameter("@frontID",SqlDbType.UniqueIdentifier,virtualLabDataSon.FrontID);
            sql.AddOutputParameter("@ID", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertVirtualLabDataSon");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) virtualLabDataSon.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.CommissionedCompletionRecord commissionedCompletionRecord)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@ApplicationID", SqlDbType.UniqueIdentifier, commissionedCompletionRecord.ApplicationID);
            sql.AddParameter("@FillPerson", SqlDbType.UniqueIdentifier, commissionedCompletionRecord.FillPerson);
            sql.AddParameter("@AchieveTime", SqlDbType.DateTime, commissionedCompletionRecord.AchieveTime);
            sql.AddParameter("@SamplesNub", SqlDbType.Float, commissionedCompletionRecord.SamplesNub);
            sql.AddParameter("@MachineTime", SqlDbType.Float, commissionedCompletionRecord.MachineTime);
            sql.AddParameter("@Charges", SqlDbType.NVarChar, commissionedCompletionRecord.Charges);
            sql.AddParameter("@FeesReceivable", SqlDbType.NVarChar, commissionedCompletionRecord.FeesReceivable);
            sql.AddParameter("@ActualCharges", SqlDbType.NVarChar, commissionedCompletionRecord.ActualCharges);
            sql.AddParameter("@Units", SqlDbType.UniqueIdentifier, commissionedCompletionRecord.Units);
            sql.AddParameter("@FillTime", SqlDbType.DateTime, commissionedCompletionRecord.FillTime);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader = sql.ExecuteSPReader("usp_InsertCommissionedCompletionRecord");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) commissionedCompletionRecord.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.StimulationType stimulationType)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@StimulationId", SqlDbType.UniqueIdentifier, stimulationType.StimulationId);
            sql.AddParameter("@StimulatedType", SqlDbType.Int, stimulationType.StimulatedType);
            sql.AddParameter("@State", SqlDbType.Int, stimulationType.State);
            sql.AddParameter("@ApplyingEndDate", SqlDbType.DateTime, stimulationType.ApplyingEndDate);
            sql.AddParameter("@FirstChenEndDate", SqlDbType.DateTime, stimulationType.FirstChenEndDate);
            sql.AddParameter("@SecondCheckEndDate", SqlDbType.DateTime, stimulationType.SecondCheckEndDate);
            sql.AddParameter("@ExpertCheckEndDate", SqlDbType.DateTime, stimulationType.ExpertCheckEndDate);
            sql.AddParameter("@Des",SqlDbType.NVarChar,stimulationType.Des);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader = sql.ExecuteSPReader("usp_InsertStimulationType");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) stimulationType.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#6
0
        public void Insert(Core.Business.JointReview jointReview)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@InstrumentName", SqlDbType.NVarChar, jointReview.InstrumentName);
            sql.AddParameter("@ApplicationUint", SqlDbType.NVarChar, jointReview.ApplicationUint);
            sql.AddParameter("@ApplicationUintID", SqlDbType.UniqueIdentifier, jointReview.ApplicationUintID);
            sql.AddParameter("@Corporate", SqlDbType.NVarChar, jointReview.Corporate);
            sql.AddParameter("@ApplicaitionPerson", SqlDbType.UniqueIdentifier, jointReview.ApplicaitionPerson);
            sql.AddParameter("@ApplicationTime", SqlDbType.DateTime, jointReview.ApplicationTime);
            sql.AddParameter("@CreateTime", SqlDbType.DateTime, jointReview.CreateTime);
            sql.AddParameter("@Status", SqlDbType.Int, jointReview.Status);
            sql.AddParameter("@ApplicationDes", SqlDbType.NVarChar, jointReview.ApplicationDes);
            sql.AddParameter("@AuditDes", SqlDbType.NVarChar, jointReview.AuditDes);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader = sql.ExecuteSPReader("usp_InsertJointReview");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) jointReview.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.FeePaying feePaying)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@AccountCode", SqlDbType.UniqueIdentifier, feePaying.AccountCode);
            sql.AddParameter("@InsteadPersonCode", SqlDbType.UniqueIdentifier, feePaying.InsteadPersonCode);
            sql.AddParameter("@InsteadPersonName", SqlDbType.NVarChar, feePaying.InsteadPersonName);
            sql.AddParameter("@Limit", SqlDbType.Decimal, feePaying.Limit);
            sql.AddParameter("@Mode", SqlDbType.NVarChar, feePaying.Mode);
            sql.AddParameter("@PayDate", SqlDbType.DateTime, feePaying.PayDate);
            sql.AddOutputParameter("@Code", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertFeePaying");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) feePaying.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#8
0
        public void Insert(Core.Business.NewsPhoto newsPhoto)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Title", SqlDbType.NVarChar, newsPhoto.Title);
            sql.AddParameter("@PhotoSrc", SqlDbType.NVarChar, newsPhoto.PhotoSrc);
            sql.AddParameter("@Author", SqlDbType.NVarChar, newsPhoto.Author);
            sql.AddParameter("@AddDate", SqlDbType.DateTime, newsPhoto.AddDate);
            sql.AddParameter("@ContentUrl",SqlDbType.NVarChar,newsPhoto.ContentUrl);
            sql.AddParameter("@Status", SqlDbType.Int, newsPhoto.Status);
            sql.AddParameter("@ContentID", SqlDbType.UniqueIdentifier, newsPhoto.ContentID);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertNewsPhoto");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) newsPhoto.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.Account account)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@AccountId", SqlDbType.NVarChar, account.AccountId);
            sql.AddParameter("@Remain", SqlDbType.Decimal, account.Remain);
            sql.AddParameter("@ApplyDate", SqlDbType.DateTime, account.ApplyDate);
            sql.AddParameter("@UserCode", SqlDbType.UniqueIdentifier, account.UserCode);
            sql.AddParameter("@LimitOfCommon", SqlDbType.Decimal, account.LimitOfCommon);
            sql.AddParameter("@PayTimeOfCommon", SqlDbType.DateTime, account.PayTimeOfCommon);
            sql.AddParameter("@PayModeOfCommon", SqlDbType.NVarChar, account.PayModeOfCommon);
            sql.AddOutputParameter("@Code", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertAccount");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) account.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.JointReviewScoreTable jointReviewScoreTable)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Joi_Id", SqlDbType.UniqueIdentifier, jointReviewScoreTable.Joi_Id);
            sql.AddParameter("@JointReviewExpertsID", SqlDbType.UniqueIdentifier, jointReviewScoreTable.JointReviewExpertsID);
            sql.AddParameter("@NeedUtilization", SqlDbType.Int, jointReviewScoreTable.NeedUtilization);
            sql.AddParameter("@NeedDevelopment", SqlDbType.Int, jointReviewScoreTable.NeedDevelopment);
            sql.AddParameter("@NeedExpected", SqlDbType.Int, jointReviewScoreTable.NeedExpected);
            sql.AddParameter("@SharingForm", SqlDbType.Int, jointReviewScoreTable.SharingForm);
            sql.AddParameter("@ApplicabilityPerformance", SqlDbType.Int, jointReviewScoreTable.ApplicabilityPerformance);
            sql.AddParameter("@ApplicabilityConfiguration", SqlDbType.Int, jointReviewScoreTable.ApplicabilityConfiguration);
            sql.AddParameter("@ManagementStaffing", SqlDbType.Int, jointReviewScoreTable.ManagementStaffing);
            sql.AddParameter("@ManagementComplementary", SqlDbType.Int, jointReviewScoreTable.ManagementComplementary);
            sql.AddParameter("@Budget", SqlDbType.Int, jointReviewScoreTable.Budget);
            sql.AddParameter("@BudgetImplementation", SqlDbType.Int, jointReviewScoreTable.BudgetImplementation);
            sql.AddParameter("@TotalScore", SqlDbType.Int, jointReviewScoreTable.TotalScore);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader = sql.ExecuteSPReader("usp_InsertJointReviewScoreTable");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) jointReviewScoreTable.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#11
0
        public void Insert(Core.Business.SubCenterNote subCenterNote)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@SubCenterID", SqlDbType.UniqueIdentifier, subCenterNote.SubCenterID);
            sql.AddParameter("@Title", SqlDbType.NVarChar, subCenterNote.Title);
            sql.AddParameter("@Content", SqlDbType.NVarChar, subCenterNote.Content);
            sql.AddParameter("@Annex", SqlDbType.UniqueIdentifier, subCenterNote.Annex);
            sql.AddParameter("@Author", SqlDbType.NVarChar, subCenterNote.Author);
            sql.AddParameter("@Addtime", SqlDbType.DateTime, subCenterNote.Addtime);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertSubCenterNote");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) subCenterNote.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.InstrumentCode instrumentCode)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddOutputParameter("@InstruId", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertInstrumentCode");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) instrumentCode.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#13
0
        public void Insert(Core.Business.AttainWayCode attainWayCode)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, attainWayCode.Name);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertAttainWayCode");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) attainWayCode.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#14
0
        public void Insert(Core.Business.ActivitiesType activitiesType)
        {
            SqlServerUtility sql = new SqlServerUtility(connectionString);

            sql.AddParameter("@Name", SqlDbType.NVarChar, activitiesType.Name);
            sql.AddOutputParameter("@Id", SqlDbType.Int);
            SqlDataReader reader = sql.ExecuteSPReader("usp_InsertActivitiesType");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) activitiesType.Id = int.Parse(reader.GetInt32(0).ToString());

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#15
0
        public void Insert(Core.Business.OperateSort operateSort)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@OperateSortName", SqlDbType.NVarChar, operateSort.OperateSortName);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertOperateSort");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) operateSort.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.STATUSMESSAGECODE sTATUSMESSAGECODE)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@StatusMessageNAME", SqlDbType.NVarChar, sTATUSMESSAGECODE.StatusMessageNAME);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertSTATUSMESSAGECODE");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) sTATUSMESSAGECODE.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.InstrumentProductedAreaClass instrumentProductedAreaClass)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, instrumentProductedAreaClass.Name);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertInstrumentProductedAreaClass");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) instrumentProductedAreaClass.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#18
0
        public void Insert(Core.Business.UserEducation userEducation)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@EducationName", SqlDbType.NVarChar, userEducation.EducationName);
            sql.AddOutputParameter("@EducationID", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertUserEducation");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) userEducation.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#19
0
        public void Insert(Core.Business.City city)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, city.Name);
            sql.AddParameter("@ProvinceID", SqlDbType.UniqueIdentifier, city.ProvinceID);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader = sql.ExecuteSPReader("usp_InsertCity");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) city.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.ObjectStimulatedType objectStimulatedType)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, objectStimulatedType.Name);
            sql.AddParameter("@Description", SqlDbType.NVarChar, objectStimulatedType.Description);
            sql.AddOutputParameter("@Id", SqlDbType.Int);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertObjectStimulatedType");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) objectStimulatedType.Id = int.Parse(reader.GetDecimal(0).ToString());

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#21
0
        public void Insert(Core.Business.SysSetting sysSetting)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, sysSetting.Name);
            sql.AddParameter("@SysValue", SqlDbType.NVarChar, sysSetting.SysValue);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertSysSetting");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) sysSetting.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.SubCenterPluginList subCenterPluginList)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, subCenterPluginList.Name);
            sql.AddParameter("@URI", SqlDbType.NVarChar, subCenterPluginList.URI);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertSubCenterPluginList");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) subCenterPluginList.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.VirtualLabDataBigClass virtualLabDataBigClass)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, virtualLabDataBigClass.Name);
            sql.AddParameter("@VirturlLabID", SqlDbType.UniqueIdentifier, virtualLabDataBigClass.VirturlLabID);
            sql.AddOutputParameter("@ID", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertVirtualLabDataBigClass");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) virtualLabDataBigClass.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#24
0
        public void Insert(Core.Business.LinkClass linkClass)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@ClassName", SqlDbType.NVarChar, linkClass.ClassName);
            sql.AddParameter("@Index", SqlDbType.Int, linkClass.Index);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertLinkClas");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) linkClass.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
示例#25
0
        public void Insert(Core.Business.UserInLab userInLab)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@LabID", SqlDbType.UniqueIdentifier, userInLab.LabID);
            sql.AddParameter("@UserID", SqlDbType.UniqueIdentifier, userInLab.UserID);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertUserInLab");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) userInLab.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.Role role)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Description", SqlDbType.NVarChar, role.Description);
            sql.AddParameter("@UserCode", SqlDbType.UniqueIdentifier, role.UserCode);
            sql.AddOutputParameter("@RoleId", SqlDbType.Int);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertRole");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) role.Id = int.Parse(reader.GetDecimal(0).ToString());

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.JXTUserLevel jXTUserLevel)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@Name", SqlDbType.NVarChar, jXTUserLevel.Name);
            sql.AddParameter("@Desc", SqlDbType.NVarChar, jXTUserLevel.Desc);
            sql.AddOutputParameter("@Code", SqlDbType.Int);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertJXTUserLevel");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) jXTUserLevel.Id = int.Parse(reader.GetDecimal(0).ToString());

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.VirtualLabInstrument virtualLabInstrument)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@ExperimentalID", SqlDbType.UniqueIdentifier, virtualLabInstrument.ExperimentalID);
            sql.AddParameter("@InstrumentID", SqlDbType.UniqueIdentifier, virtualLabInstrument.InstrumentID);
            sql.AddOutputParameter("@ID", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertVirtualLabInstrument");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) virtualLabInstrument.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.QuestionDomain questionDomain)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@QuestionID", SqlDbType.UniqueIdentifier, questionDomain.QuestionID);
            sql.AddParameter("@DomainID", SqlDbType.UniqueIdentifier, questionDomain.DomainID);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertQuestionDomain");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) questionDomain.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }
        public void Insert(Core.Business.StimulationExpertAssignment stimulationExpertAssignment)
        {
            SqlServerUtility sql = new SqlServerUtility();

            sql.AddParameter("@StimulationAppID", SqlDbType.UniqueIdentifier, stimulationExpertAssignment.StimulationAppID);
            sql.AddParameter("@ExpertID", SqlDbType.UniqueIdentifier, stimulationExpertAssignment.ExpertID);
            sql.AddOutputParameter("@Id", SqlDbType.UniqueIdentifier);
            SqlDataReader reader =  sql.ExecuteSPReader("usp_InsertStimulationExpertAssignment");

            if (reader != null && !reader.IsClosed && reader.Read())
            {
                if (!reader.IsDBNull(0)) stimulationExpertAssignment.Id = reader.GetGuid(0);

                reader.Close();
            }
            else
            {
                if (reader != null && !reader.IsClosed)
                    reader.Close();
            }
        }