protected void Edit_Screen() { ComLibrary com = new ComLibrary(); Message msg = new Message(g_user_id, g_lang); Rcv rc = new Rcv(g_user_id, g_lang); DataSet ds = new DataSet(); gdvDetail.DataSource = null; gdvDetail.DataBind(); ViewState["gdvDetail"] = null; //rc.catg_cd = rdoTYPE.SelectedValue; //ds = rc.Get_Pur_RcvNoInspList2(); //if (ds == null) //{ // lblMsg.Text = rc.strErr; // lblMsg.ForeColor = Color.Red; // return; //} //if (ds.Tables[0].Rows.Count == 0) //{ // lblMsg.Text = msg.GetMessage("DATA_NOT_EXIST_ERR"); // lblMsg.ForeColor = Color.Red; // return; //} //else //{ // DataTable dt = ds.Tables[0]; // ViewState["gdvDetail"] = dt; // Edit_Grid(); //} }
protected void ddl_edit() { DataSet dt = new DataSet(); ComLibrary com = new ComLibrary(); Role role = new Role(g_user_id, g_lang); dt = role.GetRoleList(); ddl_USER_GROUP.DataValueField = "USER_GROUP_CODE"; ddl_USER_GROUP.DataTextField = "USER_GROUP_NAME"; ddl_USER_GROUP.DataSource = dt; ddl_USER_GROUP.DataBind(); ddl_USER_GROUP.Items.Insert(0, ""); dt = null; Dept dept = new Dept(g_user_id, g_lang); dt = dept.GetDEPTList(); ddl_DEPT_NO.DataValueField = "DEPT_NO"; ddl_DEPT_NO.DataTextField = "DEPT_NAME"; ddl_DEPT_NO.DataSource = dt; ddl_DEPT_NO.DataBind(); ddl_DEPT_NO.Items.Insert(0, ""); dt = null; Mgmt mgmt = new Mgmt(g_user_id, g_lang); dt = mgmt.GetMGMTList(); ddl_MGMT_LEVEL.DataValueField = "MANAGEMENT_LEVEL"; ddl_MGMT_LEVEL.DataTextField = "MANAGEMENT_DESCRIPTION"; ddl_MGMT_LEVEL.DataSource = dt; ddl_MGMT_LEVEL.DataBind(); ddl_MGMT_LEVEL.Items.Insert(0, ""); }
protected void cmdSave_Click(object sender, EventArgs e) { Transfer tran = new Transfer(g_user_id, g_lang); Message msg = new Message(g_user_id, g_lang); ComLibrary com = new ComLibrary(); tran.item_no = txtITEM_NO.Text; tran.lot_no = txtLOT_NO.Text; tran.act_qty = com.StringToDouble("1"); tran.die_no = txtDIE_NO.Text; tran.shift = txtSHIFT_NO.Text; //tran.Data_1 = "0"; //tran.Data_2 = "0"; //tran.Data_3 = "0"; //tran.Data_4 = "0"; //tran.Data_5 = "0"; if (tran.FEReceiveHT() == ComConst.FAILED) { lblMsg.Text = tran.strErr; lblMsg.ForeColor = Color.Red; return; } lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; }
protected void Edit_Screen() { ComLibrary com = new ComLibrary(); Message msg = new Message(g_user_id, g_lang); Inv inv = new Inv(g_user_id, g_lang); DataSet ds = new DataSet(); gdvDetail.DataSource = null; gdvDetail.DataBind(); ViewState["gdvDetail"] = null; inv.sch_id = ddlTYPE.SelectedValue; //ds = inv.GetRecvDisbList3(); //if (ds == null) //{ // lblMsg.Text = inv.strErr; // lblMsg.ForeColor = Color.Red; // return; //} //if (ds.Tables[0].Rows.Count == 0) //{ // lblMsg.Text = msg.GetMessage("DATA_NOT_EXIST_ERR"); // lblMsg.ForeColor = Color.Red; // return; //} //else //{ // DataTable dt = ds.Tables[0]; // ViewState["gdvDetail"] = dt; // Edit_Grid(); //} }
protected void cmdSave_Click(object sender, EventArgs e) { Transfer tran = new Transfer(g_user_id, g_lang); Message msg = new Message(g_user_id, g_lang); ComLibrary com = new ComLibrary(); tran.from_joc_cd = txtQR_NG.Text; tran.to_joc_cd = txtQR_OK.Text; if (ddlPROCESS.SelectedValue == "Crank Shaft") { if (tran.FEOffSwap() == ComConst.FAILED) { lblMsg.Text = tran.strErr; lblMsg.ForeColor = Color.Red; return; } } else { if (tran.FEOffSwapA() == ComConst.FAILED) { lblMsg.Text = tran.strErr; lblMsg.ForeColor = Color.Red; return; } } lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; }
protected void Edit_grid(DataTable dt) { ComLibrary com = new ComLibrary(); dgvDetail.DataSource = dt; dgvDetail.DataBind(); ViewState["dgvDetail"] = dt; }
protected void Edit_Screen() { ComLibrary com = new ComLibrary(); // ロールマスタを検索 Dept dept = new Dept(g_user_id, g_lang); dept.dept_cd = txtDepartment.Text.ToUpper(); txtDepartment.Text = dept.dept_cd; Clear_Screen(0); // 必須項目のチェック if (txtDepartment.Text == "") { Message msg = new Message(g_user_id, g_lang); lblMsg.Text = msg.GetMessage("INPUT_MANDATORY_ERR") + "(" + flblDepartment.Text + ")"; lblMsg.ForeColor = Color.Red; return; } int rtn = dept.GetDEPTDetail(); if (hdnUpdMode.Value == "1") { // // 新規のときは、すでに存在すればエラー // if (rtn != ComConst.FAILED) { Message msg = new Message(g_user_id, g_lang); lblMsg.Text = msg.GetMessage("ALREADY_EXIST_ERR"); lblMsg.ForeColor = Color.Red; return; } } else { // // 新規以外のときは、存在しなければエラー // if (rtn == ComConst.FAILED) { Message msg = new Message(g_user_id, g_lang); lblMsg.Text = msg.GetMessage("NOT_EXIST_ERR"); lblMsg.ForeColor = Color.Red; return; } else { // 画面編集 txtDeptName.Text = dept.dept_desc; txtDeptDesc.Text = dept.dept_desc2; } } hdnInputMode.Value = "1"; Screen_Control(hdnUpdMode.Value); }
protected void cmdIssue_Click(object sender, EventArgs e) { SaveGridData(); ComLibrary com = new ComLibrary(); Message msg = new Message(g_user_id, g_lang); WIPJo jo = new WIPJo(g_user_id, g_lang); DataTable dt = (DataTable)(ViewState["gdvDetail"]); if (dt == null) { return; } bool Find_flg = false; int rtn = 0; for (int i = 0; i < dt.Rows.Count; i++) { if (dt.Rows[i]["SELECT"].ToString() == "1") { Find_flg = true; jo.demand_no = dt.Rows[i]["Serialcode"].ToString(); jo.order_umsr = dt.Rows[i]["Rack_No"].ToString(); jo.ws_cd = dt.Rows[i]["Shift"].ToString(); jo.entry_date = DateTime.Now; //jo.chg_pgm = "MfgJOUpd"; jo.chg_user_id = g_user_id; rtn = jo.Mfg_JoUpd2(); if (rtn == ComConst.FAILED) { //db.DbRollback(); lblMsg.Text = jo.strErr; lblMsg.ForeColor = Color.Red; return; } } } if (!Find_flg) { lblMsg.Text = msg.GetMessage("NO_CHECK_ERR"); lblMsg.ForeColor = Color.Red; return; } else { Edit_Screen(); lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; } }
protected void ddl_edit() { DataSet dt = new DataSet(); ComLibrary com = new ComLibrary(); Dept dept = new Dept(g_user_id, g_lang); dt = dept.GetDEPTList(); ddl_DEPT_NO.DataValueField = "DEPT_NO"; ddl_DEPT_NO.DataTextField = "DEPT_NAME"; ddl_DEPT_NO.DataSource = dt; ddl_DEPT_NO.DataBind(); ddl_DEPT_NO.Items.Insert(0, ""); }
protected void cmdSave_Click(object sender, EventArgs e) { Jo jo = new Jo(g_user_id, g_lang); Message msg = new Message(g_user_id, g_lang); ComLibrary com = new ComLibrary(); jo.plan_no = txtLOT_NO.Text; jo.catg_cd = txtDEL_TYPE.Text; jo.demand_no = txtLOT_NO2.Text; if (ddlTYPE.SelectedValue == "Block") { if (jo.Inv_ManWhsInsert() == ComConst.FAILED) { lblMsg.Text = jo.strErr; lblMsg.ForeColor = Color.Red; return; } } if (ddlTYPE.SelectedValue == "Head") { if (jo.Inv_ManWhsInsertA() == ComConst.FAILED) { lblMsg.Text = jo.strErr; lblMsg.ForeColor = Color.Red; return; } } if (ddlTYPE.SelectedValue == "Crank Shaft") { if (jo.Inv_ManWhsInsertB() == ComConst.FAILED) { lblMsg.Text = jo.strErr; lblMsg.ForeColor = Color.Red; return; } } if (ddlTYPE.SelectedValue == "Conn Rod") { if (jo.Inv_ManWhsInsertC() == ComConst.FAILED) { lblMsg.Text = jo.strErr; lblMsg.ForeColor = Color.Red; return; } } lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; txtLOT_NO.Text = ""; txtDEL_TYPE.Text = ""; txtLOT_NO2.Text = ""; }
/// <summary> /// 明細削除ボタン /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnDET_DEL_Click(object sender, EventArgs e) { ComLibrary com = new ComLibrary(); Message msg = new Message(g_user_id, g_lang); //Location loc = new Location(g_user_id, g_lang); MfgBom Mfb = new MfgBom(g_user_id, g_lang); if (txtSequent.Text.Trim() == "") { lblMsg.Text = msg.GetMessage("INPUT_MANDATORY_ERR") + "(" + flblSequent.Text + ")"; lblMsg.ForeColor = Color.Red; return; } // 削除 //loc.whs_cd = hdnITEM_NO.Value; //loc.location = hdnSequent.Value; //loc.chg_pgm = "MstLocationMnt"; Mfb.data_char1 = txtBOM_No.Text; Mfb.data_num1 = com.StringToInt(txtBOM_Level.Text); Mfb.data_num2 = com.StringToInt(txtBOM_Sub_Level.Text); Mfb.parent_item_no = hdnITEM_NO.Value; Mfb.part_seq = com.StringToInt(hdnSequent.Value); Mfb.child_item_no = hdnChild_Item.Value; /*int rtn = loc.Delete(); * if (rtn != ComConst.SUCCEED) * { * lblMsg.Text = loc.strErr; * lblMsg.ForeColor = Color.Red; * return; * }*/ int rtn = Mfb.Delete(); if (rtn == ComConst.FAILED) { lblMsg.Text = Mfb.strErr; lblMsg.ForeColor = Color.Red; return; } if (dgvDetail.Rows.Count <= 1) { dgvDetail.PageIndex = 0; } Edit_Screen(); }
protected void cmdSave_Click(object sender, EventArgs e) { Transfer tran = new Transfer(g_user_id, g_lang); Message msg = new Message(g_user_id, g_lang); ComLibrary com = new ComLibrary(); tran.from_joc_cd = txtLOT_NO_1.Text; tran.to_joc_cd = txtLOT_NO_2.Text; if (tran.FEOnSwap() == ComConst.FAILED) { lblMsg.Text = tran.strErr; lblMsg.ForeColor = Color.Red; return; } lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; }
protected void cmdDisp_Click(object sender, EventArgs e) { Message msg = new Message(g_user_id, g_lang); ComLibrary com = new ComLibrary(); string filePath = ""; Boolean fileOK = false; if (FileUpload1.HasFile) { try { filePath = Server.MapPath("~/Excel/" + FileUpload1.FileName); FileUpload1.SaveAs(filePath); fileOK = true; } catch (Exception ex) { //lblMsg.Text = msg.GetMessage("UPLOAD_FAILED"); lblMsg.Text = lblMsg.Text + ex.ToString(); } } if (!fileOK) { lblMsg.Text = msg.GetMessage("UPLOAD_FAILED"); return; } dt = null; dt2 = null; EditGridView(out dt); EditGridView(out dt2); switch (ddlTYPE.Text.ToString()) { case "MC CKD": MCCKD_Import(filePath); break; case "FE CKD": FECKD_Import(filePath); break; } }
protected void cmdSave_Click(object sender, EventArgs e) { ComDB db = new ComDB(); ComLibrary comlb = new ComLibrary(); Message msg = new Message(g_user_id, g_lang); ComLibrary com = new ComLibrary(); DataSet ds = new DataSet(); Rcv rc1 = new Rcv(g_user_id, g_lang); int rtn = 0; if (txtITEM_NO.Text == "") { lblMsg.Text = msg.GetMessage("ITEM_NOT_EXIST_ERR"); lblMsg.ForeColor = Color.Red; return; } ds = rc1.GetPartNo(txtITEM_NO.Text); if (ds == null || ds.Tables[0].Rows.Count == 0) { lblMsg.Text = msg.GetMessage("ITEM_NOT_EXIST_ERR"); lblMsg.ForeColor = Color.Red; return; } if (!comlb.IsNumeric(txtRCV_QTY.Text.ToString())) { lblMsg.Text = "Receive Qty Error"; lblMsg.ForeColor = Color.Red; return; } rc1.part_no = txtITEM_NO.Text; rc1.receive_qty = com.StringToInt(txtRCV_QTY.Text); rc1.optmethod = "PC"; rtn = rc1.Insert(); if (rtn == ComConst.FAILED) { lblMsg.Text = rc1.strErr; lblMsg.ForeColor = Color.Red; return; } lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; txtITEM_NO.Text = ""; txtRCV_QTY.Text = ""; }
protected void SaveGridData() { if (gdvDetail.Rows.Count != 0) { ComLibrary com = new ComLibrary(); DataTable dt = (DataTable)(ViewState["gdvDetail"]); if (dt.Columns["SELECT"] == null) { dt.Columns.Add("SELECT"); } int j; for (int i = 0; i < gdvDetail.Rows.Count; i++) { j = gdvDetail.Rows[i].DataItemIndex; dt.Rows[j]["SELECT"] = com.BoolToInt(((CheckBox)gdvDetail.Rows[i].FindControl("chkSEL")).Checked); } ViewState["gdvDetail"] = dt; } }
protected void btnNext_Click(object sender, EventArgs e) { ComLibrary com = new ComLibrary(); if (com.StringToInt(ddlMonth.Text) == 12) { if (com.StringToInt(ddlYear.Text) == 2037) { return; } ddlMonth.Text = "01"; ddlYear.Text = (com.StringToInt(ddlYear.Text) + 1).ToString(); } else { ddlMonth.Text = (com.StringToInt(ddlMonth.Text) + 1).ToString("0#"); } ddlMonth_SelectedIndexChanged(null, null); }
protected void Edit_Grid() { int j; ComLibrary com = new ComLibrary(); DataTable dt = (DataTable)ViewState["gdvDetail"]; if (dt.Columns["SELECT"] == null) { dt.Columns.Add("SELECT"); } gdvDetail.DataSource = dt; gdvDetail.DataBind(); for (int i = 0; i < gdvDetail.Rows.Count; i++) { j = gdvDetail.Rows[i].DataItemIndex; if (dt.Rows[j]["SELECT"].ToString() != "") { ((CheckBox)gdvDetail.Rows[i].FindControl("chkSEL")).Checked = com.IntToBool(com.StringToInt(dt.Rows[j]["SELECT"].ToString())); } } }
/// <summary> /// EDIT DROP DOWN LIST /// </summary> protected void ddl_edit() { DataSet dt = new DataSet(); ComLibrary com = new ComLibrary(); Transfer tf = new Transfer(g_user_id, g_lang); tf.to_process_cd = "Crank Shaft"; dt = tf.GetUnplannedRcvActList2(); DataTable dt2 = new DataTable(); dt2.Columns.Add(new DataColumn("PROCESS_NO")); dt2.Columns.Add(new DataColumn("PROCESS_NAME")); dt2.Rows.Add("Crank Shaft", "Crank Shaft"); //dt2.Rows.Add("Conn Rod", "Conn Rod"); ddlPROCESS.DataValueField = "PROCESS_NO"; ddlPROCESS.DataTextField = "PROCESS_NAME"; ddlPROCESS.DataSource = dt2; ddlPROCESS.DataBind(); dt2 = null; dt2 = dt.Tables[0]; ViewState["detail"] = dt2; if (dt2.Rows.Count > 0) { hdnNo.Value = "1"; hdnMaxNo.Value = dt2.Rows.Count.ToString(); lblNo.Text = hdnNo.Value + " of " + hdnMaxNo.Value; txtITEM_NO.Text = dt2.Rows[0]["PART_NO"].ToString(); txtLOT_NO.Text = dt2.Rows[0]["LOT_NO"].ToString(); txtRCV_QTY.Text = dt2.Rows[0]["RECEIVE_QTY"].ToString(); txtDIE_NO.Text = dt2.Rows[0]["DIE_NO"].ToString(); txtSHIFT_NO.Text = dt2.Rows[0]["SHIFT"].ToString(); } }
protected void dgvSearch_RowDataBound(object sender, GridViewRowEventArgs e) { string strEvent = ""; ComLibrary com = new ComLibrary(); string rowID = String.Empty; if (e.Row.DataItemIndex >= 0) { rowID = "row" + e.Row.RowIndex; e.Row.Attributes.Add("id", "row" + e.Row.RowIndex); strEvent = String.Format("SelectedRow('{0}', '{1}')", com.SetJsStr(((TextBox)e.Row.FindControl("lblDeptCd")).Text), com.SetJsStr(((TextBox)e.Row.FindControl("lblDeptDesc")).Text)); e.Row.Attributes.Add("onClick", strEvent); //strEvent = String.Format("MouseoverRow('{0}')", rowID); strEvent = String.Format("this.style.background='{0}'", "orange"); e.Row.Attributes.Add("onmouseover", strEvent); //strEvent = String.Format("MouseoutRow('{0}')", rowID); strEvent = String.Format("this.style.background='{0}'", ""); e.Row.Attributes.Add("onmouseout", strEvent); } }
protected void update_list() { DataSet dt = new DataSet(); ComLibrary com = new ComLibrary(); Transfer tf = new Transfer(g_user_id, g_lang); tf.to_process_cd = ddlPROCESS.Text; dt = tf.GetUnplannedRcvActList2(); DataTable dt2 = new DataTable(); dt2 = dt.Tables[0]; ViewState["detail"] = dt2; if (dt2.Rows.Count > 0) { hdnNo.Value = "1"; hdnMaxNo.Value = dt2.Rows.Count.ToString(); lblNo.Text = hdnNo.Value + " of " + hdnMaxNo.Value; txtITEM_NO.Text = dt2.Rows[0]["PART_NO"].ToString(); txtLOT_NO.Text = dt2.Rows[0]["LOT_NO"].ToString(); txtRCV_QTY.Text = dt2.Rows[0]["RECEIVE_QTY"].ToString(); txtDIE_NO.Text = dt2.Rows[0]["DIE_NO"].ToString(); txtSHIFT_NO.Text = dt2.Rows[0]["SHIFT"].ToString(); } else { hdnNo.Value = "1"; hdnMaxNo.Value = "1"; lblNo.Text = ""; txtITEM_NO.Text = ""; txtLOT_NO.Text = ""; txtRCV_QTY.Text = ""; txtDIE_NO.Text = ""; txtSHIFT_NO.Text = ""; } }
protected void cmdSave_Click(object sender, EventArgs e) { Transfer tran = new Transfer(g_user_id, g_lang); Message msg = new Message(g_user_id, g_lang); ComLibrary com = new ComLibrary(); tran.item_no = txtITEM_NO.Text; tran.lot_no = txtLOT_NO.Text; tran.act_qty = com.StringToDouble(txtRCV_QTY.Text); tran.die_no = txtDIE_NO.Text; tran.shift = txtSHIFT_NO.Text; if (ddlPROCESS.SelectedValue == "Crank Shaft") { if (tran.FEReceivePC() == ComConst.FAILED) { lblMsg.Text = tran.strErr; lblMsg.ForeColor = Color.Red; return; } } if (ddlPROCESS.SelectedValue == "Conn Rod") { if (tran.FEReceivePCA() == ComConst.FAILED) { lblMsg.Text = tran.strErr; lblMsg.ForeColor = Color.Red; return; } } lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; txtITEM_NO.Text = ""; txtLOT_NO.Text = ""; txtRCV_QTY.Text = ""; txtDIE_NO.Text = ""; txtSHIFT_NO.Text = ""; }
protected void Edit_Screen() { ComLibrary com = new ComLibrary(); Message msg = new Message(g_user_id, g_lang); WIPJo jo = new WIPJo(g_user_id, g_lang); DataSet ds = new DataSet(); chkALL_SEL.Checked = false; gdvDetail.DataSource = null; gdvDetail.DataBind(); ViewState["gdvDetail"] = null; // 製造指示情報を検索 //jo.process_cd = ddlPROCESS.Text; jo.entry_date = DateTime.Now; ds = jo.Get_JOList3(); if (ds == null) { lblMsg.Text = jo.strErr; lblMsg.ForeColor = Color.Red; return; } if (ds.Tables[0].Rows.Count == 0) { lblMsg.Text = msg.GetMessage("DATA_NOT_EXIST_ERR"); lblMsg.ForeColor = Color.Red; return; } else { gdvDetail.PageIndex = 0; ViewState["gdvDetail"] = ds.Tables[0]; Edit_Grid(); } }
protected void Edit_Screen() { ComLibrary com = new ComLibrary(); Message msg = new Message(g_user_id, g_lang); Transfer tf = new Transfer(g_user_id, g_lang); DataSet ds = new DataSet(); chkALL_SEL.Checked = false; gdvDetail.DataSource = null; gdvDetail.DataBind(); ViewState["gdvDetail"] = null; // 製造指示情報を検索 //tf.sch_id = ddlPROCESS.Text; tf.entry_date = DateTime.Now; //ds = tf.GetUnplannedRcvActList3(); //if (ds == null) //{ // lblMsg.Text = tf.strErr; // lblMsg.ForeColor = Color.Red; // return; //} //if (ds.Tables[0].Rows.Count == 0) //{ // lblMsg.Text = msg.GetMessage("DATA_NOT_EXIST_ERR"); // lblMsg.ForeColor = Color.Red; // return; //} //else //{ // gdvDetail.PageIndex = 0; // ViewState["gdvDetail"] = ds.Tables[0]; // Edit_Grid(); //} }
protected void cmdDisp_Click(object sender, EventArgs e) { //IMV3 Sample Code Start // // パネルの取込ボタン // Message msg = new Message(g_user_id, g_lang); ComLibrary com = new ComLibrary(); string filePath = ""; Boolean fileOK = false; //int i = 2; if (FileUpload1.HasFile) { try { filePath = Server.MapPath("~/Excel/" + FileUpload1.FileName); FileUpload1.SaveAs(filePath); fileOK = true; } catch (Exception ex) { //lblMsg.Text = msg.GetMessage("UPLOAD_FAILED"); lblMsg.Text = lblMsg.Text + ex.ToString(); } } if (!fileOK) { lblMsg.Text = msg.GetMessage("UPLOAD_FAILED"); return; } Excel.Application excel = new Excel.Application(); Excel.Workbook workbook = excel.Workbooks.Open(filePath, Type.Missing, false, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); Excel._Worksheet worksheet = workbook.Sheets[1]; Excel.Range usedRange = worksheet.UsedRange; System.Data.DataTable dt = new System.Data.DataTable(); try { if (rdoTYPE.Items[0].Selected) { dt.Columns.Add(new DataColumn("Content No")); dt.Columns.Add(new DataColumn("Part No")); dt.Columns.Add(new DataColumn("Part Name")); dt.Columns.Add(new DataColumn("Color")); dt.Columns.Add(new DataColumn("Proc Loc From")); dt.Columns.Add(new DataColumn("Proc Loc To")); dt.Columns.Add(new DataColumn("Inv Loc CD")); dt.Columns.Add(new DataColumn("Dock No")); dt.Columns.Add(new DataColumn("KD Lot No")); dt.Columns.Add(new DataColumn("PC No")); dt.Columns.Add(new DataColumn("Delv Scdl Date")); //dt.Columns.Add(new DataColumn("Delv Scdl Time")); dt.Columns.Add(new DataColumn("Delv Scdl Qty")); dt.Columns.Add(new DataColumn("Inv Catergory")); int i = 2; while ((usedRange.Cells[i, 1] as Range).Value != null) { string Content_No = (string)(usedRange.Cells[i, 1] as Range).Value; string Part_No = Convert.ToString((usedRange.Cells[i, 2] as Range).Value); string Part_Name = (string)(usedRange.Cells[i, 3] as Range).Value; string Color = (string)(usedRange.Cells[i, 4] as Range).Value; string Proc_Loc_From = (string)(usedRange.Cells[i, 5] as Range).Value; string Proc_Loc_To = (string)(usedRange.Cells[i, 6] as Range).Value; string Inv_Loc_CD = (string)(usedRange.Cells[i, 7] as Range).Value; string Dock_No = (string)(usedRange.Cells[i, 8] as Range).Value; string KD_Lot_No = (string)(usedRange.Cells[i, 9] as Range).Value; string PC_No = (string)(usedRange.Cells[i, 10] as Range).Value; DateTime Delv_Scdl_Date = (DateTime)(usedRange.Cells[i, 11] as Range).Value; //string Delv_Scdl_Time = (string)(usedRange.Cells[i, 12] as Range).Value; int Delv_Scdl_Qty = (int)(usedRange.Cells[i, 13] as Range).Value; string Inv_Catergory = (string)(usedRange.Cells[i, 14] as Range).Value; DataRow dr = dt.NewRow(); dr["Content No"] = Content_No; dr["Part No"] = Part_No; dr["Part Name"] = Part_Name; dr["Color"] = Color; dr["Proc Loc From"] = Proc_Loc_From; dr["Proc Loc To"] = Proc_Loc_To; dr["Inv Loc CD"] = Inv_Loc_CD; dr["Dock No"] = Dock_No; dr["KD Lot No"] = KD_Lot_No; dr["PC No"] = PC_No; dr["Delv Scdl Date"] = Delv_Scdl_Date; //dr["Delv Scdl Time"] = Delv_Scdl_Time; dr["Delv Scdl Qty"] = Delv_Scdl_Qty; dr["Inv Catergory"] = Inv_Catergory; dt.Rows.Add(dr); i += 1; } } if (rdoTYPE.Items[1].Selected) { dt.Columns.Add(new DataColumn("Date")); dt.Columns.Add(new DataColumn("Time")); dt.Columns.Add(new DataColumn("Proc Loc From")); dt.Columns.Add(new DataColumn("Maker Name")); dt.Columns.Add(new DataColumn("Ship To")); dt.Columns.Add(new DataColumn("Part No")); dt.Columns.Add(new DataColumn("Part Name")); dt.Columns.Add(new DataColumn("Color")); dt.Columns.Add(new DataColumn("Receive Cycle")); dt.Columns.Add(new DataColumn("Inv Category")); dt.Columns.Add(new DataColumn("Slip No")); dt.Columns.Add(new DataColumn("KD Lot From")); dt.Columns.Add(new DataColumn("KD Lot To")); dt.Columns.Add(new DataColumn("Pro Loc To")); dt.Columns.Add(new DataColumn("Delv Addr")); dt.Columns.Add(new DataColumn("Delv Scdll Qty")); dt.Columns.Add(new DataColumn("Part Unld Qty")); dt.Columns.Add(new DataColumn("Progress")); dt.Columns.Add(new DataColumn("Inv Loc CD")); int i = 2; while ((usedRange.Cells[i, 1] as Range).Value != null) { var DATE = Convert.ToString((usedRange.Cells[i, 1] as Excel.Range).Value); var TIME = Convert.ToString((usedRange.Cells[i, 2] as Excel.Range).Value); var PROC_LOC_FROM = (string)(usedRange.Cells[i, 3] as Excel.Range).Value; var MAKER_NAME = (string)(usedRange.Cells[i, 4] as Excel.Range).Value; var SHIP_TO = (string)(usedRange.Cells[i, 5] as Excel.Range).Value; var PART_NO = Convert.ToString((usedRange.Cells[i, 6] as Excel.Range).Value); var PART_NAME = (string)(usedRange.Cells[i, 7] as Excel.Range).Value; var COLOR = (string)(usedRange.Cells[i, 8] as Excel.Range).Value; var RECEIVE_CYCLE = (string)(usedRange.Cells[i, 9] as Excel.Range).Value; var INV_CATEGORY = (string)(usedRange.Cells[i, 10] as Excel.Range).Value; var SHIP_NO = Convert.ToString((usedRange.Cells[i, 11] as Excel.Range).Value); var KD_LOT_FROM = (string)(usedRange.Cells[i, 12] as Excel.Range).Value; var KD_LOT_TO = (string)(usedRange.Cells[i, 13] as Excel.Range).Value; var PROC_LOC_TO = (string)(usedRange.Cells[i, 14] as Excel.Range).Value; var DELV_ADDR = (string)(usedRange.Cells[i, 15] as Excel.Range).Value; var DELV_SCDLL_QTY = Convert.ToInt32((usedRange.Cells[i, 16] as Excel.Range).Value); var PART_UNLD_QTY = Convert.ToInt32((usedRange.Cells[i, 17] as Excel.Range).Value); var PROGRESS = Convert.ToInt32((usedRange.Cells[i, 18] as Excel.Range).Value); var INV_LOC_CD = Convert.ToString((usedRange.Cells[i, 19] as Excel.Range).Value); DataRow dr = dt.NewRow(); dr["Date"] = DATE; dr["Time"] = TIME; dr["Proc Loc From"] = PROC_LOC_FROM; dr["Maker Name"] = MAKER_NAME; dr["Ship To"] = SHIP_TO; dr["Part No"] = PART_NO; dr["Part Name"] = PART_NAME; dr["Color"] = COLOR; dr["Receive Cycle"] = RECEIVE_CYCLE; dr["Inv Category"] = INV_CATEGORY; dr["Slip No"] = SHIP_NO; dr["KD Lot From"] = KD_LOT_FROM; dr["KD Lot To"] = KD_LOT_TO; dr["Pro Loc To"] = PROC_LOC_TO; dr["Delv Addr"] = DELV_ADDR; dr["Delv Scdll Qty"] = DELV_SCDLL_QTY; dr["Part Unld Qty"] = PART_UNLD_QTY; dr["Progress"] = PROGRESS; dr["Inv Loc CD"] = INV_LOC_CD; dt.Rows.Add(dr); i += 1; } } ViewState["gdvDetail"] = dt; gdvDetail.DataSource = dt; gdvDetail.DataBind(); FormControlEnable(); excel.Quit(); excel = null; KillProcess("EXCEL"); } catch (Exception ex) { excel.Quit(); excel = null; KillProcess("EXCEL"); lblMsg.Text = lblMsg.Text + ex.ToString(); } //IMV3 Sample Code End }
protected void cmdUpdate_Click(object sender, EventArgs e) { Message msg = new Message(g_user_id, g_lang); Process process = new Process(g_user_id, g_lang); process.process_cd = txtProcess.Text.ToUpper().Trim(); //if (hdnUpdMode.Value == "3") //{ // DataSet ds = new DataSet(); // ds = management.GetUserListByManagement(); // if (ds.Tables[0].Rows.Count > 0) // { // lblMsg.Text = msg.GetMessage("ROLE_DEL_ERR"); // lblMsg.ForeColor = Color.Red; // return; // } //} //必須項目のチェック if (txtProcessName.Text == "") { lblMsg.Text = msg.GetMessage("INPUT_MANDATORY_ERR") + "(" + flblProcessName.Text + ")"; lblMsg.ForeColor = Color.Red; return; } ComLibrary com = new ComLibrary(); // ロールマスタを更新 // 画面から項目を編集 process.process_cd = txtProcess.Text; process.process_desc = txtProcessName.Text; process.process_desc2 = txtProcessDesc.Text; process.chg_user_id = g_user_id; //role.chg_pgm = "MstRoleMnt"; int rtn = 0; switch (hdnUpdMode.Value) { case "1": // Insert rtn = process.Insert(); break; case "2": // Update rtn = process.Update(); break; case "3": // Delete rtn = process.Delete(); break; } if (rtn == ComConst.FAILED) { lblMsg.Text = process.strErr; lblMsg.ForeColor = Color.Red; return; } lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; if (hdnUpdMode.Value == "3") { Clear_Screen(1); } hdnInputMode.Value = "0"; Screen_Control(hdnUpdMode.Value); }
// // 画面の制御 // protected void Screen_Control(string pUpdMode) { ComLibrary com = new ComLibrary(); // モードボタンを選択状態から戻す Init_Mode(); btnMdsp.Enabled = true; btnMadd.Enabled = true; btnMupd.Enabled = true; btnMdel.Enabled = true; hdnUpdMode.Value = pUpdMode; //Auth_Proc();//ADD BY UBIQ-LIU 2010/8/4 // モードボタンを選択状態にする switch (pUpdMode) { case "0": // 照会 btnMdsp.Enabled = false; //txtManagement.Enabled = false; //btnRoleSearch.Visible = false; switch (g_lang) { case 1: //btnMdsp.ImageUrl = "../../Contents/Image/BackGround/btn-inq3-1.jpg"; break; case 2: //btnMdsp.ImageUrl = "../../Contents/Image/BackGround/btn-inq3-2.jpg"; break; case 3: //btnMdsp.ImageUrl = "../../Contents/Image/BackGround/btn-inq3-3.jpg"; break; case 4: //btnMdsp.ImageUrl = "../../Contents/Image/BackGround/btn-inq3-4.jpg"; break; } break; case "1": // 新規 btnMadd.Enabled = false; switch (g_lang) { case 1: //btnMadd.ImageUrl = "../../Contents/Image/BackGround/btn-new3-1.jpg"; break; case 2: //btnMadd.ImageUrl = "../../Contents/Image/BackGround/btn-new3-2.jpg"; break; case 3: //btnMadd.ImageUrl = "../../Contents/Image/BackGround/btn-new3-3.jpg"; break; case 4: //btnMadd.ImageUrl = "../../Contents/Image/BackGround/btn-new3-4.jpg"; break; } break; case "2": // 変更 btnMupd.Enabled = false; switch (g_lang) { case 1: //btnMupd.ImageUrl = "../../Contents/Image/BackGround/btn-change3-1.jpg"; break; case 2: //btnMupd.ImageUrl = "../../Contents/Image/BackGround/btn-change3-2.jpg"; break; case 3: //btnMupd.ImageUrl = "../../Contents/Image/BackGround/btn-change3-3.jpg"; break; case 4: //btnMupd.ImageUrl = "../../Contents/Image/BackGround/btn-change3-4.jpg"; break; } break; case "3": // 削除 btnMdel.Enabled = false; switch (g_lang) { case 1: //btnMdel.ImageUrl = "../../Contents/Image/BackGround/btn-delete3-1.jpg"; break; case 2: //btnMdel.ImageUrl = "../../Contents/Image/BackGround/btn-delete3-2.jpg"; break; case 3: //btnMdel.ImageUrl = "../../Contents/Image/BackGround/btn-delete3-3.jpg"; break; case 4: //btnMdel.ImageUrl = "../../Contents/Image/BackGround/btn-delete3-4.jpg"; break; } break; } // 画面プロテクト switch (hdnInputMode.Value) { case "0": com.Set_Attributes(DivPnlKey, 1); com.Set_Attributes(DivPnlDetail, 0); btnRoleSearch.Visible = true; cmdUpdate.Enabled = false; cmdDisp.Enabled = true; switch (g_lang) { case 1: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind1-1.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update3-1.jpg"; break; case 2: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind1-2.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update3-2.jpg"; break; case 3: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind1-3.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update3-3.jpg"; break; case 4: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind1-4.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update3-4.jpg"; break; } com.SetInitialFocus(txtProcess); break; case "1": if (hdnUpdMode.Value == "0") { com.Set_Attributes(DivPnlKey, 1); btnRoleSearch.Visible = true; cmdDisp.Enabled = true; cmdUpdate.Enabled = false; switch (g_lang) { case 1: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind1-1.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update3-1.jpg"; break; case 2: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind1-2.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update3-2.jpg"; break; case 3: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind1-3.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update3-3.jpg"; break; case 4: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind1-4.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update3-4.jpg"; break; } } else { com.Set_Attributes(DivPnlKey, 0); btnRoleSearch.Visible = false; cmdDisp.Enabled = false; cmdUpdate.Enabled = true; switch (g_lang) { case 1: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind3-1.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update1-1.jpg"; break; case 2: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind3-2.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update1-2.jpg"; break; case 3: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind3-3.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update1-3.jpg"; break; case 4: //cmdDisp.ImageUrl = "../../Contents/Image/BackGround/btn-ind3-4.jpg"; //cmdUpdate.ImageUrl = "../../Contents/Image/BackGround/btn-update1-4.jpg"; break; } } // 照会、削除時は明細入力を許さない if (hdnUpdMode.Value == "0" || hdnUpdMode.Value == "3") { com.Set_Attributes(DivPnlDetail, 0); } else { com.Set_Attributes(DivPnlDetail, 1); } break; } }
protected void cmdPrint_Click(object sender, EventArgs e) { // // 製造指示表リスト発行 // ComLibrary com = new ComLibrary(); Message msg = new Message(g_user_id, g_lang); //MfgBom mbom = new MfgBom(g_user_id, g_lang); String h_period_from = "PERIOD FROM : "; String h_period_to = " TO : "; DataTable dt = (DataTable)(ViewState["gdvDetail"]); if (dt == null) { return; } bool print_flag = false; int seqno = 0; //Print Data DataTable prtDt = new DataTable(); //SubReport Data //DataTable prtDtTotal = new DataTable(); prtDt.Columns.Add(new DataColumn("FE_CRANK_OFFLINE")); prtDt.Columns.Add(new DataColumn("PRODUCT_DATE")); prtDt.Columns.Add(new DataColumn("MODEL")); prtDt.Columns.Add(new DataColumn("PROD_LOTNO")); prtDt.Columns.Add(new DataColumn("ONLINE_LOTNO")); prtDt.Columns.Add(new DataColumn("P1")); prtDt.Columns.Add(new DataColumn("P2")); prtDt.Columns.Add(new DataColumn("P3")); prtDt.Columns.Add(new DataColumn("P4")); prtDt.Columns.Add(new DataColumn("P5")); prtDt.Columns.Add(new DataColumn("P6")); prtDt.Columns.Add(new DataColumn("P7")); prtDt.Columns.Add(new DataColumn("P8")); prtDt.Columns.Add(new DataColumn("P9")); // 対象の行を探す for (int i = 0; i < dt.Rows.Count; i++) { if (com.IntToBool(com.StringToInt(dt.Rows[i]["SELECT"].ToString()))) { //印刷マーク print_flag = true; if (seqno == 0) { h_period_from = "PERIOD FROM : " + dt.Rows[i]["PRODUCT_DATE"].ToString(); } seqno++; DataRow dr = prtDt.NewRow(); dr["FE_CRANK_OFFLINE"] = dt.Rows[i]["OFFLINE_NO"].ToString(); dr["PRODUCT_DATE"] = dt.Rows[i]["PRODUCT_DATE"]; dr["MODEL"] = dt.Rows[i]["MODEL"].ToString(); dr["PROD_LOTNO"] = dt.Rows[i]["LOTNO"].ToString(); dr["ONLINE_LOTNO"] = dt.Rows[i]["ONLINE_LOTNO"].ToString(); dr["P1"] = dt.Rows[i]["RESULT1"]; dr["P2"] = dt.Rows[i]["RESULT2"]; dr["P3"] = dt.Rows[i]["RESULT3"]; dr["P4"] = dt.Rows[i]["RESULT4"]; dr["P5"] = dt.Rows[i]["RESULT5"]; dr["P6"] = dt.Rows[i]["RESULT_4P"]; dr["P7"] = dt.Rows[i]["RESULT_3P"]; dr["P8"] = dt.Rows[i]["RESULT_2P"]; dr["P9"] = dt.Rows[i]["RESULT_1P"]; prtDt.Rows.Add(dr); h_period_to = " TO : " + dt.Rows[i]["PRODUCT_DATE"].ToString(); } } if (print_flag == false) { lblMsg.Text = msg.GetMessage("PRINT_DATA_NOT_EXIST_ERR"); lblMsg.ForeColor = Color.Red; return; } ReportClass Rpt = null; Rpt = new HondaTraceabilitySystem.Common.Report.FeOffline(); string ReportName = "FeOffProd"; try { //Rpt.Subreports["SubReport"].SetDataSource(prtDtTotal); Rpt.SetDataSource(prtDt); Rpt.SetParameterValue("H_TITLE", "HATC-M P-EGD Production Sheet Control"); Rpt.SetParameterValue("H_DATA_TYPE", "DATA TYPE : OFF LINE"); Rpt.SetParameterValue("H_TYPE", "TYPE :"); Rpt.SetParameterValue("H_DEPT", "DEPT. : FE-P"); if (ddlPROCESS.SelectedValue == "Crank Shaft") { Rpt.SetParameterValue("H_PART_NAME", "PART NAME : CRANK F/G"); Rpt.SetParameterValue("H_LINE", "LINE : CRANK LINE"); Rpt.SetParameterValue("H_PLC", "BEARING CODE"); } else { Rpt.SetParameterValue("H_PART_NAME", "PART NAME : CONNROD F/G"); Rpt.SetParameterValue("H_LINE", "LINE : CONNROD LINE"); Rpt.SetParameterValue("H_PLC", "DIE WEIGHT"); } Rpt.SetParameterValue("H_PERIOD_FROM", h_period_from); Rpt.SetParameterValue("H_PERIOD_TO", h_period_to); PdfRtfWordFormatOptions pdfFormatOpts = new PdfRtfWordFormatOptions(); DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions(); // exportOpts; ExportOptions exportOpts = Rpt.ExportOptions; exportOpts.ExportDestinationType = ExportDestinationType.DiskFile; exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat; exportOpts.FormatOptions = pdfFormatOpts; string tmpFilenm = ReportName + "_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".pdf"; diskOpts.DiskFileName = Server.MapPath(WebConfigurationManager.ConnectionStrings["ReportOutDir"].ConnectionString + tmpFilenm); exportOpts.DestinationOptions = diskOpts; //print Rpt.Export(); Type cstype = this.GetType(); this.Page.ClientScript.RegisterClientScriptBlock(cstype, "a", @"<script>window.open('" + WebConfigurationManager.ConnectionStrings["ReportOutDir"].ConnectionString + tmpFilenm + "', '" + ReportName + "', 'status,resizable=yes');</script>"); } catch (Exception ex) { string strErr = ex.ToString(); lblMsg.Text = ex.ToString(); return; } lblMsg.Text = msg.GetMessage("NORMAL_PRINT"); lblMsg.ForeColor = Color.Blue; }
protected void cmdUpdate_Click(object sender, EventArgs e) { Message msg = new Message(g_user_id, g_lang); Role role = new Role(g_user_id, g_lang); role.role = txtUserGroup.Text.ToUpper(); //if (hdnUpdMode.Value == "3") //{ // DataSet ds = new DataSet(); // ds = management.GetUserListByManagement(); // if (ds.Tables[0].Rows.Count > 0) // { // lblMsg.Text = msg.GetMessage("ROLE_DEL_ERR"); // lblMsg.ForeColor = Color.Red; // return; // } //} //必須項目のチェック if (txtUserGroupName.Text == "") { lblMsg.Text = msg.GetMessage("INPUT_MANDATORY_ERR") + "(" + flblUserGroupName.Text + ")"; lblMsg.ForeColor = Color.Red; return; } ComLibrary com = new ComLibrary(); // ロールマスタを更新 // 画面から項目を編集 role.role = txtUserGroup.Text; role.role_desc = txtUserGroupName.Text; if (chkActive.Checked) { role.del_disable_flag = 1; } else { role.del_disable_flag = 0; } role.mgmt_level = ddl_MGMT_LEVEL.SelectedValue.ToString(); role.dept_no = ddl_DEPT_NO.SelectedValue.ToString(); role.process_no = ddl_PROCESS_NO.SelectedValue.ToString(); role.chg_user_id = g_user_id; //role.chg_pgm = "MstRoleMnt"; int rtn = 0; switch (hdnUpdMode.Value) { case "1": // Insert rtn = role.Insert(); break; case "2": // Update rtn = role.Update(); break; case "3": // Delete rtn = role.Delete(); break; } if (rtn == ComConst.FAILED) { lblMsg.Text = role.strErr; lblMsg.ForeColor = Color.Red; return; } lblMsg.Text = msg.GetMessage("NORMAL_UPDATE"); lblMsg.ForeColor = Color.Blue; if (hdnUpdMode.Value == "3") { Clear_Screen(1); } hdnInputMode.Value = "0"; Screen_Control(hdnUpdMode.Value); }
protected void cmdPrint_Click(object sender, EventArgs e) { // // 製造指示表リスト発行 // ComLibrary com = new ComLibrary(); Message msg = new Message(g_user_id, g_lang); MfgBom mbom = new MfgBom(g_user_id, g_lang); DataTable dt = (DataTable)(ViewState["gdvDetail"]); if (dt == null) { return; } bool print_flag = false; //int seqno = 0; //Print Data DataTable prtDt = new DataTable(); //SubReport Data //DataTable prtDtTotal = new DataTable(); // 対象の行を探す for (int i = 0; i < dt.Rows.Count; i++) { if (com.IntToBool(com.StringToInt(dt.Rows[i]["SELECT"].ToString()))) { //印刷マーク print_flag = true; //seqno++; // Testing prtDt.Columns.Add(new DataColumn("FE_CRANK_ONLINE_NO")); prtDt.Columns.Add(new DataColumn("PRODUCTION_DATE")); prtDt.Columns.Add(new DataColumn("SHIFT")); prtDt.Columns.Add(new DataColumn("MODEL")); prtDt.Columns.Add(new DataColumn("LOTNO_ZOZAI")); prtDt.Columns.Add(new DataColumn("DIE_NO")); prtDt.Columns.Add(new DataColumn("ONLINE_DATE")); prtDt.Columns.Add(new DataColumn("ONLINE_STAMPING")); prtDt.Columns.Add(new DataColumn("REMARK")); DataRow dr = prtDt.NewRow(); dr["FE_CRANK_ONLINE_NO"] = "CRON-20180101-0001"; dr["PRODUCTION_DATE"] = "2018-04-23 00:00:00.000"; dr["SHIFT"] = "X"; dr["MODEL"] = "55A"; dr["LOTNO_ZOZAI"] = "P50203N7"; dr["DIE_NO"] = "99"; dr["ONLINE_DATE"] = "100"; dr["ONLINE_STAMPING"] = "H-0746"; dr["REMARK"] = ""; prtDt.Rows.Add(dr); // Actual Codes // データ検索 //WIPJo jo = new WIPJo(g_user_id, g_lang); //jo.job_order_no = dt.Rows[i]["Online_No"].ToString(); //jo.item_no = dt.Rows[i]["Part_No"].ToString(); //DataSet ds = jo.Get_OnRptDetail(); //if (ds == null) //{ // lblMsg.Text = jo.strErr; // lblMsg.ForeColor = Color.Red; // return; //} //prtDt = ds.Tables[0]; } } if (print_flag == false) { lblMsg.Text = msg.GetMessage("PRINT_DATA_NOT_EXIST_ERR"); lblMsg.ForeColor = Color.Red; return; } ReportClass Rpt = null; Rpt = new HondaTraceabilitySystem.Common.Report.FeOnline(); string ReportName = "MfgJOList"; try { //Rpt.Subreports["SubReport"].SetDataSource(prtDtTotal); Rpt.SetDataSource(prtDt); Rpt.SetParameterValue("H_TITLE", "INSPECTION SHEET(SEMICONDUCTOR"); PdfRtfWordFormatOptions pdfFormatOpts = new PdfRtfWordFormatOptions(); DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions(); // exportOpts; ExportOptions exportOpts = Rpt.ExportOptions; exportOpts.ExportDestinationType = ExportDestinationType.DiskFile; exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat; exportOpts.FormatOptions = pdfFormatOpts; string tmpFilenm = ReportName + "_" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".pdf"; diskOpts.DiskFileName = Server.MapPath(WebConfigurationManager.ConnectionStrings["ReportOutDir"].ConnectionString + tmpFilenm); exportOpts.DestinationOptions = diskOpts; //print Rpt.Export(); Type cstype = this.GetType(); this.Page.ClientScript.RegisterClientScriptBlock(cstype, "a", @"<script>window.open('" + WebConfigurationManager.ConnectionStrings["ReportOutDir"].ConnectionString + tmpFilenm + "', '" + ReportName + "', 'status,resizable=yes');</script>"); } catch (Exception ex) { string strErr = ex.ToString(); lblMsg.Text = ex.ToString(); return; } lblMsg.Text = msg.GetMessage("NORMAL_PRINT"); lblMsg.ForeColor = Color.Blue; }
protected void Edit_Screen() { ComLibrary com = new ComLibrary(); // ロールマスタを検索 Role role = new Role(g_user_id, g_lang); role.role = txtUserGroup.Text.Trim().ToUpper(); txtUserGroup.Text = role.role; Clear_Screen(0); // 必須項目のチェック if (txtUserGroup.Text == "") { Message msg = new Message(g_user_id, g_lang); lblMsg.Text = msg.GetMessage("INPUT_MANDATORY_ERR") + "(" + flblUserGroup.Text + ")"; lblMsg.ForeColor = Color.Red; return; } int rtn = role.GetRoleDetail(); if (hdnUpdMode.Value == "1") { // // 新規のときは、すでに存在すればエラー // if (rtn != ComConst.FAILED) { Message msg = new Message(g_user_id, g_lang); lblMsg.Text = msg.GetMessage("ALREADY_EXIST_ERR"); lblMsg.ForeColor = Color.Red; return; } } else { // // 新規以外のときは、存在しなければエラー // if (rtn == ComConst.FAILED) { Message msg = new Message(g_user_id, g_lang); lblMsg.Text = msg.GetMessage("NOT_EXIST_ERR"); lblMsg.ForeColor = Color.Red; return; } else { // 画面編集 txtUserGroupName.Text = role.role_desc; try { ddl_MGMT_LEVEL.SelectedValue = role.mgmt_level; } catch { } try { ddl_DEPT_NO.SelectedValue = role.dept_no; } catch { } try { ddl_PROCESS_NO.SelectedValue = role.process_no; } catch { } } } hdnInputMode.Value = "1"; Screen_Control(hdnUpdMode.Value); }