コード例 #1
0
        /// <summary>
        /// TypeOfOwnership Upd
        /// </summary>
        public static async Task <IEnumerable <UniversalCatalogEntity> > CatalogObjectUpd(string objectGuid, string objectTypeGuid,
                                                                                          string serviceGroupGuid, string userGuid, string objectInfo)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryAsync <UniversalCatalogEntity>(
                    "catalog_object_upd", new
                {
                    object_guid_in        = objectGuid,
                    object_type_guid_in   = objectTypeGuid,
                    service_group_guid_in = serviceGroupGuid,
                    user_guid_in          = userGuid,
                    object_info_in        = objectInfo
                },
                    commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");

                return(null);
            }
        }
コード例 #2
0
ファイル: AttachmentInfo.cs プロジェクト: Krokodil007/PM
        /// <summary>
        /// Attachment Get
        /// </summary>
        public static async Task <IEnumerable <AttachmentEntity> > AttachmentGet(string container, string objectGuid,
                                                                                 string attachmentGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryAsync <AttachmentEntity>("pm_attachment_get",
                                                                                   new
                {
                    container_in       = container,
                    object_guid_in     = objectGuid,
                    attachment_guid_in = attachmentGuid
                },
                                                                                   commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");

                return(null);
            }
        }
コード例 #3
0
        /// <summary>
        /// Contact Upd
        /// </summary>
        public static async Task <ContactEntity> ContactUpd(ContactEntity item, string userGuid, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryFirstOrDefaultAsync <ContactEntity>(
                    "pm_contact_upd", new
                {
                    contact_guid_in       = item.contact_guid,
                    service_group_guid_in = serviceGroupGuid,
                    user_guid_in          = userGuid,
                    contact_type_guid_in  = item.contact_type_guid,
                    contact_info_in       = item.contact_info
                },
                    commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");

                return(null);
            }
        }
コード例 #4
0
ファイル: AttachmentInfo.cs プロジェクト: Krokodil007/PM
        /// <summary>
        /// Attachment Upd
        /// </summary>
        public static async Task <AttachmentEntity> AttachmentUpd(AttachmentEntity item)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryFirstOrDefaultAsync <AttachmentEntity>(
                    "pm_attachment_upd", new
                {
                    service_group_guid_in = item.service_group_guid,
                    user_guid_in          = item.user_guid,
                    container_in          = item.container,
                    object_guid_in        = item.object_guid,
                    name_in = item.name,
                    uri_in  = item.uri
                },
                    commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");

                return(null);
            }
        }
コード例 #5
0
ファイル: OrderInfo.cs プロジェクト: Krokodil007/PM
        /// <summary>
        /// Nomenclature Material Upd
        /// </summary>
        public static async Task <NomenclatureOperationEntity> NomenclatureOperationUpd(NomenclatureOperationEntity item,
                                                                                        string userGuid, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryFirstOrDefaultAsync <NomenclatureOperationEntity>(
                    "pm_nomenclature_operation_upd", new
                {
                    nomenclature_operation_guid_in = item.nomenclature_operation_guid,
                    nomenclature_guid_in           = item.nomenclature_guid,
                    service_group_guid_in          = serviceGroupGuid,
                    user_guid_in                 = userGuid,
                    operation_guid_in            = item.operation_guid,
                    operation_count_in           = item.operation_count,
                    operation_price_in           = item.operation_price,
                    operation_price_total_in     = item.operation_price_total,
                    operation_price_total_src_in = item.operation_price_total_src,
                    operation_attribute_in       = item.operation_attribute
                },
                    commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");

                return(null);
            }
        }
コード例 #6
0
ファイル: OrderInfo.cs プロジェクト: Krokodil007/PM
        /// <summary>
        /// Nomenclature Operation Get
        /// </summary>
        public static async Task <IEnumerable <NomenclatureOperationEntity> > NomenclatureOperationGet(
            string nomenclatureOperationGuid, string nomenclatureGuid, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryAsync <NomenclatureOperationEntity>(
                    "pm_nomenclature_operation_get", new
                {
                    nomenclature_operation_guid_in = nomenclatureOperationGuid,
                    nomenclature_guid_in           = nomenclatureGuid,
                    service_group_guid_in          = serviceGroupGuid
                },
                    commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");

                return(null);
            }
        }
