private void b_delete_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); if (dg_xfmx_lkmx.CurrentRow != null) { int i = dg_xfmx_lkmx.CurrentRow.Index; DataRowView dgr = dg_xfmx_lkmx.CurrentRow.DataBoundItem as DataRowView; i = DS_Xxfmx.Tables[0].Rows.IndexOf(dgr.Row); if (DS_Xxfmx.Tables[0].Rows[i]["id"].ToString() != "") { string url = common_file.common_app.service_url + "Xxtsz/Xxtsz_app.asmx"; object[] args = new object[18]; args[0] = DS_Xxfmx.Tables[0].Rows[i]["id"].ToString(); args[1] = common_file.common_app.yydh; args[2] = common_file.common_app.qymc; args[3] = ""; args[4] = ""; args[5] = ""; args[6] = ""; args[7] = ""; args[8] = DS_Xxfmx.Tables[0].Rows[i]["mxbh"].ToString();; args[9] = ""; args[10] = ""; args[11] = ""; args[12] = ""; args[13] = DS_Xxfmx.Tables[0].Rows[i]["zb_sl"].ToString();; args[14] = ""; args[15] = common_file.common_app.get_delete; args[16] = common_file.common_app.xxzs; args[17] = "0"; Hotel_app.Server.Xxtsz.Xxfmx_zbmx Xxfmx_zbmx_services = new Hotel_app.Server.Xxtsz.Xxfmx_zbmx(); string result = Xxfmx_zbmx_services.Xxfmx_zbmx_add_edit(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), args[6].ToString(), args[7].ToString(), args[8].ToString(), args[9].ToString(), args[10].ToString(), args[11].ToString(), args[12].ToString(), args[13].ToString(), args[14].ToString(), args[15].ToString(), args[16].ToString(), args[17].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Xxfmx_zbmx_add_edit", args); if (result != null && result == common_file.common_app.get_suc) { common_file.common_app.Message_box_show(common_file.common_app.message_title, "删除成功!"); } else { common_file.common_app.Message_box_show(common_file.common_app.message_title, "删除不成功!"); } } InitializeApp(); } Cursor.Current = Cursors.Default; }
//保存主单 private void SaveNew_xfmx() { //id, yydh, qymc, lsbh, lksj, czsj, czy, bz, //drbh, xfdr, xrbh,xfxr,xfmx, mxbh, xfsl, add_edit_delete, xxzs string zbsl = tB_xfsl.Text.Trim().Replace("'", "_"); if (is_value(lsbh, mxbh, out Xxfxr_id)) { judge_add_edit = common_file.common_app.get_edit; } // id, yydh, qymc, lsbh, drbh, xfdr, xrbh, xfxr, xfmx, mxbh, xftm, zb_sj, zb_czy, zb_sl, zb_zt, add_edit_delete, xxzs string url = common_file.common_app.service_url + "Xxtsz/Xxtsz_app.asmx"; object[] args = new object[18]; args[0] = Xxfxr_id; args[1] = common_file.common_app.yydh; args[2] = common_file.common_app.qymc; args[3] = lsbh; args[4] = drbh; args[5] = xfdr; args[6] = xrbh; args[7] = tB_xfrb.Text.Trim().Replace("'", "_"); args[8] = tB_xfxm.Text.Trim().Replace("'", "_"); args[9] = mxbh; args[10] = tB_xftm.Text.Trim().Replace("'", "_"); args[11] = DateTime.Now.ToString(); args[12] = common_file.common_app.czy; args[13] = zbsl; if (Convert.ToDecimal(zbsl) > 0) { args[14] = common_file.common_app.zb_zt_zj; } else { args[14] = common_file.common_app.zb_zt_kj; } args[15] = judge_add_edit; args[16] = common_file.common_app.xxzs; args[17] = tB_zbdj.Text.Trim(); Hotel_app.Server.Xxtsz.Xxfmx_zbmx Xxfmx_zbmx_services = new Hotel_app.Server.Xxtsz.Xxfmx_zbmx(); string result = Xxfmx_zbmx_services.Xxfmx_zbmx_add_edit(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), args[6].ToString(), args[7].ToString(), args[8].ToString(), args[9].ToString(), args[10].ToString(), args[11].ToString(), args[12].ToString(), args[13].ToString(), args[14].ToString(), args[15].ToString(), args[16].ToString(), args[17].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Xxfmx_zbmx_add_edit", args); if (result == common_file.common_app.get_suc) { common_file.common_app.Message_box_show(common_file.common_app.message_title, "保存成功!"); if (judge_add_edit == common_file.common_app.get_add) { parent_form.InitializeApp(); tB_xfxm.Text = ""; tB_mxbh.Text = ""; tB_xfsl.Text = ""; tB_xftm.Text = ""; tB_zjm.Text = ""; tB_xfrb.Text = ""; tB_xftm.Focus(); } else if (judge_add_edit == common_file.common_app.get_edit) { parent_form.InitializeApp(); this.Close(); } } else { common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!"); } }