예제 #1
0
        //отправка данных в БД
        public bool LoadExcelTitleWorkOrder(TitleDrill model)
        {
            var p0 = new SqlParam()
            {
                Name = "p_work_order_id", Val = model.WorkOrderId, ValType = DataType.Integer, Direction = ParameterDirection.Input
            };
            var p1 = new SqlParam()
            {
                Name = "p_title", Val = model.TableData1, ValType = DataType.Object, Direction = ParameterDirection.Input
            };
            var p2 = new SqlParam()
            {
                Name = "p_worker", Val = model.TableData2, ValType = DataType.Object, Direction = ParameterDirection.Input
            };
            var p3 = new SqlParam()
            {
                Name = "p_indicator", Val = model.TableData3, ValType = DataType.Object, Direction = ParameterDirection.Input
            };
            var p4 = new SqlParam()
            {
                Name = "p_comment", Val = model.TableData4, ValType = DataType.Object, Direction = ParameterDirection.Input
            };
            var p5 = new SqlParam()
            {
                Name = "status", Val = null, ValType = DataType.String, Direction = ParameterDirection.Output
            };

            sqlExecutor.ExecuteProcedure("work_order.load_excel_title_work_order", new SqlParam[] { p0, p1, p2, p3, p4, p5 }, true);

            var msg = (string)p5.Val;

            if (!string.IsNullOrEmpty(msg))
            {
                throw new Exception(msg);
            }

            return(true);
        }
예제 #2
0
 private IEnumerable <string> PrepareWellsName(TitleDrill outTitleData)
 {
     return(outTitleData.TableData3.Value.Where(w => w.SideId != null).Select(s => s.SideId.ToString()).Distinct());
 }
예제 #3
0
 private void GetDicWispModuleWell(decimal workOrderId, TitleDrill outTitleData)
 {
     _dicData.WispModuleWell = DicService.GetWispModuleWell(workOrderId, PrepareWellsName(outTitleData));
 }