public string Fun_zwcx(string lsbh, string jzbh, string sk_tt, string yydh, string qymc, string czzt, string czy, string syzd, string czsj, string xxzs, string czy_GUID) { string s = common_file.common_app.get_failure; Qyddj.Qydcx Qydcx_new = new Hotel_app.Server.Qyddj.Qydcx(); if (czzt == common_file.common_jzzt.czzt_gz || czzt == common_file.common_jzzt.czzt_jz || czzt == common_file.common_jzzt.czzt_sz || czzt == common_file.common_jzzt.czzt_jzzgz || czzt == common_file.common_jzzt.czzt_gzzjz) { s = Qydcx_new.yd_bak_cx(yydh, qymc, jzbh, czy, DateTime.Parse(czsj), xxzs);//撤销Qyddj部分 } if (s == common_file.common_app.get_suc) { s = common_file.common_app.get_failure; } //进行账务撤销 s = Fun_zw_cx_help(lsbh, czzt, jzbh, yydh, qymc, czy, syzd, czsj, xxzs, czy_GUID); common_file.common_czjl.add_czjl(yydh, qymc, czy, czzt + "撤销", "结账编号:" + jzbh, "账务撤销", DateTime.Parse(czsj)); return(s); }
private void b_cx_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); if (dg_ttyd_qx.CurrentRow != null) { int k_0 = 0; DataRowView dgr = dg_ttyd_qx.CurrentRow.DataBoundItem as DataRowView; k_0 = DS_ttyd_qx.Tables[0].Rows.IndexOf(dgr.Row); if (dg_count_ttyd_qx > 0 && dg_ttyd_qx.CurrentRow.Index < dg_count_ttyd_qx && DS_ttyd_qx != null && DS_ttyd_qx.Tables[0].Rows[k_0]["id"].ToString() != "") { if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "是否确认要撤销此记录?") == true) { int i_temp_0 = 5; float lzfs_0 = 0; //BLL.Common B_Common = new Hotel_app.BLL.Common(); //DataSet ds_temp = DS_ttyd_fjrb; //if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0) //{ // for (int j_0 = 0; j_0 < ds_temp.Tables[0].Rows.Count; j_0++) // { // lzfs_0 = float.Parse(ds_temp.Tables[0].Rows[j_0]["lzfs"].ToString()); // if (common_file.common_used_fjzt.judge_kyfs(common_file.common_app.get_add, ds_temp.Tables[0].Rows[j_0]["yddj"].ToString(), lzfs_0.ToString(), 0, ds_temp.Tables[0].Rows[j_0]["fjrb"].ToString(), ds_temp.Tables[0].Rows[j_0]["fjrb"].ToString(), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["ddsj"].ToString()), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["lksj"].ToString()), ds_temp.Tables[0].Rows[j_0]["krxm"].ToString(), ds_temp.Tables[0].Rows[j_0]["fjbh"].ToString(), ds_temp.Tables[0].Rows[j_0]["lsbh"].ToString(), " 撤销团队预订-初始房类判断") == true) // { // i_temp_0 = 1; // break; // } // } //} if (i_temp_0 == 5) { DataSet ds_temp = DS_ttyd_cy; if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0) { for (int j_0 = 0; j_0 < ds_temp.Tables[0].Rows.Count; j_0++) { common_file.common_app.get_czsj(); //lzfs_0 = float.Parse(ds_temp.Tables[0].Rows[j_0]["lzfs"].ToString()); //if (common_file.common_used_fjzt.judge_kyfs(common_file.common_app.get_add, ds_temp.Tables[0].Rows[j_0]["yddj"].ToString(), lzfs_0.ToString(), 0, ds_temp.Tables[0].Rows[j_0]["fjrb"].ToString(), ds_temp.Tables[0].Rows[j_0]["fjrb"].ToString(), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["ddsj"].ToString()), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["lksj"].ToString()), ds_temp.Tables[0].Rows[j_0]["krxm"].ToString(), ds_temp.Tables[0].Rows[j_0]["fjbh"].ToString(), ds_temp.Tables[0].Rows[j_0]["lsbh"].ToString(), " 撤销团队预订-成员判断") == true) //{ // i_temp_0 = 1; // break; //} if (common_file.common_used_fjzt.get_dataset_usedfjzt(ds_temp.Tables[0].Rows[j_0]["yddj"].ToString(), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["ddsj"].ToString()), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["lksj"].ToString()), ds_temp.Tables[0].Rows[j_0]["fjrb"].ToString(), "", ds_temp.Tables[0].Rows[j_0]["fjbh"].ToString(), "", common_file.common_app.is_contain_wx) == true) { i_temp_0 = 1; break; } } } ds_temp.Clear(); ds_temp.Dispose(); } if (i_temp_0 == 5) { //进入撤销 common_file.common_app.get_czsj(); //进入撤销 string url = common_file.common_app.service_url + "Qyddj/Qyddj_app.asmx"; object[] args = new object[7]; args[0] = common_file.common_app.yydh; args[1] = common_file.common_app.qymc; args[2] = DS_ttyd_qx.Tables[0].Rows[k_0]["lsbh"].ToString(); args[3] = DS_ttyd_qx.Tables[0].Rows[k_0]["cznr"].ToString(); args[4] = common_file.common_app.czy; args[5] = common_file.common_app.czsj; args[6] = common_file.common_app.xxzs; Hotel_app.Server.Qyddj.Qydcx Qydcx_services = new Hotel_app.Server.Qyddj.Qydcx(); string result = Qydcx_services.ttyd_cx(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), DateTime.Parse(args[5].ToString()), args[6].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "ttyd_cx", args); if (result == common_file.common_app.get_suc) { common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作成功!"); refresh_app(sel_condition); } else { common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!"); } Cursor.Current = Cursors.Default; } } } } Cursor.Current = Cursors.Default; }
private void b_cx_Click(object sender, EventArgs e) { common_file.common_app.get_czsj(); if (dg_skyd_qx.CurrentRow != null) { int k_0 = 0; DataRowView dgr = dg_skyd_qx.CurrentRow.DataBoundItem as DataRowView; k_0 = DS_skyd_qx.Tables[0].Rows.IndexOf(dgr.Row); if (dg_count > 0 && dg_skyd_qx.CurrentRow.Index < dg_count && DS_skyd_qx != null && DS_skyd_qx.Tables[0].Rows[k_0]["id"].ToString() != "") { if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "是否确认要撤销此记录?") == true) { int i_temp_0 = 5; if (DS_skyd_qx.Tables[0].Rows[k_0]["sktt"].ToString() == common_file.common_sktt.sktt_tt || DS_skyd_qx.Tables[0].Rows[k_0]["sktt"].ToString() == common_file.common_sktt.sktt_hy) { common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,团队成员不能单独撤销!"); i_temp_0 = 1; } if (i_temp_0 == 5) { BLL.Common B_Common = new Hotel_app.BLL.Common(); DataSet ds_temp = B_Common.GetList("select * from VIEW_Qskyd_qx", "lsbh='" + DS_skyd_qx.Tables[0].Rows[dg_skyd_qx.CurrentRow.Index]["lsbh"].ToString() + "' and fjbh<>''"); if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0) { common_file.common_app.get_czsj(); for (int j_0 = 0; j_0 < ds_temp.Tables[0].Rows.Count; j_0++) { //if (common_file.common_used_fjzt.judge_kyfs(common_file.common_app.get_add, ds_temp.Tables[0].Rows[j_0]["yddj"].ToString(), ds_temp.Tables[0].Rows[j_0]["lzfs"].ToString(), 0, ds_temp.Tables[0].Rows[j_0]["fjrb"].ToString(), ds_temp.Tables[0].Rows[j_0]["fjrb"].ToString(), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["ddsj"].ToString()), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["lksj"].ToString()), ds_temp.Tables[0].Rows[j_0]["krxm"].ToString(), ds_temp.Tables[0].Rows[j_0]["fjbh"].ToString(), ds_temp.Tables[0].Rows[j_0]["lsbh"].ToString(), " 撤销散客预订") == true) //{ // i_temp_0 = 1; // break; //} if (common_file.common_used_fjzt.get_dataset_usedfjzt(ds_temp.Tables[0].Rows[j_0]["yddj"].ToString(), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["ddsj"].ToString()), DateTime.Parse(ds_temp.Tables[0].Rows[j_0]["lksj"].ToString()), ds_temp.Tables[0].Rows[j_0]["fjrb"].ToString(), "", ds_temp.Tables[0].Rows[j_0]["fjbh"].ToString(), "", common_file.common_app.is_contain_wx) == true) { i_temp_0 = 1; break; } } } ds_temp.Dispose(); } if (i_temp_0 == 5) { common_file.common_app.get_czsj(); //进入撤销 string url = common_file.common_app.service_url + "Qyddj/Qyddj_app.asmx"; object[] args = new object[7]; args[0] = common_file.common_app.yydh; args[1] = common_file.common_app.qymc; args[2] = DS_skyd_qx.Tables[0].Rows[k_0]["lsbh"].ToString(); args[3] = DS_skyd_qx.Tables[0].Rows[k_0]["cznr"].ToString(); args[4] = common_file.common_app.czy; args[5] = common_file.common_app.czsj; args[6] = common_file.common_app.xxzs; Hotel_app.Server.Qyddj.Qydcx Qydcx_services = new Hotel_app.Server.Qyddj.Qydcx(); string result = Qydcx_services.skyd_cx(args[0].ToString(), args[1].ToString(), args[2].ToString(), args[3].ToString(), args[4].ToString(), DateTime.Parse(args[5].ToString()), args[6].ToString()); //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "skyd_cx", args); if (result == common_file.common_app.get_suc) { refresh_app(sel_condition); 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, "操作失败!"); } Cursor.Current = Cursors.Default; } } } } Cursor.Current = Cursors.Default; }