Example #1
0
        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();
                            string strissh = DS_Xxfmx.Tables[0].Rows[i]["is_sh"].ToString();
                            if (strissh != null && strissh != "")
                            {
                                if (strissh == common_file.common_app.is_wsh)
                                {
                                    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]  = DS_Xxfmx.Tables[0].Rows[i]["lsbh"].ToString();
                                    args[4]  = "";
                                    args[5]  = "";
                                    args[6]  = "";
                                    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_zbzd Xxfmx_zbzd_services = new Hotel_app.Server.Xxtsz.Xxfmx_zbzd();
                                    string result = Xxfmx_zbzd_services.Xxfmx_zbzd_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());
                                    //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Xxfmx_zbzd_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, "操作失败!");
                                    }
                                }
                                else
                                {
                                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,审核通过就不能删除!");
                                    return;
                                }
                            }
                        }
                    }
                }
            }
            InitializeApp();
            Cursor.Current = Cursors.Default;
        }
Example #2
0
        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_zbzd Xxfmx_zbzd_services = new Hotel_app.Server.Xxtsz.Xxfmx_zbzd();
            string result = Xxfmx_zbzd_services.Update_issh(args[0].ToString(), args[1].ToString());

            //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url,"Update_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, "审核不成功!");
            }
        }
Example #3
0
        // 保存主单
        private void SaveNew_xfmx()
        {
            // id, yydh, qymc, lsbh, czy, zbsj, is_sh,zbnr, 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_zbzd  = B_zbzd.GetModel(int.Parse(Xxfxr_id));
                strlsbh = M_zbzd.lsbh;
            }

            bool f = Cb_is_tj_kc.Checked;

            if (f)
            {
                strissh = common_file.common_app.is_sh;
            }
            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] = strissh;
            args[7] = tB_zbnr.Text.Trim().Replace("'", "_");
            args[8] = tB_bz.Text.Trim().Replace("'", "_");
            if (f)
            {
                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_zbzd Xxfmx_zbzd_services = new Hotel_app.Server.Xxtsz.Xxfmx_zbzd();
            string result = Xxfmx_zbzd_services.Xxfmx_zbzd_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());

            //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Xxfmx_zbzd_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_zbnr.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, "操作失败!");
            }
        }