• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Common.SigmaResultType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Element.Shared.Common.SigmaResultType的典型用法代码示例。如果您正苦于以下问题:C# SigmaResultType类的具体用法?C# SigmaResultType怎么用?C# SigmaResultType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SigmaResultType类属于Element.Shared.Common命名空间,在下文中一共展示了SigmaResultType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddEquipment

        public SigmaResultType AddEquipment(TypeEquipment objEquipment)
        {
            TypeUserInfo userinfo = AuthMgr.GetUserInfo();

            SigmaResultType result = new SigmaResultType();
            TransactionScope scope = null;

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@EquipmentCodeMain", objEquipment.EquipmentCodeMain.Trim()));
            paramList.Add(new SqlParameter("@EquipmentCodeSub", objEquipment.EquipmentCodeSub.Trim()));
            paramList.Add(new SqlParameter("@Description", objEquipment.Description.Trim()));
            paramList.Add(new SqlParameter("@ThirdLevel", objEquipment.ThirdLevel.Trim()));
            paramList.Add(new SqlParameter("@Spec", objEquipment.Spec.Trim()));
            paramList.Add(new SqlParameter("@EquipmentType", objEquipment.EquipmentType.Trim()));
            paramList.Add(new SqlParameter("@CreatedBy", userinfo.SigmaUserId.Trim()));
            paramList.Add(new SqlParameter("@ModelNumber", objEquipment.ModelNumber.Trim()));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddEquipment", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;

                scope.Complete();
            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:34,代码来源:EquipmentMgr.cs


示例2: AddCWA

        public SigmaResultType AddCWA(TypeCWA objCWA)
        {
            TypeUserInfo userinfo = AuthMgr.GetUserInfo();

            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@ProjectId", Utilities.ToInt32(userinfo.CurrentProjectId.ToString().Trim())));
            paramList.Add(new SqlParameter("@Name", objCWA.Name.Trim()));
            paramList.Add(new SqlParameter("@Area", objCWA.Area));
            paramList.Add(new SqlParameter("@Description", objCWA.Description.Trim()));
            paramList.Add(new SqlParameter("@CreatedBy", userinfo.SigmaUserId.Trim()));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddCWA", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;

                scope.Complete();
            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:31,代码来源:CWAMgr.cs


示例3: ListMessageBoxBySigmaUserId

        //public SigmaResultType MultiMessageBox(List<TypeMessageBox> listObj)
        //{
        //    TransactionScope scope = null;
        //    SigmaResultType result = new SigmaResultType();
        //    // Get connection string
        //    string connStr = ConnStrHelper.getDbConnString();
        //    using (scope = new TransactionScope(TransactionScopeOption.RequiresNew))
        //    {
        //        foreach (TypeMessageBox anObj in listObj)
        //        {
        //            switch (anObj.SigmaOperation)
        //            {
        //                case "C":
        //                    AddMessageBox(anObj);
        //                    break;
        //                case "U":
        //                    UpdateMessageBox(anObj);
        //                    break;
        //                case "D":
        //                    RemoveMessageBox(anObj);
        //                    break;
        //            }
        //        }
        //        scope.Complete();
        //    }
        //    result.IsSuccessful = true;
        //    return result;
        //}
        public SigmaResultType ListMessageBoxBySigmaUserId()
        {
            TypeUserInfo userinfo = AuthMgr.GetUserInfo();

            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            // Compose parameters
            List<SqlParameter> paramList = new List<SqlParameter>();

            paramList.Add(new SqlParameter("@ProjectId", userinfo.CurrentProjectId));
            paramList.Add(new SqlParameter("@SigmaUserId", userinfo.SigmaUserId.Trim()));

            // Get Data
            DataSet ds = SqlHelper.ExecuteDataset(connStr, "usp_ListMessageBoxBySigmaUserId", paramList.ToArray());

            // Convert to REST/JSON String
            result.JsonDataSet = JsonHelper.convertDataTableToJson(ds.Tables[0]);
            //result.AffectedRow = 1;
            result.IsSuccessful = true;
            // return
            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:53,代码来源:MessageBoxMgr.cs


示例4: AddScheduledWorkItem

        public SigmaResultType AddScheduledWorkItem(TypeScheduledWorkItem objScheduledWorkItem)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@ExternalScheduleId", objScheduledWorkItem.ExternalScheduleId));
            paramList.Add(new SqlParameter("@CwpId", objScheduledWorkItem.CwpId));
            paramList.Add(new SqlParameter("@ScheduleName", objScheduledWorkItem.ScheduleName));
            paramList.Add(new SqlParameter("@StartDate", objScheduledWorkItem.StartDate));
            paramList.Add(new SqlParameter("@EndDate", objScheduledWorkItem.EndDate));
            paramList.Add(new SqlParameter("@CrewMemebersAssigned", objScheduledWorkItem.CrewMemebersAssigned));
            paramList.Add(new SqlParameter("@TotalWorkingHours", objScheduledWorkItem.TotalWorkingHours));
            paramList.Add(new SqlParameter("@LeaderId", objScheduledWorkItem.LeaderId));
            paramList.Add(new SqlParameter("@CreatedBy", objScheduledWorkItem.CreatedBy));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddScheduledWorkItem", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;
                scope.Complete();

            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:33,代码来源:ScheduledWorkItemMgr.cs


示例5: AddFileStore

        public SigmaResultType AddFileStore(TypeFileStore objFileStore, string targetPath)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            TypeUserInfo userinfo = AuthMgr.GetUserInfo();
            //objFileStore.CompanyId = userinfo.CompanyId.ToString();
            objFileStore.CreatedBy = userinfo.SigmaUserId;

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@ProjectId", userinfo.CurrentProjectId));
            paramList.Add(new SqlParameter("@FileTitle", objFileStore.FileTitle));
            paramList.Add(new SqlParameter("@FileDescription", objFileStore.FileDescription));
            paramList.Add(new SqlParameter("@FileCategory", objFileStore.FileCategory));
            paramList.Add(new SqlParameter("@FileTypeCode", objFileStore.FileTypeCode));
            paramList.Add(new SqlParameter("@CreatedBy", objFileStore.CreatedBy));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddFileStore", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;
                //scope.Complete();
                if (objFileStore.UploadedFileInfo.UploadedFileInfoId == 0)
                {
                    //FileInfo fileinfo = new FileInfo(targetPath + objFileStore.UploadedFileInfo.Path);

                    //objFileStore.UploadedFileInfo.Name = Path.GetFileNameWithoutExtension(targetPath + objFileStore.UploadedFileInfo.Path);
                    //objFileStore.UploadedFileInfo.Size = (int)fileinfo.Length;
                    //objFileStore.UploadedFileInfo.FileExtension = fileinfo.Extension;//Path.GetExtension(objFileStore.UploadedFileInfo.Path);
                    //objFileStore.UploadedFileInfo.FileStoreId = (int)outParam.Value;

                    //-----------------------------------------------------------------------------------------------------
                    //--------------- IE - The given path's format is not supported.  error 해결 -------------------------
                    string filename = Path.GetFileNameWithoutExtension(targetPath + objFileStore.UploadedFileInfo.Path);
                    //string filename = System.IO.Path.GetFileName(targetPath + objFileStore.UploadedFileInfo.Path);
                    FileInfo fileinfo = new FileInfo(targetPath + objFileStore.UploadedFileInfo.Path);
                    string fileExtention = Path.GetExtension(targetPath + objFileStore.UploadedFileInfo.Path);
                    //-----------------------------------------------------------------------------------------------------
                    //-----------------------------------------------------------------------------------------------------

                    objFileStore.UploadedFileInfo.Name = filename;
                    objFileStore.UploadedFileInfo.Size = (int)fileinfo.Length;
                    objFileStore.UploadedFileInfo.FileExtension = fileExtention;
                    objFileStore.UploadedFileInfo.FileStoreId = (int)outParam.Value;

                    UploadedFileInfoMgr uploadedFileInfoMgr = new UploadedFileInfoMgr();
                    uploadedFileInfoMgr.AddUploadedFileInfo(objFileStore.UploadedFileInfo);
                }
                scope.Complete();
            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:60,代码来源:FileStoreMgr.cs


示例6: AddComponentCustomField

        public SigmaResultType AddComponentCustomField(TypeComponentCustomField objComponentCustomField)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();
            TypeUserInfo userinfo = AuthMgr.GetUserInfo();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@ComponentId", objComponentCustomField.ComponentId));
            paramList.Add(new SqlParameter("@CustomFieldId", objComponentCustomField.CustomFieldId));
            paramList.Add(new SqlParameter("@Value", objComponentCustomField.Value));
            paramList.Add(new SqlParameter("@CreatedBy", userinfo.SigmaUserId));

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddComponentCustomField", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = 1; //ComponentCustomField table에는 PK가 없기에 @NewId 필요 없음
                scope.Complete();

            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:26,代码来源:ComponentCustomFieldMgr.cs


示例7: AddCompany

        public SigmaResultType AddCompany(TypeCompany objCompany)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@Name", objCompany.Name));
            paramList.Add(new SqlParameter("@IsClient", objCompany.IsClient));
            paramList.Add(new SqlParameter("@Address", objCompany.Address));
            paramList.Add(new SqlParameter("@ContactName", objCompany.ContactName));
            paramList.Add(new SqlParameter("@ContactPhone", objCompany.ContactPhone));
            paramList.Add(new SqlParameter("@ContactFax", objCompany.ContactFax));
            paramList.Add(new SqlParameter("@ContactEmail", objCompany.ContactEmail));
            paramList.Add(new SqlParameter("@ContractTypeCode", objCompany.ContractTypeCode));
            paramList.Add(new SqlParameter("@CompanyTypeCode", objCompany.CompanyTypeCode));
            paramList.Add(new SqlParameter("@LogoFilePath", objCompany.LogoFilePath));
            paramList.Add(new SqlParameter("@CreatedBy", objCompany.CreatedBy));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddCompany", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;
                scope.Complete();

            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:35,代码来源:CompanyMgr.cs


示例8: ListConsumable

        public SigmaResultType ListConsumable(string offset, string max, string s_option, string s_key, string o_option, string o_desc)
        {
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            // Compose parameters
            List<SqlParameter> parameters = new List<SqlParameter>();

            parameters.Add(new SqlParameter("@MaxNumRows", (max == null ? 1000 : int.Parse(max))));
            parameters.Add(new SqlParameter("@RetrieveOffset", (offset == null ? 0 : int.Parse(offset))));

            parameters.Add(new SqlParameter("@SortColumn", o_option));
            parameters.Add(new SqlParameter("@SortOrder", (o_desc != null ? o_desc.ToUpper() : null)));

            // Get Data
            DataSet ds = SqlHelper.ExecuteDataset(connStr, "usp_ListConsumable", parameters.ToArray());

            // Convert to REST/JSON String
            result.JsonDataSet = JsonHelper.convertDataTableToJson(ds.Tables[0]);
            result.AffectedRow = (int)ds.Tables[1].Rows[0][0]; // returning count
            result.ScalarValue = (int)ds.Tables[2].Rows[0][0]; // total count by search
            result.IsSuccessful = true;
            // return
            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:27,代码来源:ConsumableMgr.cs


示例9: AddTaskCategory

        //public SigmaResultType GetTaskCategory(string taskCategoryId)
        //{
        //    SigmaResultType result = new SigmaResultType();
        //    // Get connection string
        //    string connStr = ConnStrHelper.getDbConnString();
        //    // Compose parameters
        //    SqlParameter[] parameters = new SqlParameter[] {
        //            new SqlParameter("@TaskCategoryId", taskCategoryId)
        //        };
        //    // Get Data
        //    DataSet ds = SqlHelper.ExecuteDataset(connStr, "usp_GetTaskCategory", parameters);
        //    // Convert to REST/JSON String
        //    result.JsonDataSet = JsonHelper.convertDataTableToJson(ds.Tables[0]);
        //    result.AffectedRow = 1;
        //    result.IsSuccessful = true;
        //    // return
        //    return result;
        //}
        //public SigmaResultType ListTaskCategory(string offset, string max, string s_option, string s_key, string o_option, string o_desc)
        //{
        //    SigmaResultType result = new SigmaResultType();
        //    // Get connection string
        //    string connStr = ConnStrHelper.getDbConnString();
        //    // Compose parameters
        //    List<SqlParameter> parameters = new List<SqlParameter>();
        //    parameters.Add(new SqlParameter("@MaxNumRows", (max == null ? 1000 : int.Parse(max))));
        //    parameters.Add(new SqlParameter("@RetrieveOffset", (offset == null ? 0 : int.Parse(offset))));
        //    parameters.Add(new SqlParameter("@SortColumn", o_option));
        //    parameters.Add(new SqlParameter("@SortOrder", (o_desc != null ? o_desc.ToUpper() : null)));
        //    // Get Data
        //    DataSet ds = SqlHelper.ExecuteDataset(connStr, "usp_ListTaskCategory", parameters.ToArray());
        //    // Convert to REST/JSON String
        //    result.JsonDataSet = JsonHelper.convertDataTableToJson(ds.Tables[0]);
        //    result.AffectedRow = (int)ds.Tables[1].Rows[0][0]; // returning count
        //    result.ScalarValue = (int)ds.Tables[2].Rows[0][0]; // total count by search
        //    result.IsSuccessful = true;
        //    // return
        //    return result;
        //}
        public SigmaResultType AddTaskCategory(TypeTaskCategory objTaskCategory)
        {
            TypeUserInfo userinfo = AuthMgr.GetUserInfo();

            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get TaskCode
            objTaskCategory.TaskCategoryCode = GetTaskCode(objTaskCategory.DisciplineCode, objTaskCategory.TaskCategoryName);

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@DisciplineCode", objTaskCategory.DisciplineCode.Trim()));
            paramList.Add(new SqlParameter("@TaskCategoryCode", objTaskCategory.TaskCategoryCode.Trim()));
            paramList.Add(new SqlParameter("@TaskCategoryName", objTaskCategory.TaskCategoryName.Trim()));
            paramList.Add(new SqlParameter("@CreatedBy", userinfo.SigmaUserId.Trim()));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddTaskCategory", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;

                scope.Complete();
            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:72,代码来源:TaskCategoryMgr.cs


示例10: SendMail

        public SigmaResultType SendMail(TypeSigmaUser objSigmaUser)
        {
            SigmaResultType result = new SigmaResultType();

            try
            {
                MailMessage mail = new MailMessage();
                mail.From = new MailAddress("[email protected]", "Administrator", System.Text.Encoding.UTF8);
                mail.To.Add(objSigmaUser.Email);
                mail.IsBodyHtml = true;
                mail.Subject = "Element Sigma Login confirmation";

                mail.Body = GetMailMessage(objSigmaUser);
                mail.BodyEncoding = System.Text.Encoding.UTF8;
                mail.SubjectEncoding = System.Text.Encoding.UTF8;

                //SmtpClient scClient = new SmtpClient("127.0.0.1", 587);
                SmtpClient scClient = new SmtpClient("127.0.0.1", 25);
                //scClient.EnableSsl = true;
                scClient.DeliveryMethod = SmtpDeliveryMethod.Network;
                //scClient.Credentials = new System.Net.NetworkCredential("[email protected]", "[email protected]!1");

                scClient.Send(mail);
                mail.Dispose();
            }
            catch
            {
                //throw new Exception("Invalid Email Address");
            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:32,代码来源:MailMgr.cs


示例11: BatchProcessScheduledWorkItem

        public SigmaResultType BatchProcessScheduledWorkItem(List<TypeScheduledWorkItem> objList)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            using (scope = new TransactionScope(TransactionScopeOption.RequiresNew))
            {

                foreach (TypeScheduledWorkItem anObj in objList)
                {
                    switch (anObj.SigmaOperation)
                    {
                        case "C":
                            AddScheduledWorkItem(anObj);
                            break;
                        case "U":
                            UpdateScheduledWorkItem(anObj);
                            break;
                        case "D":
                            RemoveScheduledWorkItem(anObj.ScheduledWorkItemId);
                            break;
                    }
                }

                scope.Complete();
            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:32,代码来源:ScheduledWorkItemMgr.cs


示例12: AddProjectUserDiscipline

        public SigmaResultType AddProjectUserDiscipline(TypeProjectUserDiscipline objProjectUserDiscipline)
        {
            TypeUserInfo userinfo = AuthMgr.GetUserInfo();
            objProjectUserDiscipline.ProjectId = userinfo.CurrentProjectId;

            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@ProjectId", objProjectUserDiscipline.ProjectId));
            paramList.Add(new SqlParameter("@SigmaUserId", objProjectUserDiscipline.SigmaUserId));
            paramList.Add(new SqlParameter("@DisciplineCode", objProjectUserDiscipline.DisciplineCode));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddProjectUserDiscipline", paramList.ToArray());
                result.IsSuccessful = true;
                scope.Complete();

            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:29,代码来源:MemberMgr.cs


示例13: AddSigmaLog

        public SigmaResultType AddSigmaLog(TypeSigmaLog objSigmaLog)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@Date", objSigmaLog.Date));
            paramList.Add(new SqlParameter("@Thread", objSigmaLog.Thread));
            paramList.Add(new SqlParameter("@Level", objSigmaLog.Level));
            paramList.Add(new SqlParameter("@Logger", objSigmaLog.Logger));
            paramList.Add(new SqlParameter("@Message", objSigmaLog.Message));
            paramList.Add(new SqlParameter("@Exception", objSigmaLog.Exception));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddSigmaLog", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;
                scope.Complete();

            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:30,代码来源:LogMgr.cs


示例14: AddSigmaJob

        public SigmaResultType AddSigmaJob(TypeSigmaJob objSigmaJob)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@SigmaJobName", objSigmaJob.SigmaJobName));
            paramList.Add(new SqlParameter("@JobCategoryCode", objSigmaJob.JobCategoryCode));
            paramList.Add(new SqlParameter("@CreatedBy", objSigmaJob.CreatedBy));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddSigmaJob", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;
                scope.Complete();

            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:27,代码来源:SigmaJobMgr.cs


示例15: AddSigmaUserSigmaRole

        public SigmaResultType AddSigmaUserSigmaRole(TypeSigmaUserSigmaRole objSigmaUserSigmaRole)
        {
            TypeUserInfo userinfo = AuthMgr.GetUserInfo();
            objSigmaUserSigmaRole.CreatedBy = userinfo.SigmaUserId;
            //objSigmaUserSigmaRole.ProjectId = userinfo.CurrentProjectId;

            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@SigmaRoleId", objSigmaUserSigmaRole.SigmaRoleId));
            paramList.Add(new SqlParameter("@SigmaUserId", objSigmaUserSigmaRole.SigmaUserId));
            paramList.Add(new SqlParameter("@ReportTo", objSigmaUserSigmaRole.ReportTo));
            paramList.Add(new SqlParameter("@ReportToRole", objSigmaUserSigmaRole.ReportToRole));
            paramList.Add(new SqlParameter("@IsDefault", objSigmaUserSigmaRole.IsDefault));
            paramList.Add(new SqlParameter("@ProjectId", objSigmaUserSigmaRole.ProjectId));
            paramList.Add(new SqlParameter("@CreatedBy", objSigmaUserSigmaRole.CreatedBy));

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddSigmaUserSigmaRole", paramList.ToArray());
                result.IsSuccessful = true;

                scope.Complete();
            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:31,代码来源:SigmaUserMgr.cs


示例16: AddExternalSchedule

        /// <summary>
        /// P6 관련
        /// </summary>
        /// <param name="objExternalSchedule"></param>
        /// <returns></returns>
        public SigmaResultType AddExternalSchedule(TypeExternalSchedule objExternalSchedule)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@Level", objExternalSchedule.Level));
            paramList.Add(new SqlParameter("@StartDate", objExternalSchedule.StartDate));
            paramList.Add(new SqlParameter("@EndDate", objExternalSchedule.EndDate));
            paramList.Add(new SqlParameter("@OriginalDuration", objExternalSchedule.OriginalDuration));
            paramList.Add(new SqlParameter("@ProjectObjectId", objExternalSchedule.ProjectObjectId));
            paramList.Add(new SqlParameter("@ActivityObjectId", objExternalSchedule.ActivityObjectId));
            paramList.Add(new SqlParameter("@ParentObjectId", objExternalSchedule.ParentObjectId));
            paramList.Add(new SqlParameter("@RemainingDuration", objExternalSchedule.RemainingDuration));
            paramList.Add(new SqlParameter("@ExternalProjectName", objExternalSchedule.ExternalProjectName));
            paramList.Add(new SqlParameter("@CalendarId", objExternalSchedule.CalendarId));
            paramList.Add(new SqlParameter("@CreatedBy", AuthMgr.GetUserInfo().SigmaUserId));
            paramList.Add(new SqlParameter("@ProjectId", AuthMgr.GetUserInfo().CurrentProjectId));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddExternalSchedule", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;
                scope.Complete();

            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:39,代码来源:ExternalScheduleMgr.cs


示例17: ListAssignmentComponentProgress

        public SigmaResultType ListAssignmentComponentProgress(string offset, string max, List<string> s_option, List<string> s_key, string o_option, string o_desc)
        {
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            // Compose parameters
            List<SqlParameter> parameters = new List<SqlParameter>();

            for (int i = 0; i < s_option.Count; i++)
            {
                parameters.Add(new SqlParameter(s_option[i], s_key[i]));
            }

            parameters.Add(new SqlParameter("@MaxNumRows", (max == null ? 1000 : int.Parse(max))));
            parameters.Add(new SqlParameter("@RetrieveOffset", (offset == null ? 0 : int.Parse(offset))));

            parameters.Add(new SqlParameter("@SortColumn", o_option));
            parameters.Add(new SqlParameter("@SortOrder", (o_desc != null ? o_desc.ToUpper() : null)));

            parameters.Add(new SqlParameter("@ProjectId", AuthMgr.GetUserInfo().CurrentProjectId));

            // Get Data
            DataSet ds = SqlHelper.ExecuteDataset(connStr, "usp_ListComponentProgress", parameters.ToArray());

            // Convert to REST/JSON String
            result.JsonDataSet = JsonHelper.convertDataTableToJson(ds.Tables[0]);
            result.AffectedRow = (int)ds.Tables[1].Rows[0][0]; // returning count
            result.ScalarValue = (int)ds.Tables[2].Rows[0][0]; // total count by search
            result.IsSuccessful = true;
            // return
            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:34,代码来源:AssignCostCodeMgr.cs


示例18: AddCustomFieldWithEquipmentCustomField

        public SigmaResultType AddCustomFieldWithEquipmentCustomField(TypeCustomField objCustomField)
        {
            TypeUserInfo userinfo = AuthMgr.GetUserInfo();

            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();
            SigmaResultType customField = new SigmaResultType();
            SigmaResultType EquipmentCustomField = new SigmaResultType();
            TypeEquipmentCustomField typeEquipmentCustomField = new TypeEquipmentCustomField();

            typeEquipmentCustomField.EquipmentId = objCustomField.Parentid;
            typeEquipmentCustomField.Value = objCustomField.Value;
            typeEquipmentCustomField.CreatedBy = userinfo.SigmaUserId;
            typeEquipmentCustomField.UpdatedBy = userinfo.SigmaUserId;

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                CustomFieldMgr custom = new CustomFieldMgr();

                customField = custom.AddCustomField(objCustomField);
                typeEquipmentCustomField.CustomFieldId = customField.ScalarValue;
                EquipmentCustomField = AddEquipmentCustomField(typeEquipmentCustomField);

                scope.Complete();
            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:28,代码来源:EquipmentMgr.cs


示例19: AddConsumable

        public SigmaResultType AddConsumable(TypeConsumable objConsumable)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();

            // Get connection string
            string connStr = ConnStrHelper.getDbConnString();

            List<SqlParameter> paramList = new List<SqlParameter>();
            paramList.Add(new SqlParameter("@Description", objConsumable.Description));
            paramList.Add(new SqlParameter("@PartNumber", objConsumable.PartNumber));
            paramList.Add(new SqlParameter("@Vendor", objConsumable.Vendor));
            paramList.Add(new SqlParameter("@UomCode", objConsumable.UomCode));
            paramList.Add(new SqlParameter("@CreatedBy", objConsumable.CreatedBy));
            SqlParameter outParam = new SqlParameter("@NewId", SqlDbType.Int);
            outParam.Direction = ParameterDirection.Output;
            paramList.Add(outParam);

            using (scope = new TransactionScope(TransactionScopeOption.Required))
            {
                result.AffectedRow = SqlHelper.ExecuteNonQuery(connStr, CommandType.StoredProcedure, "usp_AddConsumable", paramList.ToArray());
                result.IsSuccessful = true;
                result.ScalarValue = (int)outParam.Value;
                scope.Complete();

            }

            return result;
        }
开发者ID:paraneye,项目名称:WebService,代码行数:29,代码来源:ConsumableMgr.cs


示例20: AddComponetInfo

        /// <summary>
        /// Import MTO 메뉴얼 등록시  
        /// </summary>
        /// <param name="objComponent"></param>
        /// <returns></returns>
        public SigmaResultType AddComponetInfo(TypeComponent objComponent)
        {
            TransactionScope scope = null;
            SigmaResultType result = new SigmaResultType();
            SigmaResultType resultComponent = new SigmaResultType();
            ComponentCustomFieldMgr ComCustomFieldMgr = new ComponentCustomFieldMgr();

            using (scope = new TransactionScope(TransactionScopeOption.RequiresNew))
            {
                if (objComponent.ComponentId > 0)
                {
                    resultComponent = UpdateComponent(objComponent);
                }
                else
                {
                    resultComponent = AddComponent(objComponent);

                    objComponent.ComCustomField.ForEach(item => item.ComponentId = resultComponent.ScalarValue);
                }

             

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Elmah.ExceptionFilterEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# SearchModel.Search类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap