示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (cz_sel == "cz" && dg_Qkrxh.CurrentRow != null)
            {
                int         i_000 = 0;
                DataRowView dgr   = dg_Qkrxh.CurrentRow.DataBoundItem as DataRowView;
                i_000 = DS_Qkrxh.Tables[0].Rows.IndexOf(dgr.Row);

                if (dg_count > 0 && DS_Qkrxh.Tables[0].Rows[i_000]["krxh"].ToString() != "")
                {
                    if (common_file.common_app.message_box_show_select(common_file.common_app.message_title, "是否确认要删除此记录!") == true)
                    {
                        common_file.common_app.get_czsj();
                        url  = common_file.common_app.service_url;
                        url += "Qyddj/Qyddj_app.asmx";

                        id = DS_Qkrxh.Tables[0].Rows[i_000]["id"].ToString();
                        object[] args = new object[14];
                        args[0]  = id;
                        args[1]  = common_file.common_app.yydh;
                        args[2]  = common_file.common_app.qymc;
                        args[3]  = krxm;
                        args[4]  = krsj;
                        args[5]  = zjhm;
                        args[6]  = hykh;
                        args[7]  = cB_xhrx.Text.Trim().Replace("'", "-");
                        args[8]  = tB_krxh.Text.Trim().Replace("'", "-");
                        args[9]  = "";
                        args[10] = common_file.common_app.czy;
                        args[11] = DateTime.Now;
                        args[12] = common_file.common_app.get_delete;
                        args[13] = common_file.common_app.xxzs;

                        Hotel_app.Server.Qyddj.Qyddj_other Qyddj_other_services = new Hotel_app.Server.Qyddj.Qyddj_other();
                        string result = Qyddj_other_services.Qkrxh_add_edit_delete(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(), DateTime.Parse(args[11].ToString()), args[12].ToString(), args[13].ToString());
                        //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Qkrxh_add_edit_delete", args);
                        if (result == common_file.common_app.get_suc)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作成功!");
                            refresh_app();
                            //this.Close();
                        }
                        else
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!");
                        } Cursor.Current = Cursors.Default;
                    }
                }
            }
            else
            if (cz_sel == "sel")
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "此模式下只能看,不能操作!");
            }
        }
示例#2
0
        private void b_save_Click(object sender, EventArgs e)
        {
            if (cz_sel == "cz")
            {
                if (add_edit == common_file.common_app.get_add)
                {
                    if (tB_tsnr.Text.Trim() == "")
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "请输入要投诉的内容!");
                    }
                    else
                    {
                        common_file.common_app.get_czsj();
                        string url = common_file.common_app.service_url;
                        url += "Qyddj/Qyddj_app.asmx";
                        object[] args = new object[22];
                        args[0]  = id;
                        args[1]  = common_file.common_app.yydh;
                        args[2]  = common_file.common_app.qymc;
                        args[3]  = lsbh;
                        args[4]  = fjbh;
                        args[5]  = sktt;
                        args[6]  = krxm;
                        args[7]  = krsj;
                        args[8]  = zjhm;
                        args[9]  = xyh;
                        args[10] = xydw;
                        args[11] = hykh;
                        args[12] = "";
                        args[13] = tB_tsnr.Text.Trim().Replace("'", "-");
                        args[14] = DateTime.Now;
                        args[15] = common_file.common_app.czy;
                        args[16] = "";
                        args[17] = "";
                        args[18] = DateTime.Now;
                        args[19] = "";
                        args[20] = add_edit;
                        args[21] = common_file.common_app.xxzs;

                        Hotel_app.Server.Qyddj.Qyddj_other Qyddj_other_services = new Hotel_app.Server.Qyddj.Qyddj_other();
                        string result = Qyddj_other_services.Qtsjy_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(),
                                                                            DateTime.Parse(args[14].ToString()), args[15].ToString(), args[16].ToString(), args[17].ToString(), DateTime.Parse(args[18].ToString()), args[19].ToString(), args[20].ToString(), args[21].ToString());

                        //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Qtsjy_add_edit", args);
                        if (result == common_file.common_app.get_suc)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作成功!");
                            refresh_app(sql_condition);
                            tB_tsnr.Text = "";
                            //this.Close();
                        }
                        else
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!");
                        }
                    }
                }
                Cursor.Current = Cursors.Default;
            }
            else
            if (cz_sel == "sel")
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "此模式下只能看,不能操作!");
            }
        }