コード例 #7
0
ファイル: EquipmentInfo.cs プロジェクト: Krokodil007/PM
        /// <summary>
        /// EquipmentColorfulnessEditionPrice Get
        /// </summary>
        public static async Task <IEnumerable <EquipmentColorfulnessEditionPrice> > EquipmentColorfulnessEditionPriceGet(
            string equipmentGuid, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryAsync <EquipmentColorfulnessEditionPrice>(
                    "pm_equipment_colorfulness_edition_price_get", new
                {
                    equipment_guid_in     = equipmentGuid,
                    service_group_guid_in = serviceGroupGuid
                },
                    commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");

                return(null);
            }
        }
コード例 #8
0
ファイル: AttachmentInfo.cs プロジェクト: Krokodil007/PM
        /// <summary>
        /// Attachment Del
        /// </summary>
        public static async Task AttachmentUpdDel(string attachmentGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                await pixMakeRepository.ExecuteAsync("pm_attachment_del", new
                {
                    attachment_guid_in = attachmentGuid
                },
                                                     commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");
            }
        }
コード例 #9
0
        /// <summary>
        /// CatalogObjectDel
        /// </summary>
        public static async Task CatalogObjectDel(string objectGuid, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                await pixMakeRepository.ExecuteAsync("catalog_object_del", new
                {
                    object_guid_in        = objectGuid,
                    service_group_guid_in = serviceGroupGuid
                },
                                                     commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");
            }
        }
コード例 #10
0
        /// <summary>
        /// Contact Person Del
        /// </summary>
        public static async Task ContactPersonDel(string contactPersonGuid, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                await pixMakeRepository.ExecuteAsync("pm_contact_person_del", new
                {
                    contact_person_guid_in = contactPersonGuid,
                    service_group_guid_in  = serviceGroupGuid
                },
                                                     commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");
            }
        }
コード例 #11
0
ファイル: OrderInfo.cs プロジェクト: Krokodil007/PM
        /// <summary>
        /// Nomenclature Operation Del
        /// </summary>
        public static async Task NomenclatureOperationByNomenclatureDel(string nomenclatureGuid, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                await pixMakeRepository.ExecuteAsync("pm_nomenclature_operation_by_nomenclature_del", new
                {
                    nomenclature_guid_in  = nomenclatureGuid,
                    service_group_guid_in = serviceGroupGuid
                },
                                                     commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");
            }
        }
コード例 #12
0
        /// <summary>
        /// User Identity Info
        /// </summary>
        public static async Task <string> GetUserServiceGroup(string userGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryFirstOrDefaultAsync <string>("auth_service_group_account_get",
                                                                                       new { user_guid_in = userGuid },
                                                                                       commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");
            }

            return(null);
        }
コード例 #13
0
ファイル: OrderInfo.cs プロジェクト: Krokodil007/PM
        /// <summary>
        /// Order Upd
        /// </summary>
        public static async Task OrderApprovedUpd(string orderGuid, bool approved, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                await pixMakeRepository.ExecuteAsync(
                    "pm_order_approved_updV2", new
                {
                    order_guid_in         = orderGuid,
                    approved_in           = approved,
                    service_group_guid_in = serviceGroupGuid
                },
                    commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");
            }
        }
コード例 #14
0
        /// <summary>
        /// Contact Bank Account Get
        /// </summary>
        public static async Task <IEnumerable <ContactBankAccountEntity> > ContactBankAccountGet(string contactBankAccountGuid, string contactGuid, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryAsync <ContactBankAccountEntity>("pm_contact_bank_account_get", new
                {
                    contact_bank_account_guid_in = contactBankAccountGuid,
                    contact_guid_in       = contactGuid,
                    service_group_guid_in = serviceGroupGuid
                },
                                                                                           commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");

                return(null);
            }
        }
コード例 #15
0
ファイル: EquipmentInfo.cs プロジェクト: Krokodil007/PM
        EquipmentAdjustmentGroupEditionGet(string equipmentGuid, string serviceGroupGuid)
        {
            try
            {
                var pixMakeRepository = await PixMakeMySqlRepository.GetConnection();

                var result = await pixMakeRepository.QueryAsync <EquipmentAdjustmentGroupEdition>(
                    "pm_equipment_adjustment_group_edition_get", new
                {
                    equipment_guid_in     = equipmentGuid,
                    service_group_guid_in = serviceGroupGuid
                },
                    commandType : CommandType.StoredProcedure);

                pixMakeRepository.Close();
                return(result);
            }
            catch (Exception ex)
            {
                await SendError.SendErrorAsync(ex, customMessage : "MySql");

                return(null);
            }
        }