private void b_sh_Click(object sender, EventArgs e) { string url = common_file.common_app.service_url + "Xxtsz/Xxtsz_app.asmx"; object[] args = new object[2]; args[0] = strlsbh; args[1] = common_file.common_app.czy; Hotel_app.Server.Xxtsz.Xxfmx_lkzd Xxfmx_lkzd_services = new Hotel_app.Server.Xxtsz.Xxfmx_lkzd(); string result = Xxfmx_lkzd_services.Update_lkzd_issh(args[0].ToString(), args[1].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Update_lkzd_issh", args); if (result == common_file.common_app.get_suc) { parent_form.InitializeApp(); 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, "审核不成功!"); } }
private void b_delete_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); if (DS_Xxfmx != null && DS_Xxfmx.Tables[0].Rows.Count > 0) { if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "是否要删除所选中的记录!") == true) { if (dg_xfmx_lkzd.CurrentRow != null) { int i = dg_xfmx_lkzd.CurrentRow.Index; DataRowView dgr = dg_xfmx_lkzd.Rows[i].DataBoundItem as DataRowView; i = DS_Xxfmx.Tables[0].Rows.IndexOf(dgr.Row); if (DS_Xxfmx.Tables[0].Rows[i]["id"].ToString() != "") { string strid = DS_Xxfmx.Tables[0].Rows[i]["id"].ToString(); bool strissh = Convert.ToBoolean(DS_Xxfmx.Tables[0].Rows[i]["sh_sh"].ToString()); if (strissh) { common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,审核通过就不能删除!"); return; } else { string strlsbh = DS_Xxfmx.Tables[0].Rows[i]["lsbh"].ToString(); string url = common_file.common_app.service_url + "Xxtsz/Xxtsz_app.asmx"; object[] args = new object[12]; args[0] = strid; args[1] = common_file.common_app.yydh; args[2] = common_file.common_app.qymc; args[3] = strlsbh; args[4] = ""; args[5] = ""; args[6] = false; args[7] = ""; args[8] = ""; args[9] = ""; args[10] = common_file.common_app.get_delete; args[11] = common_file.common_app.xxzs; Hotel_app.Server.Xxtsz.Xxfmx_lkzd Xxfmx_lkzd_services = new Hotel_app.Server.Xxtsz.Xxfmx_lkzd(); string result = Xxfmx_lkzd_services.Xxfmx_lkzd_add_edit(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), bool.Parse(args[6].ToString()), args[7].ToString(), args[8].ToString(), args[9].ToString(), args[10].ToString(), args[11].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Xxfmx_lkzd_add_edit", args); if (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; //common_file.common_app.get_czsj(); //if (DS_Xxfmx != null && DS_Xxfmx.Tables[0].Rows.Count > 0) // if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "是否要删除所选中的记录!") == true) // { // int j = 0; string s = ""; // for (int i = 0; i < dg_count; i++) // { // common_file.common_app.get_czsj(); // DataGridViewDataErrorContexts ss = new DataGridViewDataErrorContexts(); // if (this.dg_xfmx_lkzd.Rows[i].Cells[0].GetEditedFormattedValue(i, ss) != null && Convert.ToBoolean(this.dg_xfmx_lkzd.Rows[i].Cells[0].GetEditedFormattedValue(i, ss)) == true) // { // j = Convert.ToInt32(dg_xfmx_lkzd.Rows[i].Index.ToString()); // if (DS_Xxfmx.Tables[0].Rows[j]["id"].ToString() != "") // { // int strid=int.Parse(DS_Xxfmx.Tables[0].Rows[j]["id"].ToString()); // B_Xxfmx_lkzd.Delete(strid); // s = common_file.common_app.get_suc; // } // } // } // if (s == common_file.common_app.get_suc) // common_file.common_app.Message_box_show(common_file.common_app.message_title, "删除成功!"); // else // if (s == common_file.common_app.get_failure) 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, czy, lksj, sh_sh, lknr, bz, sh_czy, add_edit_delete, xxzs if (judge_add_edit == common_file.common_app.get_add) { strlsbh = common_file.common_ddbh.ddbh("lkzd", "lsbhdate", "lsbhcounter", 6); } else { M_lkzd = B_lkzd.GetModel(int.Parse(Xxfxr_id)); strlsbh = M_lkzd.lsbh; } string url = common_file.common_app.service_url + "Xxtsz/Xxtsz_app.asmx"; object[] args = new object[12]; args[0] = Xxfxr_id; args[1] = common_file.common_app.yydh; args[2] = common_file.common_app.qymc; args[3] = strlsbh; args[4] = common_file.common_app.czy; args[5] = DateTime.Now.ToShortDateString(); args[6] = Cb_is_tj_kc.Checked; args[7] = tB_lknr.Text.Trim().Replace("'", "_"); args[8] = tB_bz.Text.Trim().Replace("'", "_"); if (Cb_is_tj_kc.Checked) { args[9] = common_file.common_app.czy; } else { args[9] = ""; } args[10] = judge_add_edit; args[11] = common_file.common_app.xxzs; Hotel_app.Server.Xxtsz.Xxfmx_lkzd Xxfmx_lkzd_services = new Hotel_app.Server.Xxtsz.Xxfmx_lkzd(); string result = Xxfmx_lkzd_services.Xxfmx_lkzd_add_edit(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), args[5].ToString(), bool.Parse(args[6].ToString()), args[7].ToString(), args[8].ToString(), args[9].ToString(), args[10].ToString(), args[11].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Xxfmx_lkzd_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_bz.Text = ""; tB_lknr.Text = ""; } 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, "操作失败!"); } }