示例#3
0
        private void b_save_Click(object sender, EventArgs e)
        {
            if (cz_sel == "cz")
            {
                if (add_edit == common_file.common_app.get_add)
                {
                    if (cB_xhrx.Text.Trim() == "")
                    {
                        common_file.common_app.Message_box_show(common_file.common_app.message_title, "请选择类型!");
                    }
                    else
                    {
                        DataSet ds_temp = B_Common.GetList("select * from Qkrxh", "zjhm='" + zjhm + "' and xhrx='" + cB_xhrx.Text.Trim().Replace("'", "-") + "'");
                        if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,客人喜好已经存在了!");
                            return;
                        }

                        if (tB_krxh.Text.Trim() == "")
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "请输入客人喜好!"); return;
                        }
                        else
                        {
                            if (add_edit == common_file.common_app.get_add)
                            {
                                common_file.common_app.get_czsj();
                                url  = common_file.common_app.service_url;
                                url += "Qyddj/Qyddj_app.asmx";
                                object[] args = new object[14];
                                args[0]  = id;
                                args[1]  = common_file.common_app.yydh;
                                args[2]  = common_file.common_app.qymc;
                                args[3]  = krxm;
                                args[4]  = krsj;
                                args[5]  = zjhm;
                                args[6]  = hykh;
                                args[7]  = cB_xhrx.Text.Trim().Replace("'", "-");
                                args[8]  = tB_krxh.Text.Trim().Replace("'", "-");
                                args[9]  = "";
                                args[10] = common_file.common_app.czy;
                                args[11] = DateTime.Now;
                                args[12] = add_edit;
                                args[13] = common_file.common_app.xxzs;

                                Hotel_app.Server.Qyddj.Qyddj_other Qyddj_other_services = new Hotel_app.Server.Qyddj.Qyddj_other();
                                string result = Qyddj_other_services.Qkrxh_add_edit_delete(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(), DateTime.Parse(args[11].ToString()), args[12].ToString(), args[13].ToString());
                                //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Qkrxh_add_edit_delete", args);
                                if (result == common_file.common_app.get_suc)
                                {
                                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作成功!");
                                    refresh_app();
                                    cB_xhrx.Text = "";
                                    tB_krxh.Text = "";
                                    tB_krxh.Focus();
                                    add_edit = common_file.common_app.get_edit;
                                }
                                else
                                {
                                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作失败!");
                                } Cursor.Current = Cursors.Default;
                            }
                        }
                    }
                }
                if (add_edit == common_file.common_app.get_edit)
                {
                    if (id != "")
                    {
                        common_file.common_app.get_czsj();
                        url  = common_file.common_app.service_url;
                        url += "Qyddj/Qyddj_app.asmx";
                        object[] args = new object[14];
                        args[0]  = id;
                        args[1]  = common_file.common_app.yydh;
                        args[2]  = common_file.common_app.qymc;
                        args[3]  = krxm;
                        args[4]  = krsj;
                        args[5]  = zjhm;
                        args[6]  = hykh;
                        args[7]  = cB_xhrx.Text.Trim().Replace("'", "-");
                        args[8]  = tB_krxh.Text.Trim().Replace("'", "-");
                        args[9]  = "";
                        args[10] = common_file.common_app.czy;
                        args[11] = DateTime.Now;
                        args[12] = add_edit;
                        args[13] = common_file.common_app.xxzs;

                        Hotel_app.Server.Qyddj.Qyddj_other Qyddj_other_services = new Hotel_app.Server.Qyddj.Qyddj_other();
                        string result = Qyddj_other_services.Qkrxh_add_edit_delete(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(), DateTime.Parse(args[11].ToString()), args[12].ToString(), args[13].ToString());
                        //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Qkrxh_add_edit_delete", args);
                        if (result == common_file.common_app.get_suc)
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "操作成功!");
                            refresh_app();
                            cB_xhrx.Text = "";
                            tB_krxh.Text = "";
                            tB_krxh.Focus();
                            id = "";
                        }
                        else
                        {
                            common_file.common_app.Message_box_show(common_file.common_app.message_title, "请选择要修改的喜好项目!");
                        } Cursor.Current = Cursors.Default;
                    }
                }
            }
            else
            if (cz_sel == "sel")
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "此模式下只能看,不能操作!");
            }
        }