当前位置: 首页>>代码示例>>C#>>正文


C# ActionService.GetById方法代码示例

本文整理汇总了C#中ActionService.GetById方法的典型用法代码示例。如果您正苦于以下问题:C# ActionService.GetById方法的具体用法?C# ActionService.GetById怎么用?C# ActionService.GetById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ActionService的用法示例。


在下文中一共展示了ActionService.GetById方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetById

 /// <summary>
 /// [Tin.Nguyen] - Lấy dữ liệu Dân Tộc(Cat_ExportItem) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public CatExportItemModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new CatExportItemModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetById<Cat_ExportItemEntity>(id, ref status);
     if (entity != null)
     {
         model = entity.CopyData<CatExportItemModel>();
     }
     model.ActionStatus = status;
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:18,代码来源:CatExportItemController.cs

示例2: GetById

 /// <summary>
 /// [Tin.Nguyen] - Lấy dữ liệu Tủ Đồ(Lau_Locker) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Lau_MachineOfLineModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Lau_MachineOfLineModel();
     ActionService service = new ActionService(UserLogin);
     var entity = service.GetById<Lau_MachineOfLineEntity>(id, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Lau_MachineOfLineModel>();
     }
     model.ActionStatus = status;
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:18,代码来源:Lau_MachineOfLineController.cs

示例3: GetById

 /// <summary>
 /// [Tin.Nguyen] - Lấy dữ liệu Dân Tộc(Cat_ExportItem) theo Id
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Sys_AutoBackupModel GetById(Guid id)
 {
     string status = string.Empty;
     var model = new Sys_AutoBackupModel();
     ActionService service = new ActionService(UserLogin);
  
     var entity = service.GetById<Sys_AutoBackupEntity>(id, ref status);
     if (entity != null)
     {
         model = entity.CopyData<Sys_AutoBackupModel>();
     }
     model.ActionStatus = status;
     return model;
 }
开发者ID:dtafe,项目名称:vnr,代码行数:19,代码来源:Sys_AutoBackupController.cs

示例4: Post

        public Can_MealRecordMissingModel Post([Bind]Can_MealRecordMissingModel model)
         {

            var mealRecordMissingModel = new Can_MealRecordMissingModel
            {
                ID = model.ID,
                ProfileID = model.ProfileID,
                TamScanReasonMissID = model.TamScanReasonMissID,
                WorkDate = model.WorkDate,
                Amount = model.Amount,
                Status = model.Status,
                MealAllowanceTypeSettingID = model.MealAllowanceTypeSettingID,
                IsFullPay = model.IsFullPay,
                Type= model.Type,
                ActionStatus = model.ActionStatus
            };
            ActionService service = new ActionService(UserLogin);
            if (mealRecordMissingModel.MealAllowanceTypeSettingID != null && mealRecordMissingModel.MealAllowanceTypeSettingID != Guid.Empty)
            {
                string status = string.Empty;
                var mealAllowanceTypeSetting = service.GetByIdUseStore<Can_MealAllowanceTypeSettingEntity>(mealRecordMissingModel.MealAllowanceTypeSettingID.Value,ConstantSql.hrm_can_sp_get_mealallowtypebyid, ref status);
                if (mealAllowanceTypeSetting.Amount!=null)
                    mealRecordMissingModel.Amount = (decimal)mealAllowanceTypeSetting.Amount;
            }
            else if (mealRecordMissingModel.TamScanReasonMissID != null && mealRecordMissingModel.TamScanReasonMissID != Guid.Empty)
            {
                string status = string.Empty;
                var tamScanReasonMiss = service.GetById<Cat_TAMScanReasonMissEntity>(mealRecordMissingModel.TamScanReasonMissID.Value, ref status);
                if (tamScanReasonMiss != null && tamScanReasonMiss.MealAllowanceTypeSettingID != null)
                {
                    var mealAllowanceTypeSetting = service.GetById<Can_MealAllowanceTypeSettingEntity>(tamScanReasonMiss.MealAllowanceTypeSettingID.Value, ref status);
                    mealRecordMissingModel.MealAllowanceTypeSettingID = tamScanReasonMiss.MealAllowanceTypeSettingID;
                    mealRecordMissingModel.Amount =(decimal) mealAllowanceTypeSetting.Amount;
                }
            }
            var data = service.UpdateOrCreate<Can_MealRecordMissingEntity, Can_MealRecordMissingModel>(mealRecordMissingModel);
           
            if (data!=null)
            {

                var dataModel = new Can_MealRecordMissingModel
                {
                    ID = data.ID,
                    ProfileID = data.ProfileID,
                    TamScanReasonMissID = model.TamScanReasonMissID,
                    WorkDate = data.WorkDate,
                    Amount = data.Amount,
                    Status = data.Status,
                    MealAllowanceTypeSettingID = data.MealAllowanceTypeSettingID,
                    IsFullPay = data.IsFullPay,
                    Type = data.Type,
                    EmpCode = data.EmpCode,
                    OrgStructureID = data.OrgStructureID,
                    OrgStructureName = data.OrgStructureName,
                    TamScanReasonMissName = data.TamScanReasonMissName,
                    MealAllowanceTypeSettingName = data.MealAllowanceTypeSettingName,
                    ActionStatus = data.ActionStatus
                };
                return dataModel;
            }
            return null;
        }
开发者ID:dtafe,项目名称:vnr,代码行数:62,代码来源:Can_MealRecordMissingController.cs


注:本文中的ActionService.GetById方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。