public override void Salvar(ValueObject.BaseVO baseVO) { Query = "insert into SJ_CIDADE values(sq_cidade.nextval, :descricao, :id_estado)"; AdicionarParametroSQL(":descricao", baseVO.Campo("descricao").Valor); AdicionarParametroSQL(":id_estado", baseVO.Campo("id_estado").Valor); base.Salvar(baseVO); }
public override List<string> ObterLista(ValueObject.BaseVO baseVO) { FieldToDataReader = "Perfis"; Query = "select p.descricao \"" + FieldToDataReader + "\" from sj_usuario_grupo_perfil ugp join sj_perfil p " + "on (p.id_perfil = ugp.id_perfil) where ugp.id_usuario = " + baseVO.Campo("id_usuario").Valor.ToString(); return base.ObterLista(); }
public override void Salvar(ValueObject.BaseVO baseVO) { Query = "insert into SJ_COMPETICAO_ANO values (sq_competicao_ano.nextval, :id_ano, :id_competicao)"; AdicionarParametroSQL(":id_ano", baseVO.Campo("id_ano").Valor); AdicionarParametroSQL(":id_competicao", baseVO.Campo("id_competicao").Valor); base.Salvar(); }
public void IsNullOrEmpty_bool_evaluates_false() { var systemUnderTest = new ValueObject(true); Assert.IsFalse(systemUnderTest.IsNullOrEmpty, "IsNullOrEmpty should evaluate to false when ValueObject wraps a bool."); systemUnderTest = new ValueObject(false); Assert.IsFalse(systemUnderTest.IsNullOrEmpty, "IsNullOrEmpty should evaluate to false when ValueObject wraps a bool."); }
public override void Salvar(ValueObject.BaseVO baseVO) { Query = "insert into SJ_LOCAL values (sq_local.nextval, :descricao, :id_cidade)"; AdicionarParametroSQL(":descricao", baseVO.Campo("descricao").Valor); AdicionarParametroSQL(":id_cidade", baseVO.Campo("id_cidade").Valor); base.Salvar(baseVO); }
public override void Salvar(ValueObject.BaseVO baseVO) { Query = "insert into SJ_PALPITE values (sq_palpite.nextval, :id_usuario_grupo_perfil, :id_time_jogo, :gol)"; AdicionarParametroSQL(":id_usuario_grupo_perfil", baseVO.Campo("id_usuario_grupo_perfil").Valor); AdicionarParametroSQL(":id_time_jogo", baseVO.Campo("id_time_jogo").Valor); AdicionarParametroSQL(":gol", baseVO.Campo("gol").Valor); base.Salvar(); }
public override BaseVO ObterDadosVOPorCampo(String campo, ValueObject.BaseVO baseVO, Boolean buscaExata = true) { NomeTabelaCliente = baseVO.NomeTabela; Query = buscaExata ? "SELECT * FROM SJ_USUARIO WHERE " + campo + " = :valor" : "SELECT * FROM SJ_USUARIO WHERE " + campo + " like %" + baseVO.Campo("login").Valor; if (buscaExata) { AdicionarParametroSQL(":valor", baseVO.Campo("login").Valor.ToString()); } return base.ObterPorFiltro(); }
public override void Salvar(ValueObject.BaseVO baseVO) { Query = "insert into SJ_USUARIO_GRUPO_PERFIL values (sq_usuario_grupo_perfil.nextval, :id_usuario, :id_grupo, :id_perfil, :pontos)"; AdicionarParametroSQL(":id_usuario", baseVO.Campo("id_usuario").Valor); AdicionarParametroSQL(":id_grupo", baseVO.Campo("id_grupo").Valor); AdicionarParametroSQL(":id_perfil", baseVO.Campo("id_perfil").Valor); AdicionarParametroSQL(":pontos", 0); base.Salvar(baseVO); }
public override void Salvar(ValueObject.BaseVO baseVO) { Query = "insert into SJ_COMPETICAO_ANO_TIME values (sq_competicao_ano_time.nextval, " + ":id_time, " + ":id_competicao_ano, " + ":pontos)"; AdicionarParametroSQL(":id_time", baseVO.Campo("id_time").Valor); AdicionarParametroSQL(":id_competicao_ano", baseVO.Campo("id_competicao_ano").Valor); AdicionarParametroSQL(":pontos", baseVO.Campo("pontos").Valor); base.Salvar(baseVO); }
public void IsolatedTemplateService_CannotParseSimpleTemplate_WithDynamicModel() { using (var service = new IsolatedTemplateService()) { const string template = "<h1>Animal Type: @Model.Type</h1>"; Assert.Throws<ArgumentException>(() => { dynamic model = new ValueObject(new Dictionary<string, object> { { "Type", "Cat" } }); service.Parse(template, model, null, null); }); } }
internal RegDiff(RegistryComparison Source, RegistryComparison.Side Side) : this() { var origin = Source.Output; foreach (var data in origin) { int tmpIndex = data.Key.IndexOf("::"); string path = data.Key.Substring(0, tmpIndex); string name = data.Key.Substring(tmpIndex + 2); if (!data.Value.Same) if (Side == RegistryComparison.Side.A && !(data.Value.TypeA == RegistryValueType.None && data.Value.ValueA == null)) Data[path][name] = new ValueObject(data.Value.TypeA, data.Value.ValueA); else if (!(data.Value.TypeB == RegistryValueType.None && data.Value.ValueB == null)) // Side == B Data[path][name] = new ValueObject(data.Value.TypeB, data.Value.ValueB); } }
public override void Salvar(ValueObject.BaseVO baseVO) { if (baseVO.Campo("id_competicao_ano_rodada").Valor.ToString().Trim() != String.Empty) { Query = "update SJ_COMPETICAO_ANO_RODADA set realizada = :realizada where id_competicao_ano_rodada = :id_competicao_ano_rodada"; AdicionarParametroSQL(":id_competicao_ano_rodada", baseVO.Campo("id_competicao_ano_rodada").Valor); AdicionarParametroSQL(":realizada", baseVO.Campo("realizada").Valor); } else { Query = "insert into SJ_COMPETICAO_ANO_RODADA values (sq_competicao_ano_rodada.nextval, " + ":id_competicao_ano, " + ":id_rodada," + ":realizada)"; AdicionarParametroSQL(":id_competicao_ano", baseVO.Campo("id_competicao_ano").Valor); AdicionarParametroSQL(":id_rodada", baseVO.Campo("id_rodada").Valor); AdicionarParametroSQL(":realizada", baseVO.Campo("realizada").Valor); } base.Salvar(baseVO); }
public void GUIStartServer(ValueObject serverObj) { Debug.Log("Made it to Unity"); /* foreach(var item in serverObj.Values) { Debug.Log((string)item); } */ try { int maxPlayers = 8; int.TryParse((string)serverObj["max_players"], out maxPlayers); this.netMan.StartServer( (string)serverObj["server_name"], (string)serverObj["lan"] == "true" ? true : false, (string)serverObj["server_pw"], maxPlayers, (string)serverObj["server_description"], (string)serverObj["server_map"], (string)serverObj["server_gametype"] ); // Set the game time limit if(this.gameManager != null) { float timeLimit = -1; // Infinite float.TryParse((string)serverObj.GetValueOrDefault("time_limit", new Value("-1")), out timeLimit); this.gameManager.GameTimeLimit = timeLimit; } } catch(InvalidValueCastException e) { Debug.LogWarning("Cast exception while trying to start a server: " + e); } }
public override ValueObject Execute(TransactionContext trxContext, ValueObject vo) { ProductionControllerNCVCVo inVo = (ProductionControllerNCVCVo)vo; StringBuilder sql = new StringBuilder(); ValueObjectList <ProductionControllerNCVCVo> voList = new ValueObjectList <ProductionControllerNCVCVo>(); //create command DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString()); //create parameter DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList(); sql.Append("select Case When fc.times between '06:00:00' and '23:59:00' then fc.dates when fc.times between '00:00:00' and '05:59:00' then fc.dates-1 end datesss,fc.line_cd l, fc.model_cd model, *from t_ncvc_pdc_fc fc left join t_ncvc_pdc_en2 e2 on fc.fc_id = e2.en2_id left join t_ncvc_pdc_en1 e1 on fc.fc_id = e1.en1_id left join t_ncvc_pdc_ca ca on fc.fc_id = ca.ca_id left join t_ncvc_pdc_ba ba on fc.fc_id = ba.ba_id left join (select dates date1, line_cd line1, Case when idca3 is null then idca1 else idca3 end id from (select tblca1.dates, tblca1.line_cd, idca1, idca3 from (select line_cd, o.dates, max(o.fc_id) idca1 from t_ncvc_pdc_fc o where o.times > '06:00:00' and o.times <= '23:59:00' and o.dates >= :datefrom and o.dates <= :dateto group by o.dates, line_cd order by dates) tblca1 left join(select line_cd, (o.dates - 1) dates, max(o.fc_id) idca3 from t_ncvc_pdc_fc o where o.times > '00:00:00' and o.times <= '05:55:00' and o.dates > :datefrom and o.dates - 1 <= :dateto group by line_cd, o.dates order by idca3) tblca3 on tblca1.dates = tblca3.dates and tblca1.line_cd = tblca3.line_cd) tbl order by dates, line_cd) l on l.line1 = fc.line_cd where fc.fc_id = l.id and l.line1 = e2.line_cd and l.line1 = e1.line_cd and l.line1 = ca.line_cd and fc.line_cd = :line_cd order by fc.dates, fc.line_cd"); sqlParameter.AddParameterDateTime("datefrom", DateTime.Parse(inVo.DateFrom)); sqlParameter.AddParameterDateTime("dateto", DateTime.Parse(inVo.DateTo)); sqlParameter.AddParameterString("line_cd", inVo.ProLine); //sqlParameter.AddParameterString("model_cd", inVo.ProModel); sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString()); //execute SQL IDataReader dataReader = sqlCommandAdapter.ExecuteReader(trxContext, sqlParameter); while (dataReader.Read()) { ProductionControllerNCVCVo outVo = new ProductionControllerNCVCVo { //StartDay = DateTime.Parse(dataReader["dates"].ToString()), TimeHour = DateTime.Parse(dataReader["datesss"].ToString()), ProModel = dataReader["model"].ToString(), ProLine = dataReader["l"].ToString(), FC_endplay_small = int.Parse(dataReader["fc_endplay_small"].ToString()), FC_endplay_big = int.Parse(dataReader["fc_endplay_big"].ToString()), FC_shaft_scracth = int.Parse(dataReader["fc_shaft_scracth"].ToString()), FC_terminal_low = int.Parse(dataReader["fc_terminal_low"].ToString()), FC_case_scracth_dirty = int.Parse(dataReader["fc_case_scracth_dirty"].ToString()), FC_pinion_worm_ng = int.Parse(dataReader["fc_pinion_worm_ng"].ToString()), FC_shaft_lock = int.Parse(dataReader["fc_shaft_lock"].ToString()), FC_deform = int.Parse(dataReader["fc_ba_deform"].ToString()), FC_tape_hole_deform = int.Parse(dataReader["fc_tape_hole_deform"].ToString()), FC_brush_rust = int.Parse(dataReader["fc_brush_rust"].ToString()), FC_metal_deform_scracth = int.Parse(dataReader["fc_metal_deform_scracth"].ToString()), FC_washer_tape_hole = int.Parse(dataReader["fc_washer_tape_hole"].ToString()), En2_insulation_resistance_ng = int.Parse(dataReader["en2_insulation_resistance_ng"].ToString()), En2_cut_coil_wire = int.Parse(dataReader["en2_cut_coil_wire"].ToString()), En2_no_load_current_hight = int.Parse(dataReader["en2_no_load_current_hight"].ToString()), En2_ripple = int.Parse(dataReader["en2_ripple"].ToString()), En2_chattering = int.Parse(dataReader["en2_chattering"].ToString()), En2_lock = int.Parse(dataReader["en2_lock"].ToString()), En2_open = int.Parse(dataReader["en2_open"].ToString()), En2_no_load_speed_low = int.Parse(dataReader["en2_no_load_speed_low"].ToString()), En2_starting_voltage = int.Parse(dataReader["en2_starting_voltage"].ToString()), En2_no_load_speed_high = int.Parse(dataReader["en2_no_load_speed_high"].ToString()), En2_rotor_mix = int.Parse(dataReader["en2_rotor_mix"].ToString()), En2_surge_volt_max = int.Parse(dataReader["en2_surge_volt_max"].ToString()), En2_wrong_post_of_pole = int.Parse(dataReader["en2_wrong_post_of_pole"].ToString()), En2_err = int.Parse(dataReader["en2_err"].ToString()), En2_noise = int.Parse(dataReader["en2_noise"].ToString()), En1_insulation_resistace_ng = int.Parse(dataReader["en1_insulation_resistace_ng"].ToString()), En1_cut_coil_wire = int.Parse(dataReader["en1_cut_coil_wire"].ToString()), En1_lock = int.Parse(dataReader["en1_lock"].ToString()), En1_wareform_ma_abnormal = int.Parse(dataReader["en1_wareform_ma_abnormal"].ToString()), En1_shaft_bent = int.Parse(dataReader["en1_shaft_bent"].ToString()), En1_ripple = int.Parse(dataReader["en1_ripple"].ToString()), En1_short = int.Parse(dataReader["en1_short"].ToString()), En1_chattering = int.Parse(dataReader["en1_chattering"].ToString()), En1_no_load_current_high = int.Parse(dataReader["en1_no_load_current_high"].ToString()), En1_vibration_ng = int.Parse(dataReader["en1_vibration_ng"].ToString()), En1_open = int.Parse(dataReader["en1_open"].ToString()), En1_rotor_mix = int.Parse(dataReader["en1_rotor_mix"].ToString()), BA_tc_endplay_big = int.Parse(dataReader["ba_tc_endplay_big"].ToString()), BA_tc_endplay_small = int.Parse(dataReader["ba_tc_endplay_small"].ToString()), BA_tc_brush_bent = int.Parse(dataReader["ba_tc_brush_bent"].ToString()), BA_tc_shaft_mix = int.Parse(dataReader["ba_tc_shaft_mix"].ToString()), BA_rto_ng = int.Parse(dataReader["ba_rto_ng"].ToString()), BA_rto_mix = int.Parse(dataReader["ba_rto_mix"].ToString()), BA_app_metal_deform_scracth = int.Parse(dataReader["ba_app_metal_deform_scracth"].ToString()), BA_app_deform = int.Parse(dataReader["ba_app_ba_deform"].ToString()), BA_app_endplate_deform_scracth = int.Parse(dataReader["ba_app_endplate_deform_scracth"].ToString()), BA_app_error_other = int.Parse(dataReader["ba_app_error_other"].ToString()), BA_bm_brush_deform_scracth = int.Parse(dataReader["ba_bm_brush_deform_scracth"].ToString()), BA_bm_metal_deform_scracth = int.Parse(dataReader["ba_bm_metal_deform_scracth"].ToString()), BA_bm_deform = int.Parse(dataReader["ba_bm_ba_deform"].ToString()), BA_bm_endplay_deform_scracth = int.Parse(dataReader["ba_bm_endplay_deform_scracth"].ToString()), CA_app_metal_dirty = int.Parse(dataReader["ca_app_metal_dirty"].ToString()), CA_app_tape_hole_deform = int.Parse(dataReader["ca_app_tape_hole_deform"].ToString()), CA_app_metal_high = int.Parse(dataReader["ca_app_metal_high"].ToString()), CA_app_case_deform_scracth = int.Parse(dataReader["ca_app_case_deform_scracth"].ToString()), CA_app_metal_deform_scratch = int.Parse(dataReader["ca_app_metal_deform_scratch"].ToString()), CA_app_magnet_broken = int.Parse(dataReader["ca_app_magnet_broken"].ToString()), CA_mg_metal_deform_scratch = int.Parse(dataReader["ca_mg_metal_deform_scratch"].ToString()), CA_mg_case_deform_scratch = int.Parse(dataReader["ca_mg_case_deform_scratch"].ToString()), CA_bonding_metal_deform_scratch = int.Parse(dataReader["ca_bonding_metal_deform_scratch"].ToString()), CA_bonding_case_deform_scracth = int.Parse(dataReader["ca_bonding_case_deform_scracth"].ToString()), }; voList.add(outVo); } dataReader.Close(); return(voList); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(deleteLineItemCycleTimeMasterMntDao.Execute(trxContext, vo)); }
public List<string> ObterListaJoin(ValueObject.BaseVO baseVO) { throw new NotImplementedException(); }
public void Incluir(ValueObject.BaseVO baseVO) { throw new NotImplementedException(); }
private static bool LoadValueFromPlistNode(XmlNode node, ref ValueObject value) { if (node == null) { Debug.LogError("Attempted to load a null plist value node."); return false; } if (node.Name.Equals("string")) { value.val = node.InnerText; } else if (node.Name.Equals("integer")) { value.val = int.Parse(node.InnerText); } else if (node.Name.Equals("real")) { value.val = float.Parse(node.InnerText); } else if (node.Name.Equals("date")) { value.val = DateTime.Parse(node.InnerText, null, DateTimeStyles.None); } // Date objects are in ISO 8601 format else if (node.Name.Equals("data")) { value.val = node.InnerText; } // Data objects are just loaded as a string else if (node.Name.Equals("true")) { value.val = true; } // Boollean values are empty objects, simply identified with a name being "true" or "false" else if (node.Name.Equals("false")) { value.val = false; } // The value can be an array or dict type. In this case, we need to recursively call the appropriate loader functions for dict and arrays. // These functions will in turn return a boolean value for their success, so we can just return that. // The val value also has to be instantiated, since it's being passed by reference. else if (node.Name.Equals("dict")) { value.val = new Hashtable(); Hashtable htRef = (Hashtable)value.val; return LoadDictFromPlistNode(node, ref htRef); } else if (node.Name.Equals("array")) { value.val = new ArrayList(); ArrayList alRef = (ArrayList)value.val; return LoadArrayFromPlistNode(node, ref alRef); } else { Debug.LogError("Attempted to load a value from a non value type node: " + node + ", " + node.Name); return false; } return true; }
// LoadDictFromPlistNode(XmlNode, Hashtable) takes an XML node and loads it as a hashtable. Return true/false for success/failure private static bool LoadDictFromPlistNode( XmlNode node, Hashtable dict ) { // If we were passed a null object, return false if( node == null ) { Debug.LogError("Attempted to load a null plist dict node."); return false; } // If we were passed a non dict node, then post an error stating so and return false if( node.Name != "dict" ) { Debug.LogError("Attempted to load an dict from a non-array node type: " + node + ", " + node.Name); return false; } // We could be passed an null hashtable. If so, initialize it. if( dict == null ) dict = new Hashtable(); // Identify how many child nodes there are in this dict element and itterate through them. // A dict element will contain a series of key/value pairs. As such, we're going through the child nodes in pairs. var cnodeCount = node.ChildNodes.Count; for (var i = 0; i+1 < cnodeCount; i = i+2) { // Select the key and value child nodes var keynode = node.ChildNodes.Item(i); var valuenode = node.ChildNodes.Item(i+1); // If this node isn't a 'key' if (keynode.Name == "key") { // Establish our variables to hold the key and value. var key = keynode.InnerText; var value = new ValueObject(); // Load the value node. // If the value node loaded successfully, add the key/value pair to the dict hashtable. if (LoadValueFromPlistNode(valuenode, value)) { // This could be one of several different possible data types, including another dict. // AddKeyValueToDict() handles this by replacing existing key values that overlap, and doing so recursively for dict values. // If this not successful, post a message stating so and return false. if (!AddKeyValueToDict(dict, key, value)) { Debug.LogError("Failed to add key value to dict when loading plist from dict"); return false; } } // If the value did not load correctly, post a message stating so and return false. else { Debug.LogError("Did not load plist value correctly for key in node: " + key + ", " + node); return false; } } // Because the plist was formatted incorrectly, post a message stating so and return false. else { Debug.LogError("The plist being loaded may be corrupt."); return false; } } // If we got this far, the dict was loaded successfully. Return true return true; }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(updateFactoryProductionDaysMasterMntCbm.Execute(trxContext, vo)); }
static void AddDataValidation(IWorkbook workbook) { #region #AddDataValidation workbook.LoadDocument("Documents\\DataValidation.xlsx"); Worksheet worksheet = workbook.Worksheets[0]; worksheet["C1"].SetValue(DateTime.Now); worksheet["C1"].NumberFormat = "mmm/d/yyyy h:mm"; // Restrict data entry to a whole number from 10 to 20. worksheet.DataValidations.Add(worksheet["B1"], DataValidationType.WholeNumber, DataValidationOperator.Between, 10, 20); // Restrict data entry to a number within limits. DataValidation validation = worksheet.DataValidations.Add(worksheet["F4:F11"], DataValidationType.Decimal, DataValidationOperator.Between, 10, 40); // Restrict data entry using criteria calculated by a worksheet formula. worksheet.DataValidations.Add(worksheet["B4:B11"], DataValidationType.Custom, "=AND(ISNUMBER(B4),LEN(B4)=5)"); // Restrict data entry to 3 symbols. worksheet.DataValidations.Add(worksheet["D4:D11"], DataValidationType.TextLength, DataValidationOperator.Equal, 3); // Restrict data entry to values in a drop-down list specified in code. // Note that the list in code should always use comma to separate entries, // but the list in UI is displayed using culture-specific list separator. worksheet.DataValidations.Add(worksheet["A4:A11"], DataValidationType.List, "PASS, FAIL"); // Restrict data entry to values in a drop-down list obtained from a worksheet. worksheet.DataValidations.Add(worksheet["E4:E11"], DataValidationType.List, ValueObject.FromRange(worksheet["H4:H9"].GetRangeWithAbsoluteReference())); // Restrict data entry to a time before the specified time. worksheet.DataValidations.Add(worksheet["C1"], DataValidationType.Time, DataValidationOperator.LessThanOrEqual, DateTime.Now); // Highlight data validation ranges. worksheet["H4:H9"].FillColor = Color.LightGray; int[] MyColorScheme = new int[] { 0xFFC4C4, 0xFFD9D9, 0xFFF6F6, 0xFFECEC, 0xE9D3D3, 0xFFDFC4, 0xFFDAE9 }; for (int i = 0; i < worksheet.DataValidations.Count; i++) { worksheet.DataValidations[i].Range.FillColor = Color.FromArgb(MyColorScheme[i]); } #endregion #AddDataValidation }
static void RemoveAllDataValidations(IWorkbook workbook) { #region #RemoveAllDataValidations workbook.LoadDocument("Documents\\DataValidation.xlsx"); Worksheet worksheet = workbook.Worksheets[0]; // Add data validations. worksheet.DataValidations.Add(worksheet["D4:D11"], DataValidationType.TextLength, DataValidationOperator.Equal, 3); worksheet.DataValidations.Add(worksheet["E4:E11"], DataValidationType.List, ValueObject.FromRange(worksheet["H4:H9"].GetRangeWithAbsoluteReference())); // Remove all data validations. worksheet.DataValidations.Clear(); // Highlight data validation ranges. int[] MyColorScheme = new int[] { 0xFFC4C4, 0xFFD9D9, 0xFFF6F6, 0xFFECEC, 0xE9D3D3 }; for (int i = 0; i < worksheet.DataValidations.Count; i++) { worksheet.DataValidations[i].Range.FillColor = Color.FromArgb(MyColorScheme[i]); } #endregion #RemoveAllDataValidations }
static void GetDataValidation(IWorkbook workbook) { #region #GetDataValidation workbook.LoadDocument("Documents\\DataValidation.xlsx"); Worksheet worksheet = workbook.Worksheets[0]; // Add data validations. worksheet.DataValidations.Add(worksheet["D4:D11"], DataValidationType.TextLength, DataValidationOperator.Equal, 3); worksheet.DataValidations.Add(worksheet["E4:E11"], DataValidationType.List, ValueObject.FromRange(worksheet["H4:H9"].GetRangeWithAbsoluteReference())); // Get data validation entry associated with a particular cell. worksheet.DataValidations.GetDataValidation(worksheet.Cells["E4"]).Criteria = ValueObject.FromRange(worksheet["H4:H5"]); // Get data validation entries for the specified range. var myValidation = worksheet.DataValidations.GetDataValidations(worksheet["D4:E11"]) .Where(d => d.ValidationType == DataValidationType.TextLength).SingleOrDefault(); if (myValidation != null) { myValidation.Criteria = 4; } // Get data validation entries that meet certain criteria. foreach (var d in worksheet.DataValidations.GetDataValidations(DataValidationType.TextLength, DataValidationOperator.Equal, 4, ValueObject.Empty)) { // Change criteria operator. // Range D4:D11 should contain text with more than 4 characters. d.Operator = DataValidationOperator.GreaterThan; } // Highlight data validation ranges. int[] MyColorScheme = new int[] { 0xFFC4C4, 0xFFD9D9, 0xFFF6F6, 0xFFECEC, 0xE9D3D3 }; for (int i = 0; i < worksheet.DataValidations.Count; i++) { worksheet.DataValidations[i].Range.FillColor = Color.FromArgb(MyColorScheme[i]); } #endregion #GetDataValidation }
public override ValueObject Execute(TransactionContext trxContext, ValueObject vo) { ProductionControllerNCVCVo inVo = (ProductionControllerNCVCVo)vo; StringBuilder sql = new StringBuilder(); ValueObjectList <ProductionControllerNCVCVo> voList = new ValueObjectList <ProductionControllerNCVCVo>(); //create command DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString()); //create parameter DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList(); sql.Append(@"select (e2.dates+e2.times) datetimes, e2.model_cd,e2.line_cd, e2.process_cd, "); sql.Append("en2_insulation_resistance_ng, en2_cut_coil_wire, en2_no_load_current_hight, en2_ripple, en2_chattering, en2_lock, en2_open, en2_no_load_speed_low, en2_starting_voltage, en2_no_load_speed_high, en2_rotor_mix, en2_surge_volt_max, en2_wrong_post_of_pole, en2_err, en2_noise "); sql.Append("from t_ncvc_pdc_en2 e2 "); sql.Append("where e2.line_cd = :line_cd "); sql.Append("and e2.dates = :dates "); sql.Append("and (e2.times in(select min(times) from t_ncvc_pdc_en2 where times between '06:00:00' and '06:55:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd ) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '06:00:00' and '07:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '07:00:00' and '08:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '08:00:00' and '09:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '09:00:00' and '10:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '10:00:00' and '11:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '11:00:00' and '12:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '12:00:00' and '13:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '13:00:00' and '14:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '14:00:00' and '15:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '15:00:00' and '16:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '16:00:00' and '17:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '17:00:00' and '18:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '18:00:00' and '19:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '19:00:00' and '20:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '20:00:00' and '21:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '21:00:00' and '22:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '22:00:00' and '23:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd)) "); sql.Append("or e2.dates-1 =:dates and e2.line_cd = :line_cd "); sql.Append("and (e2.times in(select min(times) from t_ncvc_pdc_en2 where times between '00:00:00' and '00:55:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '00:00:00' and '01:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '01:00:00' and '02:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '02:00:00' and '03:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '03:00:00' and '04:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '04:00:00' and '05:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or e2.times in(select max(times) from t_ncvc_pdc_en2 where times between '05:00:00' and '05:35:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd)) "); sqlParameter.AddParameterString("line_cd", inVo.ProLine); sqlParameter.AddParameterDateTime("dates", DateTime.Parse(inVo.Date)); sqlParameter.AddParameterString("model_cd", inVo.ProModel); sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString()); //execute SQL IDataReader dataReader = sqlCommandAdapter.ExecuteReader(trxContext, sqlParameter); while (dataReader.Read()) { ProductionControllerNCVCVo outVo = new ProductionControllerNCVCVo { //StartDay = DateTime.Parse(dataReader["dates"].ToString()), TimeHour = DateTime.Parse(dataReader["datetimes"].ToString()), ProModel = dataReader["model_cd"].ToString(), ProLine = dataReader["line_cd"].ToString(), En2_insulation_resistance_ng = int.Parse(dataReader["en2_insulation_resistance_ng"].ToString()), En2_cut_coil_wire = int.Parse(dataReader["en2_cut_coil_wire"].ToString()), En2_no_load_current_hight = int.Parse(dataReader["en2_no_load_current_hight"].ToString()), En2_ripple = int.Parse(dataReader["en2_ripple"].ToString()), En2_chattering = int.Parse(dataReader["en2_chattering"].ToString()), En2_lock = int.Parse(dataReader["en2_lock"].ToString()), En2_open = int.Parse(dataReader["en2_open"].ToString()), En2_no_load_speed_low = int.Parse(dataReader["en2_no_load_speed_low"].ToString()), En2_starting_voltage = int.Parse(dataReader["en2_starting_voltage"].ToString()), En2_no_load_speed_high = int.Parse(dataReader["en2_no_load_speed_high"].ToString()), En2_rotor_mix = int.Parse(dataReader["en2_rotor_mix"].ToString()), En2_surge_volt_max = int.Parse(dataReader["en2_surge_volt_max"].ToString()), En2_wrong_post_of_pole = int.Parse(dataReader["en2_wrong_post_of_pole"].ToString()), En2_err = int.Parse(dataReader["en2_err"].ToString()), En2_noise = int.Parse(dataReader["en2_noise"].ToString()), }; voList.add(outVo); } dataReader.Close(); return(voList); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(updateMoldTypeDao.Execute(trxContext, vo)); }
public bool ExisteRegistro(string campo, string campo_pesquisa, ValueObject.BaseVO baseVO) { return new AnoDAO().ExisteRegistro(campo, campo_pesquisa, baseVO); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(addInspectionTestInstructionDetailDao.Execute(trxContext, vo)); }
public override int GetHashCode() { return((ValueObject.GetUnproxiedType(this).ToString() + Id).GetHashCode()); }
private static bool LoadArrayFromPlistNode(XmlNode node, ref ArrayList array ) { // If we were passed a null node object, then post an error stating so and return false if (node == null) { Debug.LogError("Attempted to load a null plist array node."); return false; } // If we were passed a non array node, then post an error stating so and return false if (!node.Name.Equals("array")) { Debug.LogError("Attempted to load an array from a non-array node type: " + node + ", " + node.Name); return false; } // We can be passed an empty array object. If so, initialize it if (array == null) { array = new ArrayList(); } // Itterate through the child nodes for this array object int nodeCount = node.ChildNodes.Count; for (int i = 0; i < nodeCount; i++) { // Establish variables to hold the child node of the array, and it's value XmlNode cnode = node.ChildNodes.Item(i); ValueObject element = new ValueObject(); // Attempt to load the value from the current array node. // If successful, add it as an element of the array. If not, post and error stating so and return false. if (LoadValueFromPlistNode(cnode, ref element)) { array.Add(element.val); } else { return false; } } // If we made it through the array without errors, return true return true; }
public override ValueObject Execute(TransactionContext trxContext, ValueObject vo) { ProductionControllerVo inVo = (ProductionControllerVo)vo; StringBuilder sql = new StringBuilder(); ValueObjectList <ProductionControllerVo> voList = new ValueObjectList <ProductionControllerVo>(); //create command DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString()); //create parameter DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList(); sql.Append(@"select (o4.dates+o4.times) datetimes, o4.model_cd,o4.line_cd, o4.process_cd, "); sql.Append("fiapp_stamping_ba, fiapp_case_set, fiapp_tough_shaft, fiapp_case_glue_sticky, fiapp_up_low_shabby, fiapp_hole_shaft, "); sql.Append("fiapp_no_beat_prone_case, fiapp_hole_case, fiapp_prone_case, fiapp_lot_ng, fiapp_ter_deform, fiapp_hole_ter, "); sql.Append("fiapp_soder_hl,fiapp_metal_oven_low, fiapp_fundou_ng, fiapp_ter_glue_sticky, fiapp_lead_glue_sticky "); sql.Append("from t_productioncontroller_output04 o4 "); sql.Append("where o4.line_cd = :line_cd "); sql.Append("and o4.dates = :dates "); sql.Append("and (o4.times in(select min(times) from t_productioncontroller_output04 where times between '06:00:00' and '06:55:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd ) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '06:00:00' and '07:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '07:00:00' and '08:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '08:00:00' and '09:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '09:00:00' and '10:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '10:00:00' and '11:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '11:00:00' and '12:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '12:00:00' and '13:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '13:00:00' and '14:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '14:00:00' and '15:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '15:00:00' and '16:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '16:00:00' and '17:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '17:00:00' and '18:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '18:00:00' and '19:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '19:00:00' and '20:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '20:00:00' and '21:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '21:00:00' and '22:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '22:00:00' and '23:05:00' and dates = :dates and line_cd = :line_cd and model_cd = :model_cd)) "); sql.Append("or o4.dates-1 =:dates and o4.line_cd = :line_cd "); sql.Append("and (o4.times in(select min(times) from t_productioncontroller_output04 where times between '00:00:00' and '00:55:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '00:00:00' and '01:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '01:00:00' and '02:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '02:00:00' and '03:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '03:00:00' and '04:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '04:00:00' and '05:05:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd) "); sql.Append("or o4.times in(select max(times) from t_productioncontroller_output04 where times between '05:00:00' and '05:35:00' and dates-1 = :dates and line_cd = :line_cd and model_cd = :model_cd)) "); sqlParameter.AddParameterString("line_cd", inVo.ProLine); sqlParameter.AddParameterDateTime("dates", DateTime.Parse(inVo.Date)); sqlParameter.AddParameterString("model_cd", inVo.ProModel); sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString()); //execute SQL IDataReader dataReader = sqlCommandAdapter.ExecuteReader(trxContext, sqlParameter); while (dataReader.Read()) { ProductionControllerVo outVo = new ProductionControllerVo { //StartDay = DateTime.Parse(dataReader["dates"].ToString()), TimeHour = DateTime.Parse(dataReader["datetimes"].ToString()), ProModel = dataReader["model_cd"].ToString(), ProLine = dataReader["line_cd"].ToString(), App_stamping_ba = int.Parse(dataReader["fiapp_stamping_ba"].ToString()), App_case_set = int.Parse(dataReader["fiapp_case_set"].ToString()), App_tough_shaft = int.Parse(dataReader["fiapp_tough_shaft"].ToString()), App_case_glue_sticky = int.Parse(dataReader["fiapp_case_glue_sticky"].ToString()), App_up_low_shabby = int.Parse(dataReader["fiapp_up_low_shabby"].ToString()), App_hole_shaft = int.Parse(dataReader["fiapp_hole_shaft"].ToString()), App_no_beat_prone_case = int.Parse(dataReader["fiapp_no_beat_prone_case"].ToString()), App_hole_case = int.Parse(dataReader["fiapp_hole_case"].ToString()), App_prone_case = int.Parse(dataReader["fiapp_prone_case"].ToString()), App_lot_ng = int.Parse(dataReader["fiapp_lot_ng"].ToString()), App_ter_deform = int.Parse(dataReader["fiapp_ter_deform"].ToString()), App_hole_ter = int.Parse(dataReader["fiapp_hole_ter"].ToString()), App_soder_hl = int.Parse(dataReader["fiapp_soder_hl"].ToString()), App_metal_oven_low = int.Parse(dataReader["fiapp_metal_oven_low"].ToString()), App_fundou_ng = int.Parse(dataReader["fiapp_fundou_ng"].ToString()), App_ter_glue_sticky = int.Parse(dataReader["fiapp_ter_glue_sticky"].ToString()), App_lead_glue_sticky = int.Parse(dataReader["fiapp_lead_glue_sticky"].ToString()), }; voList.add(outVo); } dataReader.Close(); return(voList); }
public ValueObject.BaseVO ObterPorFiltro(ValueObject.BaseVO baseVO) { throw new NotImplementedException(); }
public override ValueObject Execute(TransactionContext trxContext, ValueObject arg) { MoldVo inVo = (MoldVo)arg; StringBuilder sqlQuery = new StringBuilder(); sqlQuery.Append("Select md.mold_id, md.mold_cd, md.mold_name, mt.mold_type_id, mt.mold_type_cd, "); sqlQuery.Append(" md.width , md.depth , md.height , md.weight , "); sqlQuery.Append(" md.production_date_time , md.life_shot_count, "); sqlQuery.Append(" md.comment "); sqlQuery.Append(" from m_mold md "); sqlQuery.Append("left join m_mold_type mt on md.mold_type_id = mt.mold_type_id "); sqlQuery.Append(" where md.factory_cd = :faccd "); if (inVo.MoldId > 0) { sqlQuery.Append(" and md.mold_id = :moldid "); } if (inVo.MoldCode != null) { sqlQuery.Append(" and md.mold_cd like :moldcd "); } if (inVo.MoldName != null) { sqlQuery.Append(" and md.mold_name like :moldname "); } if (inVo.MoldTypeId != 0) { sqlQuery.Append(" and mt.mold_type_id = :moldtypeid "); } sqlQuery.Append(" order by md.mold_cd"); //create command DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString()); //create parameter DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList(); if (!string.IsNullOrEmpty(inVo.FactoryCode)) { sqlParameter.AddParameterString("faccd", inVo.FactoryCode); } else { sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode); } if (inVo.MoldId != 0) { sqlParameter.AddParameterInteger("moldid", inVo.MoldId); } if (inVo.MoldCode != null) { sqlParameter.AddParameterString("moldcd", inVo.MoldCode + "%"); } if (inVo.MoldName != null) { sqlParameter.AddParameterString("moldname", inVo.MoldName + "%"); } if (inVo.MoldTypeId != 0) { sqlParameter.AddParameterInteger("moldtypeid", inVo.MoldTypeId); } //execute SQL IDataReader dataReader = sqlCommandAdapter.ExecuteReader(trxContext, sqlParameter); MoldVo outVo = new MoldVo(); while (dataReader.Read()) { MoldVo currOutVo = new MoldVo(); currOutVo.MoldId = ConvertDBNull <Int32>(dataReader, "mold_id"); currOutVo.MoldCode = ConvertDBNull <string>(dataReader, "mold_cd"); currOutVo.MoldName = ConvertDBNull <string>(dataReader, "mold_name"); currOutVo.MoldTypeId = ConvertDBNull <Int32>(dataReader, "mold_type_id"); currOutVo.MoldTypeCode = ConvertDBNull <string>(dataReader, "mold_type_cd"); currOutVo.Width = ConvertDBNull <decimal>(dataReader, "width"); currOutVo.Depth = ConvertDBNull <decimal>(dataReader, "depth"); currOutVo.Height = ConvertDBNull <decimal>(dataReader, "height"); currOutVo.Weight = ConvertDBNull <decimal>(dataReader, "weight"); currOutVo.ProductionDate = ConvertDBNull <DateTime>(dataReader, "production_date_time"); currOutVo.Comment = ConvertDBNull <string>(dataReader, "comment"); currOutVo.LifeShotCount = ConvertDBNull <Int32>(dataReader, "life_shot_count"); outVo.MoldListVo.Add(currOutVo); } dataReader.Close(); return(outVo); }
public ValueObject.BaseVO ObterDadosVOPorCampo(string campo, ValueObject.BaseVO baseVO, List<string> listaRetorno = null, bool buscaExata = true) { throw new NotImplementedException(); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(getModelDao.Execute(trxContext, vo)); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(getInspectionSpecificationSeqDao.Execute(trxContext, vo)); }
public override ValueObject Execute(TransactionContext trxContext, ValueObject vo) { InvertoryVo inVo = (InvertoryVo)vo; StringBuilder sql = new StringBuilder(); ValueObjectList <InvertoryVo> voList = new ValueObjectList <InvertoryVo>(); DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, string.Empty); DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList(); sql.Append(@"select c.asset_id, a.invertory_time_id, a.invertory_time_cd, a.invertory_time_name,b.invertory_equipments_id, b.invertory_value, b.registration_user_cd, b.registration_date_time, b.factory_cd, d.asset_cd, d.asset_name, e.location_cd as beforelocation, f.rank_name , g.location_cd as nowlocation, c.warehouse_main_id from t_invertory_equipments b left join m_invertory_time a on b.invertory_time_id = a.invertory_time_id left join t_warehouse_main c on b.warehouse_main_id = c.warehouse_main_id left join m_asset d on d.asset_id = c.asset_id left join m_location e on e.location_id = c.after_location_id left join m_rank f on f.rank_id = c.rank_id left join m_location g on g.location_id = b.location_id "); sql.Append(" Where 1=1 "); if (!string.IsNullOrEmpty(inVo.AssetCode)) { sql.Append(" and d.asset_cd = :asset_cd "); sqlParameter.AddParameterString("asset_cd", inVo.AssetCode); } if (!string.IsNullOrEmpty(inVo.InvertoryTimeCode)) { sql.Append(" and a.invertory_time_cd = :invertory_time_cd "); sqlParameter.AddParameterString("invertory_time_cd", inVo.InvertoryTimeCode); } if (!string.IsNullOrEmpty(inVo.NowLocation)) { sql.Append(" and g.location_cd = :location_cd "); sqlParameter.AddParameterString("location_cd", inVo.NowLocation); } //create command //DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString()); //execute SQL IDataReader dataReader = sqlCommandAdapter.ExecuteReader(trxContext, sqlParameter); while (dataReader.Read()) { InvertoryVo outVo = new InvertoryVo { InvertoryEquipmentId = int.Parse(dataReader["invertory_equipments_id"].ToString()), AssetCode = dataReader["asset_cd"].ToString(), AssetName = dataReader["asset_name"].ToString(), InvertoryValue = bool.Parse(dataReader["invertory_value"].ToString()), BeforeLocation = dataReader["beforelocation"].ToString(), NowLocation = dataReader["nowlocation"].ToString(), RankNameBefore = dataReader["rank_name"].ToString(), RegistrationUserCode = dataReader["registration_user_cd"].ToString(), RegistrationDateTime = DateTime.Parse(dataReader["registration_date_time"].ToString()), FactoryCode = dataReader["factory_cd"].ToString(), WarehouseMainId = int.Parse(dataReader["warehouse_main_id"].ToString()), AssetId = int.Parse(dataReader["asset_id"].ToString()), }; voList.add(outVo); } dataReader.Close(); return(voList); }
/// <summary> /// Execute the dao /// </summary> /// <param name="trxContext"></param> /// <param name="vo"></param> /// <returns></returns> public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(changePwdDao.Execute(trxContext, vo)); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(deleteRoleAuthorityControlDao.Execute(trxContext, vo)); }
public override List<ValueObject.BaseVO> ObterListaVO(ValueObject.BaseVO baseVO) { if (baseVO == null) Query = "select * from SJ_COMPETICAO_ANO_RODADA order by id_rodada ASC"; return base.ObterListaVO(); }
public override ValueObject Execute(TransactionContext trxContext, ValueObject arg) { //InspectionTestInstructionVo inVo = (InspectionTestInstructionVo)arg; ValueObjectList <ValueObjectList <ValueObject> > inVo = (ValueObjectList <ValueObjectList <ValueObject> >)arg; List <int> InspectionTestInstructionList = new List <int>(); foreach (ValueObjectList <ValueObject> getTestInstructionVo in inVo.GetList()) { if ((((InspectionTestInstructionVo)getTestInstructionVo.GetList()[0]).InspectionTestInstructionId) != 0) { InspectionTestInstructionList.Add(((InspectionTestInstructionVo)getTestInstructionVo.GetList()[0]).InspectionTestInstructionId); } } StringBuilder sqlQuery = new StringBuilder(); sqlQuery.Append("select"); sqlQuery.Append(" itinsth.inspection_test_instruction_id,"); sqlQuery.Append(" itinsth.inspection_test_instruction_cd,"); sqlQuery.Append(" itinsth.inspection_test_instruction_text,"); sqlQuery.Append(" itinstd.inspection_test_instruction_detail_id,"); sqlQuery.Append(" itinstd.inspection_test_instruction_detail_cd,"); sqlQuery.Append(" itinstd.inspection_test_instruction_detail_text,"); sqlQuery.Append(" itinstd.inspection_test_instruction_detail_result_count,"); sqlQuery.Append(" itinstd.inspection_test_instruction_detail_machine_text"); sqlQuery.Append(" from m_inspection_test_instruction itinsth"); sqlQuery.Append(" inner join m_inspection_test_instruction_detail itinstd"); sqlQuery.Append(" on itinstd.inspection_test_instruction_id = itinsth.inspection_test_instruction_id"); sqlQuery.Append(" where itinsth.factory_cd = :faccd "); //if (inVo.InspectionTestInstructionDetailCode != null) //{ // sqlQuery.Append(" and itinstd.inspection_test_instruction_detail_cd like :inspectiontestinstructiondetailcd "); //} //if (inVo.InspectionTestInstructionDetailText != null) //{ // sqlQuery.Append(" and itinstd.inspection_test_instruction_detail_text like :inspectiontestinstructiondetailtext "); //} //if (inVo.InspectionTestInstructionId > 0) //{ sqlQuery.Append(" and itinstd.inspection_test_instruction_id = ANY(:inspectiontestinstructionid) "); //} //if (inVo.InspectionTestInstructionDetailId > 0) //{ // sqlQuery.Append(" and itinstd.inspection_test_instruction_detail_id = :inspectiontestinstructiondetailid "); //} sqlQuery.Append(" order by itinstd.inspection_test_instruction_detail_cd"); //create command DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sqlQuery.ToString()); //create parameter DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList(); sqlParameter.AddParameterString("faccd", UserData.GetUserData().FactoryCode); //if (inVo.InspectionTestInstructionDetailCode != null) //{ // sqlParameter.AddParameterString("inspectiontestinstructiondetailcd", inVo.InspectionTestInstructionDetailCode + "%"); //} //if (inVo.InspectionTestInstructionDetailText != null) //{ // sqlParameter.AddParameterString("inspectiontestinstructiondetailtext", inVo.InspectionTestInstructionDetailText + "%"); //} //if (inVo.InspectionTestInstructionId > 0) //{ sqlParameter.AddParameter("inspectiontestinstructionid", InspectionTestInstructionList); //} //if (inVo.InspectionTestInstructionDetailId > 0) //{ // sqlParameter.AddParameterInteger("inspectiontestinstructiondetailid", inVo.InspectionTestInstructionDetailId); //} //execute SQL IDataReader dataReader = sqlCommandAdapter.ExecuteReader(trxContext, sqlParameter); ValueObjectList <InspectionTestInstructionVo> outVo = null; while (dataReader.Read()) { InspectionTestInstructionVo currOutVo = new InspectionTestInstructionVo(); currOutVo.InspectionTestInstructionId = ConvertDBNull <int>(dataReader, "inspection_test_instruction_id"); currOutVo.InspectionTestInstructionCode = ConvertDBNull <string>(dataReader, "inspection_test_instruction_cd"); currOutVo.InspectionTestInstructionText = ConvertDBNull <string>(dataReader, "inspection_test_instruction_text"); currOutVo.InspectionTestInstructionDetailId = ConvertDBNull <int>(dataReader, "inspection_test_instruction_detail_id"); currOutVo.InspectionTestInstructionDetailCode = ConvertDBNull <string>(dataReader, "inspection_test_instruction_detail_cd"); currOutVo.InspectionTestInstructionDetailText = ConvertDBNull <string>(dataReader, "inspection_test_instruction_detail_text"); currOutVo.InspectionTestInstructionDetailResultCount = ConvertDBNull <int>(dataReader, "inspection_test_instruction_detail_result_count"); currOutVo.InspectionTestInstructionDetailMachine = ConvertDBNull <string>(dataReader, "inspection_test_instruction_detail_machine_text"); if (outVo == null) { outVo = new ValueObjectList <InspectionTestInstructionVo>(); } outVo.add(currOutVo); } dataReader.Close(); return(outVo); }
public void Incluir(ValueObject.BaseVO baseVO) { new CompeticaoDAO().Salvar(baseVO); }
private static void AppendValueObjectSignaturePropertyCriteriaTo(ICriteria criteria, Type entityType, string valueObjectPropertyName, ValueObject valueObject) { if (valueObject == null) { return; } foreach (PropertyInfo signatureProperty in valueObject.GetSignatureProperties()) { Type propertyType = signatureProperty.PropertyType; object propertyValue = signatureProperty.GetValue(valueObject, null); string propertyName = GetPropertyName(valueObjectPropertyName, signatureProperty); AppendSimplePropertyCriteriaTo(criteria, entityType, propertyValue, propertyType, propertyName); } }
public void Incluir(ValueObject.BaseVO baseVO) { new AnoDAO().Salvar(baseVO); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(submitDispatchReportItemDao.Execute(trxContext, vo)); }
/// <summary> /// executing transaction /// </summary> /// <param name="cbm">cbm to be executed</param> /// <param name="vo">input vo for the cbm</param> /// <param name="userData">userdata</param> /// <param name="trxFactory">TransactionContextFactory to get transactioncontext using userdata</param> /// <param name="connectionString">connectionString for connecting with another database</param> /// <exception cref="Com.Nidec.Mes.Framework.ApplicationException">application exception handled in cbm access and cbm invoke</exception> /// <exception cref="Com.Nidec.Mes.Framework.SystemException">system exception handled in cbm access and cbm invoke</exception> /// <exception cref="System.Exception">Unhandled exception occured has been thrown as system exception in cbm access and cbm invoke</exception> /// <returns>output vo will be returned / exception will be thrown for error cases</returns> internal static ValueObject Invoke(CbmController cbm, ValueObject vo, UserData userData, TransactionContextFactory trxFactory, string connectionString) { if (cbm == null) { MessageData messageData = new MessageData("ffce00041", Properties.Resources.ffce00041, System.Reflection.MethodBase.GetCurrentMethod().Name); logger.Error(messageData, new NullReferenceException()); throw new SystemException(messageData, new NullReferenceException()); } if (trxFactory == null) { //please write code here defaultTrxFactory.GetTransactionContext(userData); trxFactory = defaultTrxFactory; } IDbTransaction dbTransaction = null; IDbConnection connection = null; //Get TransactionContext TransactionContext trxContext = trxFactory.GetTransactionContext(userData); try { connection = new MySqlConnection(connectionString); trxContext.DbConnection = connection; trxContext.DbConnection.Open(); dbTransaction = trxContext.DbConnection.BeginTransaction(); //Start transaction ValueObject returnedVo = cbm.Execute(trxContext, vo); //commit dbTransaction.Commit(); return(returnedVo); } catch (ApplicationException appEx) { //rollback DbTransactionRollback(dbTransaction); MessageData messageData = new MessageData("ffce00042", Properties.Resources.ffce00042, appEx.Message); logger.Error(messageData, appEx); throw appEx; //throw original app exception } catch (SystemException sysEx) { //rollback DbTransactionRollback(dbTransaction); MessageData messageData = new MessageData("ffce00043", Properties.Resources.ffce00043, sysEx.Message); logger.Error(messageData, sysEx); throw sysEx; //throw original sys exception } catch (Exception Ex) { //rollback DbTransactionRollback(dbTransaction); MessageData messageData = new MessageData("ffce00044", Properties.Resources.ffce00044, Ex.Message); logger.Error(messageData, Ex); throw new SystemException(messageData, Ex); //throw original exception as sys exception } finally { try { if (connection != null) { connection.Close(); } } catch (Exception ex) { //need to be implemented MessageData messageData = new MessageData("ffce00045", Properties.Resources.ffce00045, ex.Message); logger.Error(messageData, ex); throw new SystemException(messageData, ex); //throw original exception as sys exception } } }
public Command(string name, ValueObject value = null) : base(name, value ?? new ValueObject(false)) { }
private static bool AddKeyValueToDict(ref Hashtable dict, string key, ValueObject value) { // Make sure that we have values that we can work with. if (dict == null || key == null || key.Length < 1 || value == null) { Debug.LogError("Attempted to AddKeyValueToDict() with null objects."); return false; } // If the hashtable doesn't already contain the key, they we can just go ahead and add it. if (!dict.ContainsKey(key)) { dict.Add(key, value.val); return true; } // At this point, the dict contains already contains the key we're trying to add. // If the value for this key is of a different type between the dict and the new value, then we have a type mismatch. // Post an error stating so, but go ahead and overwrite the existing key value. if (value.val.GetType() != dict[key].GetType()) { Debug.LogWarning("Value type mismatch for overlapping key (will replace old value with new one): " + value.val + ", " + dict[key] + ", " + key); dict[key] = value.val; } // If the value for this key is a hashtable, then we need to recursively add the key values of each hashtable. else if (value.val.GetType() == typeof(Hashtable)) { // Itterate through the elements of the value's hashtable. Hashtable htTmp = (Hashtable)value.val; foreach (object element in htTmp) { // Recursively attempt to add/repalce the elements of the value hashtable to the dict's value hashtable. // If this fails, post a message stating so and return false. Hashtable htRef = (Hashtable)dict[key]; if (!AddKeyValueToDict(ref htRef, (string)element, new ValueObject(htTmp[element]))) { Debug.LogError("Failed to add key value to dict: " + element + ", " + htTmp[element] + ", " + dict[key]); return false; } } } // If the value is an array, then there's really no way we can tell which elements to overwrite, because this is done based on the congruent keys. // Thus, we'll just add the elements of the array to the existing array. else if (value.val.GetType() == typeof(ArrayList)) { ArrayList alTmp = (ArrayList)value.val; ArrayList alAddTmp = (ArrayList)dict[key]; foreach (object element in alTmp) { alAddTmp.Add(element); } } // If the key value is not an array or a hashtable, then it's a primitive value that we can easily write over. else { dict[key] = value.val; } return true; }
public static void CheckTestCasesAndConditionsAndActions(TestCasesRoot tcr) { int testCasesCount = tcr.TestCases.Count; int conditionsCount = tcr.Conditions.Count; int actionsCount = tcr.Actions.Count; for (int testCaseIndex = 0; testCaseIndex < tcr.TestCases.Count; testCaseIndex++) { TestCase tc = tcr.TestCases[testCaseIndex]; Assert.That(tc.Conditions.Count == conditionsCount); Assert.That(tc.Actions.Count == actionsCount); var actionCol = tcr.ActionTable.Columns[testCaseIndex + 1]; Assert.That(tc.Name.Equals(actionCol.Caption)); var conditionCol = tcr.ConditionTable.Columns[testCaseIndex + 1]; Assert.That(tc.Name.Equals(conditionCol.Caption)); for (int conditionIndex = 0; conditionIndex < tcr.Conditions.Count; conditionIndex++) { ConditionObject co = tcr.Conditions[conditionIndex]; Assert.That(co.TestValues.Count == testCasesCount); Assert.That(tc.Conditions[conditionIndex].ConditionOrActionParent.Equals(co)); ValueObject tcValueObject = tc.Conditions[conditionIndex]; ValueObject condValueObject = tcr.Conditions[conditionIndex].TestValues[testCaseIndex]; Assert.That(tcValueObject == condValueObject); Assert.That(tcValueObject.EnumValues == condValueObject.EnumValues); } for (int actionIndex = 0; actionIndex < tcr.Actions.Count; actionIndex++) { ActionObject co = tcr.Actions[actionIndex]; Assert.That(co.TestValues.Count == testCasesCount); Assert.That(tc.Actions[actionIndex].ConditionOrActionParent.Equals(co)); ValueObject tcValueObject = tc.Actions[actionIndex]; ValueObject actionValueObject = tcr.Actions[actionIndex].TestValues[testCaseIndex]; Assert.That(tcValueObject == actionValueObject); Assert.That(tcValueObject.EnumValues == actionValueObject.EnumValues); } } Assert.That(tcr.ConditionTable.Columns.Count == tcr.TestCases.Count + 1); Assert.That(tcr.ConditionTable.Columns.Count == tcr.TestCases.Count + 1); Assert.That(tcr.ActionTable.Columns.Count == tcr.TestCases.Count + 1); Assert.That(tcr.ActionTable.Columns.Count == tcr.TestCases.Count + 1); for (int rowIndex = 0; rowIndex < tcr.ConditionTable.Rows.Count; rowIndex++) { DataRow rowView = tcr.ConditionTable.Rows[rowIndex]; Assert.That(rowView.ItemArray.Length == tcr.TestCases.Count + 1); Assert.That(rowView[0] is ConditionObject); Assert.That(rowView[0] == tcr.Conditions[rowIndex]); for (int colIndex = 1; colIndex < tcr.ConditionTable.Columns.Count; colIndex++) { ValueObject vo = rowView[colIndex] as ValueObject; TestCase tc = tcr.TestCases[colIndex - 1]; Assert.That(vo == tc.Conditions[rowIndex]); } } for (int rowIndex = 0; rowIndex < tcr.ActionTable.Rows.Count; rowIndex++) { DataRow rowView = tcr.ActionTable.Rows[rowIndex]; Assert.That(rowView.ItemArray.Length == tcr.TestCases.Count + 1); Assert.That(rowView[0] is ActionObject); Assert.That(rowView[0] == tcr.Actions[rowIndex]); for (int colIndex = 1; colIndex < tcr.ActionTable.Columns.Count; colIndex++) { ValueObject vo = rowView[colIndex] as ValueObject; TestCase tc = tcr.TestCases[colIndex - 1]; Assert.That(vo == tc.Actions[rowIndex]); } } }
private static bool LoadDictFromPlistNode(XmlNode node, ref Hashtable dict) { if (node == null) { Debug.LogError("Attempted to load a null plist dict node."); return false; } if (!node.Name.Equals("dict")) { Debug.LogError("Attempted to load an dict from a non-array node type: " + node + ", " + node.Name); return false; } if (dict == null) { dict = new Hashtable(); } int cnodeCount = node.ChildNodes.Count; for (int i = 0; i+1 < cnodeCount; i+=2) { // Select the key and value child nodes XmlNode keynode = node.ChildNodes.Item(i); XmlNode valuenode = node.ChildNodes.Item(i+1); // If this node isn't a 'key' if (keynode.Name.Equals("key")) { // Establish our variables to hold the key and value. string key = keynode.InnerText; ValueObject value = new ValueObject(); // Load the value node. // If the value node loaded successfully, add the key/value pair to the dict hashtable. if (LoadValueFromPlistNode(valuenode, ref value)) { // This could be one of several different possible data types, including another dict. // AddKeyValueToDict() handles this by replacing existing key values that overlap, and doing so recursively for dict values. // If this not successful, post a message stating so and return false. if (!AddKeyValueToDict(ref dict, key, value)) { Debug.LogError("Failed to add key value to dict when loading plist from dict"); return false; } } else { Debug.LogError("Did not load plist value correctly for key in node: " + key + ", " + node); return false; } } else { Debug.LogError("The plist being loaded may be corrupt."); return false; } } //end for return true; }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(deleteInspectionItemSelectionValueDao.Execute(trxContext, vo)); }
public List<ValueObject.BaseVO> ObterListaVO(ValueObject.BaseVO baseVO) { throw new NotImplementedException(); }
/// <summary> /// method definition for Execute /// </summary> /// <param name="trxContext"></param> /// <param name="vo"></param> /// <returns></returns> public abstract ValueObject Execute(TransactionContext trxContext, ValueObject vo);
public bool ExisteRegistro(string campo_pesquisa, ValueObject.BaseVO baseVO) { throw new NotImplementedException(); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(checkMoldCategoryDao.Execute(trxContext, vo)); }
public List<string> ObterDadosPorCampo(string campo, ValueObject.BaseVO baseVO, bool buscaExata = true) { throw new NotImplementedException(); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(addPaletteDao.Execute(trxContext, vo)); }
public List<string> ObterLista(ValueObject.BaseVO baseVO, List<string> listaPesquisa = null) { throw new NotImplementedException(); }
protected static bool NotEqualOperator(ValueObject left, ValueObject right) { return(!(EqualOperator(left, right))); }
public override ValueObject Execute(TransactionContext trxContext, ValueObject vo) { WareHouseMainVo inVo = (WareHouseMainVo)vo; StringBuilder sql = new StringBuilder(); ValueObjectList <WareHouseMainVo> voList = new ValueObjectList <WareHouseMainVo>(); //create command DbCommandAdaptor sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString()); //create parameter DbParameterList sqlParameter = sqlCommandAdapter.CreateParameterList(); sql.Append(@"select g.unit,c.location_cd as before, j.location_cd as after, h.detail_postion_cd, g.warehouse_main_id,c.location_cd,e.asset_cd, e.asset_no, e.asset_name, e.asset_model, e.asset_serial, e.asset_supplier, g.qty, a.account_code_cd, b.account_location_cd, f.rank_cd, b.account_location_name, g.comment_data, e.asset_life, e.acquistion_date, e.acquistion_cost, g.depreciation_start, g.depreciation_end, g.current_depreciation,g.monthly_depreciation, g.accum_depreciation_now, g.net_value, e.asset_invoice, g.registration_date_time, g.registration_user_cd from t_warehouse_main g left join m_account_code a on a.account_code_id = g.account_code_id left join m_account_location b on b.account_location_id = g.account_location_id left join m_location c on c.location_id = g.before_location_id left join m_location j on j.location_id = g.after_location_id left join m_user_location d on d.user_location_id = g.user_location_id left join m_asset e on e.asset_id = g.asset_id left join m_rank f on f.rank_id = g.rank_id left join m_detail_postion h on h.detail_postion_id = g.detail_position_id where 1=1 "); if (!String.IsNullOrEmpty(inVo.AssetCode)) { sql.Append(@" and e.asset_cd =:asset_cd"); sqlParameter.AddParameterString("asset_cd", inVo.AssetCode); } if (!String.IsNullOrEmpty(inVo.RankCode)) { sql.Append(" and f.rank_cd =:rank_cd"); sqlParameter.AddParameterString("rank_cd", inVo.RankCode); } if (!String.IsNullOrEmpty(inVo.AssetModel)) { sql.Append(" and e.asset_model =:asset_model"); sqlParameter.AddParameterString("asset_model", inVo.AssetModel); } if (!String.IsNullOrEmpty(inVo.AssetName)) { sql.Append(" and e.asset_name =:asset_name"); sqlParameter.AddParameterString("asset_name", inVo.AssetName); } if (!String.IsNullOrEmpty(inVo.AssetType)) { sql.Append(" and e.asset_type =:asset_type"); sqlParameter.AddParameterString("asset_type", inVo.AssetType); } if (!String.IsNullOrEmpty(inVo.AssetInvoice)) { sql.Append(" and e.asset_invoice =:asset_invoice"); sqlParameter.AddParameterString("asset_invoice", inVo.AssetInvoice); } if (!String.IsNullOrEmpty(inVo.AfterLocationCd)) { sql.Append(" and j.location_cd =:location_cd"); sqlParameter.AddParameterString("location_cd", inVo.AfterLocationCd); } if (!String.IsNullOrEmpty(inVo.DetailPositionCd)) { sql.Append(" and h.detail_postion_cd =:detail_postion_cd"); sqlParameter.AddParameterString("detail_postion_cd", inVo.DetailPositionCd); } sql.Append(" order by g.registration_date_time desc"); sqlCommandAdapter = base.GetDbCommandAdaptor(trxContext, sql.ToString()); //execute SQL IDataReader dataReader = sqlCommandAdapter.ExecuteReader(trxContext, sqlParameter); while (dataReader.Read()) { WareHouseMainVo outVo = new WareHouseMainVo { // , h., i., k., o.prodution_work_content_name WareHouseMainId = int.Parse(dataReader["warehouse_main_id"].ToString()), AfterLocationCd = dataReader["after"].ToString(), BeforeLocationCd = dataReader["before"].ToString(), DetailPositionCd = dataReader["detail_postion_cd"].ToString(), AssetCode = dataReader["asset_cd"].ToString(), AssetNo = int.Parse(dataReader["asset_no"].ToString()), AssetName = dataReader["asset_name"].ToString(), AssetModel = dataReader["asset_model"].ToString(), AssetSerial = dataReader["asset_serial"].ToString(), AssetSupplier = dataReader["asset_supplier"].ToString(), QTY = int.Parse(dataReader["qty"].ToString()), Unit = dataReader["unit"].ToString(), AccountCodeCode = dataReader["account_code_cd"].ToString(), AccountLocationCode = dataReader["account_location_cd"].ToString(), RankCode = dataReader["rank_cd"].ToString(), AccountLocationName = dataReader["account_location_name"].ToString(), CommnetsData = dataReader["comment_data"].ToString(), AssetLife = int.Parse(dataReader["asset_life"].ToString()), AcquisitionDate = DateTime.Parse(dataReader["acquistion_date"].ToString()), AcquisitionCost = double.Parse(dataReader["acquistion_cost"].ToString()), StartDepreciation = DateTime.Parse(dataReader["depreciation_start"].ToString()), EndDepreciation = DateTime.Parse(dataReader["depreciation_end"].ToString()), CurrentDepreciation = double.Parse(dataReader["current_depreciation"].ToString()), MonthlyDepreciation = double.Parse(dataReader["monthly_depreciation"].ToString()), AccumDepreciation = double.Parse(dataReader["accum_depreciation_now"].ToString()), NetValue = double.Parse(dataReader["net_value"].ToString()), AssetInvoice = (dataReader["asset_invoice"].ToString()), RegistrationDateTime = DateTime.Parse(dataReader["registration_date_time"].ToString()), RegistrationUserCode = (dataReader["registration_user_cd"].ToString()), }; voList.add(outVo); } dataReader.Close(); return(voList); }
public ValueObject Execute(TransactionContext trxContext, ValueObject vo) { return(deleteCastingMachineFurnaceDao.Execute(trxContext, vo)); }