/// <summary> /// 内訳データテーブルの初期化 /// </summary> protected override void InitDetail() { DataTable dt = new DataTable(MESConsts.MaterialCostTbl); dt.Columns.Add(MESConsts.base_date, typeof(DateTime)); dt.Columns.Add(MESConsts.material_code, typeof(string)); dt.Columns.Add(MESConsts.material_name, typeof(string)); dt.Columns.Add(MESConsts.item_thickness, typeof(double)); dt.Columns.Add(MESConsts.item_width, typeof(double)); dt.Columns.Add(MESConsts.item_length, typeof(double)); dt.Columns.Add(MESConsts.chamfer_type_code, typeof(string)); dt.Columns.Add(MESConsts.material_size, typeof(string)); dt.Columns.Add(MESConsts.supplier_cd, typeof(string)); dt.Columns.Add(MESConsts.supplier_name, typeof(string)); dt.Columns.Add(MESConsts.unit_weight, typeof(double)); dt.Columns.Add(MESConsts.kilo_cost, typeof(double)); dt.Columns.Add(MESConsts.edited_kilo_cost, typeof(double)); dt.Columns.Add(MESConsts.material_cost_cutting, typeof(double)); dt.Columns.Add(MESConsts.material_qty, typeof(double)); dt.Columns.Add(MESConsts.chamfer_cost, typeof(double)); dt.Columns.Add(MESConsts.other_processing_cost, typeof(double)); dt.Columns.Add(MESConsts.material_cost_total, typeof(double)); // NOTE:MES工程編集画面連携用(only output) dt.Columns.Add(MESConsts.item_ext3, typeof(string)); // = supplier_cd dt.Columns.Add(MESConsts.item_ext4, typeof(double)); // = other_processing_cost dt.Columns.Add(MESConsts.item_ext5, typeof(double)); // = material_cost_total dt.Columns.Add(MESConsts.item_ext6, typeof(double)); // = material_qty dt.Columns.Add(MESConsts.item_ext7, typeof(double)); // = edited_kilo_cost dt.AcceptChanges(); DeepCopyUtil dcu = new DeepCopyUtil(); _detail = dcu.DeepCopy(dt); }
/// <summary> /// ウィンドウ表示状態取得 /// </summary> /// <param name="sessionId"></param> /// <param name="windowName"></param> /// <param name="ctlName"></param> /// <returns></returns> public DataTable GetWindowState(string loginId, string windowName, string ctlName) { SQLDBUtil db = new SQLDBUtil(_logger); DataSet ret = null; List <SqlParameter> param = new List <SqlParameter>(); try { db.Open(_connectString); param.Add(new SqlParameter("@window_name", windowName)); param.Add(new SqlParameter("@control_name", ctlName)); param.Add(new SqlParameter("@login_id", loginId)); ret = db.ExecSelect(SQLSrc.t_window_state.SELECT_STATE_ONE, param.ToArray()); if (ret.Tables[0].Rows.Count == 0) { List <SqlParameter> param2 = new List <SqlParameter>(); param2.Add(new SqlParameter("@window_name", windowName)); param2.Add(new SqlParameter("@control_name", ctlName)); param2.Add(new SqlParameter("@login_id", "")); ret = db.ExecSelect(SQLSrc.t_window_state.SELECT_STATE_ONE, param2.ToArray()); } ret.Tables[0].TableName = "WindowState"; return((DataTable)_dcu.DeepCopy(ret.Tables[0])); } finally { db.Close(); } }
/// <summary> /// システムコード情報を取得 /// </summary> /// <returns></returns> public DataTable GetSystemCodeInfo(string category) { SQLDBUtil db = new SQLDBUtil(_logger); DataSet ret = null; List <SqlParameter> param = new List <SqlParameter>(); try { db.Open(_connectString); param.Add(new SqlParameter("@category", category)); ret = db.ExecSelect(SQLSrc.m_system_code.SELECT_CANDIDATE, param.ToArray()); ret.Tables[0].TableName = category; return((DataTable)_dcu.DeepCopy(ret.Tables[0])); } finally { db.Close(); } }