Beispiel #1
0
        public string clear_old_yd_fjzt(string old_fjbh, DateTime ddsj, DateTime lksj, DateTime czsj, string czy, string xxzs)
        {
            string s = common_file.common_app.get_failure;
            string krxm0 = ""; string sktt0 = ""; string lsbh0 = "";
            bool   shlf0 = false; bool shts0 = false; bool shvip0 = false; bool fjbm0 = false;

            BLL.Ffjzt B_Ffjzt = new Hotel_app.BLL.Ffjzt();
            DataSet   ds_temp = B_Ffjzt.GetList("fjbh='" + old_fjbh + "'");//选择旧房号

            Model.Ffjzt          M_Ffjzt;
            Ffjzt.Ffjzt_add_edit Ffjzt_add_edit_new = new Hotel_app.Server.Ffjzt.Ffjzt_add_edit();
            if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
            {
                s       = common_file.common_app.get_suc;
                M_Ffjzt = B_Ffjzt.GetModel(int.Parse(ds_temp.Tables[0].Rows[0]["id"].ToString()));
                ds_temp = B_Ffjzt.GetList("zyzt_second='" + common_file.common_fjzt.ydf + "' and fjbh='" + old_fjbh + "' and yd_ddsj='" + ddsj.ToString() + "' and yd_lksj='" + lksj.ToString() + "'");
                if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)//原来如果有在房态里体现预订的话要先清除,但新的房号如果有排也要重新加载新房号的房态
                {
                    s = common_file.common_app.get_failure;
                    //krxm0 = ""; sktt0 = ""; lsbh0 = "";
                    //shlf0 = false; shts0 = false; shvip0 = false;
                    //为什么要下面这步,为了在没在住房时清除以下三个值.
                    if (M_Ffjzt.zyzt == common_file.common_fjzt.zzf)
                    {
                        krxm0 = M_Ffjzt.krxm; lsbh0 = M_Ffjzt.lsbh; sktt0 = M_Ffjzt.sktt;
                        shlf0 = M_Ffjzt.shlf; shts0 = M_Ffjzt.shts; shvip0 = M_Ffjzt.shvip; fjbm0 = M_Ffjzt.fjbm;
                    }
                    Ffjzt_add_edit_new.Ffjzt_xgft(M_Ffjzt.zyzt, "", M_Ffjzt.zybz, old_fjbh, krxm0, M_Ffjzt.ddsj, M_Ffjzt.lksj, DateTime.Parse(common_file.common_app.cssj), DateTime.Parse(common_file.common_app.cssj), shlf0, shts0, shvip0, fjbm0, sktt0, lsbh0, czsj, czy, "预订清除", xxzs);
                    s = common_file.common_app.get_suc;
                }
            }
            return(s);
        }
Beispiel #2
0
        public string add_fjbh_yd_fjzt(string lsbh, string fjbh, string sktt, DateTime czsj, string czy, string xxzs)
        //预订时变更去修改房态,返回成功或失败
        {
            string s = common_file.common_app.get_failure;
            string krxm0 = ""; string sktt0 = ""; string lsbh0 = "";
            bool   shlf0 = false; bool shts0 = false; bool shvip0 = false; bool fjbm0 = false;

            BLL.Qskyd_fjrb       B_Qskyd_fjrb       = new Hotel_app.BLL.Qskyd_fjrb();
            BLL.Ffjzt            B_Ffjzt            = new Hotel_app.BLL.Ffjzt();
            Model.Ffjzt          M_fjzt_temp;
            Ffjzt.Ffjzt_add_edit Ffjzt_add_edit_new = new Hotel_app.Server.Ffjzt.Ffjzt_add_edit();
            DataSet ds_temp = B_Qskyd_fjrb.GetList("lsbh='" + lsbh + "'");

            if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
            {
                s     = common_file.common_app.get_failure;
                krxm0 = ds_temp.Tables[0].Rows[0]["krxm"].ToString();
                sktt0 = ds_temp.Tables[0].Rows[0]["sktt"].ToString();
                lsbh0 = ds_temp.Tables[0].Rows[0]["lsbh"].ToString();
                DateTime yd_ddsj_0 = DateTime.Parse(ds_temp.Tables[0].Rows[0]["ddsj"].ToString());
                DateTime yd_lksj_0 = DateTime.Parse(ds_temp.Tables[0].Rows[0]["lksj"].ToString());
                s = common_file.common_app.get_suc;
                if (yd_ddsj_0 >= DateTime.Now.Date && yd_ddsj_0 < DateTime.Now.Date.AddDays(1))
                //当天预订才去修改房态
                {
                    shlf0   = common_file.common_fjzt.Islf(lsbh0);  //判断是否联房
                    shts0   = common_file.common_fjzt.Ists(lsbh0);  //判断是否特殊
                    shvip0  = common_file.common_fjzt.IsVIP(lsbh0); //判断是否VIP或会员
                    fjbm0   = common_file.common_fjzt.Isbm(lsbh0);
                    s       = common_file.common_app.get_suc;
                    ds_temp = B_Ffjzt.GetList("fjbh='" + fjbh + "'");
                    if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
                    {
                        s           = common_file.common_app.get_failure;
                        M_fjzt_temp = B_Ffjzt.GetModel(int.Parse(ds_temp.Tables[0].Rows[0]["id"].ToString()));
                        if (M_fjzt_temp.zyzt == common_file.common_fjzt.zzf)
                        {
                            sktt0  = M_fjzt_temp.sktt;
                            lsbh0  = M_fjzt_temp.lsbh;
                            krxm0  = M_fjzt_temp.krxm;
                            shlf0  = M_fjzt_temp.shlf;  //common_file.common_fjzt.Islf(lsbh);   //判断是否联房
                            shts0  = M_fjzt_temp.shts;  //common_file.common_fjzt.Ists(lsbh);//判断是否特殊
                            shvip0 = M_fjzt_temp.shvip; //common_file.common_fjzt.IsVIP(lsbh);//判断是否VIP或会员
                            fjbm0  = M_fjzt_temp.fjbm;
                        }
                        //else
                        //{ sktt0 = M_fjzt_temp.sktt; lsbh0 = M_fjzt_temp.lsbh; }
                        //重新加载新房号的房态
                        Ffjzt_add_edit_new.Ffjzt_xgft(M_fjzt_temp.zyzt, common_file.common_fjzt.ydf, M_fjzt_temp.zybz, fjbh, krxm0, M_fjzt_temp.ddsj, M_fjzt_temp.lksj, yd_ddsj_0, yd_lksj_0, shlf0, shts0, shvip0, fjbm0, sktt0, lsbh0, czsj, czy, "加载预订", xxzs);
                        s = common_file.common_app.get_suc;
                    }
                }
            }
            return(s);
        }
Beispiel #3
0
        //public string add_fjbh_dj_fjzt(string fjbh, Model.Qskyd_fjrb M_Qskyd_fjrb, DateTime czsj, string czy, string xxzs)
        ////登记时变更去修改房态,返回成功或失败
        //{
        //    string s = common_file.common_app.get_failure;
        //    string krxm0 = ""; string sktt0 = ""; string lsbh0 = "";
        //    bool shlf0 = false; bool shts0 = false; bool shvip0 = false; bool fjbm0 = false;
        //    BLL.Ffjzt B_Ffjzt = new Hotel_app.BLL.Ffjzt();
        //    DataSet ds_temp = B_Ffjzt.GetList("fjbh='" + fjbh + "'");
        //    Model.Ffjzt M_Ffjzt;
        //    Ffjzt.Ffjzt_add_edit Ffjzt_add_edit_new = new Hotel_app.Ffjzt.Ffjzt_add_edit();
        //    if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
        //    {
        //        M_Ffjzt = B_Ffjzt.GetModel(int.Parse(ds_temp.Tables[0].Rows[0]["id"].ToString()));
        //        lsbh0 = M_Qskyd_fjrb.lsbh;
        //        krxm0 = M_Qskyd_fjrb.krxm;
        //        sktt0 = M_Qskyd_fjrb.sktt;
        //        shlf0 = common_file.common_fjzt.Islf(lsbh0);   //判断是否联房
        //        shts0 = common_file.common_fjzt.Ists(lsbh0);//判断是否特殊
        //        shvip0 = common_file.common_fjzt.IsVIP(lsbh0);//判断是否VIP或会员
        //        fjbm0 = common_file.common_fjzt.Isbm(lsbh0);
        //        Ffjzt_add_edit_new.Ffjzt_xgft(common_file.common_fjzt.zzf, M_Ffjzt.zyzt_second, M_Ffjzt.zybz, fjbh, krxm0, M_Qskyd_fjrb.ddsj, M_Qskyd_fjrb.lksj, M_Ffjzt.yd_ddsj, M_Ffjzt.yd_lksj, shlf0, shts0, shvip0,fjbm0, sktt0, lsbh0, czsj, czy, common_file.common_fjzt.ff, xxzs);
        //        s = common_file.common_app.get_suc;
        //    }
        //    return s;
        //}



        //登记时变更去修改房态,返回成功或失败
        public string add_fjbh_dj_fjzt(string fjbh, Model.Qskyd_fjrb M_Qskyd_fjrb, DateTime czsj, string czy, string xxzs)
        {
            string s = common_file.common_app.get_failure;
            string krxm0 = ""; string sktt0 = ""; string lsbh0 = "";
            bool   shlf0 = false; bool shts0 = false; bool shvip0 = false; bool fjbm0 = false;

            BLL.Ffjzt B_Ffjzt = new Hotel_app.BLL.Ffjzt();
            DataSet   ds_temp = B_Ffjzt.GetList("fjbh='" + fjbh + "'");

            Model.Ffjzt          M_Ffjzt;
            Ffjzt.Ffjzt_add_edit Ffjzt_add_edit_new = new Hotel_app.Server.Ffjzt.Ffjzt_add_edit();
            if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
            {
                M_Ffjzt = B_Ffjzt.GetModel(int.Parse(ds_temp.Tables[0].Rows[0]["id"].ToString()));
                lsbh0   = M_Qskyd_fjrb.lsbh;
                krxm0   = M_Qskyd_fjrb.krxm;
                sktt0   = M_Qskyd_fjrb.sktt;
                DateTime yd_ddsj_temp = M_Qskyd_fjrb.ddsj;
                DateTime yd_lksj_temp = M_Qskyd_fjrb.lksj;
                shlf0  = common_file.common_fjzt.Islf(lsbh0);  //判断是否联房
                shts0  = common_file.common_fjzt.Ists(lsbh0);  //判断是否特殊
                shvip0 = common_file.common_fjzt.IsVIP(lsbh0); //判断是否VIP或会员
                fjbm0  = common_file.common_fjzt.Isbm(lsbh0);
                Ffjzt_add_edit_new.Ffjzt_xgft(common_file.common_fjzt.zzf, M_Ffjzt.zyzt_second, M_Ffjzt.zybz, fjbh, krxm0, M_Qskyd_fjrb.ddsj, M_Qskyd_fjrb.lksj, M_Ffjzt.yd_ddsj, M_Ffjzt.yd_lksj, shlf0, shts0, shvip0, fjbm0, sktt0, lsbh0, czsj, czy, common_file.common_fjzt.ff, xxzs);

                M_Ffjzt = B_Ffjzt.GetModel(int.Parse(ds_temp.Tables[0].Rows[0]["id"].ToString()));
                if (M_Ffjzt != null)
                {
                    if (M_Ffjzt.yd_ddsj == yd_ddsj_temp && M_Ffjzt.yd_lksj == yd_lksj_temp)
                    {
                        M_Ffjzt.zyzt_second = "";
                        M_Ffjzt.yd_ddsj     = DateTime.Parse(common_file.common_app.cssj);
                        M_Ffjzt.yd_lksj     = DateTime.Parse(common_file.common_app.cssj);
                        B_Ffjzt.Update(M_Ffjzt);
                    }
                }

                s = common_file.common_app.get_suc;
            }
            //s = common_file.common_app.get_suc;
            return(s);
        }
Beispiel #4
0
        public string clear_old_dj_fjzt(string old_fjbh, DateTime czsj, string czy, string xxzs)
        //登记换房时清除旧的房态清除
        {
            string s = common_file.common_app.get_failure;
            string krxm0 = ""; string sktt0 = ""; string lsbh0 = "";
            bool   shlf0 = false; bool shts0 = false; bool shvip0 = false; bool fjbm0 = false;
            string zyzt_second0 = "";

            BLL.Ffjzt            B_Ffjzt      = new Hotel_app.BLL.Ffjzt();
            BLL.Qskyd_fjrb       B_Qskyd_fjrb = new Hotel_app.BLL.Qskyd_fjrb();
            Model.Ffjzt          M_Ffjzt;
            Ffjzt.Ffjzt_add_edit Ffjzt_add_edit_new = new Hotel_app.Server.Ffjzt.Ffjzt_add_edit();
            DataSet ds_temp = B_Ffjzt.GetList("fjbh='" + old_fjbh + "'");

            if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
            {
                M_Ffjzt = B_Ffjzt.GetModel(int.Parse(ds_temp.Tables[0].Rows[0]["id"].ToString()));
                //在Qskyd_fjrb表里查询出预订客人的相关住房登记信息

                DateTime yd_ddsj0 = DateTime.Parse(common_file.common_app.cssj);
                DateTime yd_lksj0 = DateTime.Parse(common_file.common_app.cssj);
                ds_temp = B_Qskyd_fjrb.GetList("yddj='" + common_file.common_yddj.yddj_yd + "' and fjbh='" + old_fjbh + "' and ddsj='" + M_Ffjzt.yd_ddsj.ToString() + "' and lksj='" + M_Ffjzt.yd_lksj.ToString() + "'");
                if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
                {
                    lsbh0        = ds_temp.Tables[0].Rows[0]["lsbh"].ToString();
                    shlf0        = common_file.common_fjzt.Islf(lsbh0);  //判断是否联房
                    shts0        = common_file.common_fjzt.Ists(lsbh0);  //判断是否特殊
                    shvip0       = common_file.common_fjzt.IsVIP(lsbh0); //判断是否VIP或会员
                    fjbm0        = common_file.common_fjzt.Isbm(lsbh0);
                    krxm0        = ds_temp.Tables[0].Rows[0]["krxm"].ToString();
                    sktt0        = ds_temp.Tables[0].Rows[0]["sktt"].ToString();
                    lsbh0        = ds_temp.Tables[0].Rows[0]["lsbh"].ToString();
                    zyzt_second0 = common_file.common_fjzt.ydf;
                    yd_ddsj0     = DateTime.Parse(ds_temp.Tables[0].Rows[0]["ddsj"].ToString());
                    yd_lksj0     = DateTime.Parse(ds_temp.Tables[0].Rows[0]["lksj"].ToString());
                }

                Ffjzt_add_edit_new.Ffjzt_xgft(common_file.common_fjzt.zf, zyzt_second0, common_file.common_fjzt.ff, old_fjbh, krxm0, DateTime.Parse(common_file.common_app.cssj), DateTime.Parse(common_file.common_app.cssj), yd_ddsj0, yd_lksj0, shlf0, shts0, shvip0, fjbm0, sktt0, lsbh0, czsj, czy, common_file.common_fjzt.ff, xxzs);
                s = common_file.common_app.get_suc;
            }
            return(s);
        }
Beispiel #5
0
        private void b_delete_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (common_file.common_roles.get_user_qx("B_ftcx_sc", common_file.common_app.user_type) == false)
            {
                return;
            }
            if (DS_Ffjzt != null && DS_Ffjzt.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.dataGridViewSummary1.Rows[i].Cells[0].GetEditedFormattedValue(i, ss) != null && Convert.ToBoolean(this.dataGridViewSummary1.Rows[i].Cells[0].GetEditedFormattedValue(i, ss)) == true)
                        {
                            //j = Convert.ToInt32(dataGridViewSummary1.Rows[i].Index.ToString());

                            DataRowView dgr = dataGridViewSummary1.Rows[i].DataBoundItem as DataRowView;
                            j = DS_Ffjzt.Tables[0].Rows.IndexOf(dgr.Row);

                            if (DS_Ffjzt.Tables[0].Rows[j]["id"].ToString() != "")
                            {
                                if (DS_Ffjzt.Tables[0].Rows[j]["zyzt"].ToString() == common_file.common_fjzt.gjf && DS_Ffjzt.Tables[0].Rows[j]["zyzt_second"].ToString() == "")
                                {
                                    //id, yydh, qymc, jdlh, jdlh_name, jdcs, jdcs_name,
                                    //fjrb, fjrb_code, fjbh, fjdh, dhfj, bz, add_edit_delete, xxzs
                                    string   url  = common_file.common_app.service_url + "Ffjzt/Ffjzt_app.asmx";
                                    string[] args = new string[15];
                                    args[0]  = DS_Ffjzt.Tables[0].Rows[j]["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]  = "";
                                    args[9]  = "";
                                    args[10] = "";
                                    args[11] = "";
                                    args[12] = "";
                                    args[13] = common_file.common_app.get_delete;
                                    args[14] = common_file.common_app.xxzs;
                                    //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Ffjzt_add_edit_delete", args);

                                    Hotel_app.Server.Ffjzt.Ffjzt_add_edit Ffjzt_add_edit_services = new Hotel_app.Server.Ffjzt.Ffjzt_add_edit();
                                    string result = Ffjzt_add_edit_services.Ffjzt_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(), args[11].ToString(), args[12].ToString(), args[13].ToString(), args[14].ToString());

                                    if (result == common_file.common_app.get_suc && (s == common_file.common_app.get_suc || s == ""))
                                    {
                                        s = common_file.common_app.get_suc;
                                    }
                                    else
                                    {
                                        s = common_file.common_app.get_failure;
                                    }
                                }
                                else
                                {
                                    common_file.common_app.Message_box_show(common_file.common_app.message_title, DS_Ffjzt.Tables[0].Rows[j]["fjbh"].ToString() + "处于不能删除状态中!");
                                }
                            }
                            //common_file.common_app.Message_box_show(common_file.common_app.message_title, dataGridViewSummary1.Rows[i].Index.ToString());
                        }
                    }
                    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, "删除不成功!");
                    }
                    refresh_app();
                }
            }
            Cursor.Current = Cursors.Default;
        }
Beispiel #6
0
        public string set_wx_other(int id, string yydh, string qymc, string lsbh, string fjrb, string fjbh, DateTime ddsj, DateTime lksj, string bz, string zyzt, string czy, string czsj, bool is_top, bool is_select, string add_edit_delete, string xxzs)
        {
            string   s        = common_file.common_app.get_failure;
            DateTime yd_ddsj0 = DateTime.Parse(common_file.common_app.cssj);
            DateTime yd_lksj0 = DateTime.Parse(common_file.common_app.cssj);

            BLL.Fwx_other  B_Fwx_other  = new Hotel_app.BLL.Fwx_other();
            BLL.Qskyd_fjrb B_Qskyd_fjrb = new Hotel_app.BLL.Qskyd_fjrb();
            BLL.Ffjzt      B_Ffjzt      = new Hotel_app.BLL.Ffjzt();

            Model.Fwx_other      M_Fwx_other        = new Hotel_app.Model.Fwx_other();
            Ffjzt.Ffjzt_add_edit Ffjzt_add_edit_new = new Hotel_app.Server.Ffjzt.Ffjzt_add_edit();
            if (add_edit_delete == common_file.common_app.get_add)
            {
                s = common_file.common_app.get_failure;
                M_Fwx_other.yydh      = yydh; M_Fwx_other.qymc = qymc; M_Fwx_other.lsbh = lsbh;
                M_Fwx_other.fjrb      = fjrb; M_Fwx_other.fjbh = fjbh; M_Fwx_other.ddsj = ddsj;
                M_Fwx_other.lksj      = lksj; M_Fwx_other.bz = bz; M_Fwx_other.zyzt = zyzt;
                M_Fwx_other.czy       = czy; M_Fwx_other.czsj = DateTime.Now; M_Fwx_other.cznr = common_file.common_app.chinese_add;
                M_Fwx_other.is_top    = false;
                M_Fwx_other.is_select = false;
                if (B_Fwx_other.Add(M_Fwx_other) > 0)
                {
                    s = common_file.common_app.get_suc;

                    if (ddsj >= DateTime.Now.Date && ddsj < DateTime.Now.Date.AddDays(1))
                    //当天维修才去修改房态
                    {
                        s = common_file.common_app.get_failure;
                        s = Ffjzt_add_edit_new.set_yd_ft(zyzt, fjbh, ddsj, lksj, czsj, "修改房态成" + zyzt, czy, xxzs);
                        s = common_file.common_app.get_suc;
                    }
                }
            }
            else
            if (add_edit_delete == common_file.common_app.get_edit)
            {
                s           = common_file.common_app.get_failure;
                M_Fwx_other = B_Fwx_other.GetModel(id);
                //先修改原来如果有占用房态的房间要先清除掉
                DateTime ddsj_temp = M_Fwx_other.ddsj;
                DateTime lksj_temp = M_Fwx_other.lksj;
                DataSet  ds_temp0  = B_Ffjzt.GetList("zyzt='" + zyzt + "' and ddsj='" + ddsj_temp.ToString() + "' and lksj='" + lksj_temp.ToString() + "'");
                if ((ddsj < DateTime.Now.Date || ddsj >= DateTime.Now.Date.AddDays(1)) && (ds_temp0.Tables[0].Rows.Count > 0))
                {
                    s = Ffjzt_add_edit_new.set_yd_ft(common_file.common_fjzt.zf, fjbh, DateTime.Parse(common_file.common_app.cssj), DateTime.Parse(common_file.common_app.cssj), czsj, zyzt + "自动修改房态成" + common_file.common_fjzt.zf, czy, xxzs);
                }
                ds_temp0.Dispose();
                M_Fwx_other.ddsj = ddsj;
                M_Fwx_other.lksj = lksj; M_Fwx_other.bz = bz; M_Fwx_other.zyzt = zyzt;
                M_Fwx_other.czy  = czy; M_Fwx_other.czsj = DateTime.Now; M_Fwx_other.cznr = common_file.common_app.chinese_edit;
                if (B_Fwx_other.Update(M_Fwx_other) == true)
                {
                    s = common_file.common_app.get_suc;

                    if ((ddsj >= DateTime.Now.Date && ddsj < DateTime.Now.Date.AddDays(1)))
                    //不能限制当天维修才去修改房态,因为有可能离开时间延长或变短了!
                    {
                        s = common_file.common_app.get_failure;
                        s = Ffjzt_add_edit_new.set_yd_ft(zyzt, fjbh, ddsj, lksj, czsj, "修改房态成" + zyzt, czy, xxzs);
                        s = common_file.common_app.get_suc;
                    }
                }
            }
            else
            if (add_edit_delete == common_file.common_app.get_delete)
            {
                s           = common_file.common_app.get_failure;
                M_Fwx_other = B_Fwx_other.GetModel(id);
                //先修改原来如果有占用房态的房间要先清除掉
                DateTime ddsj_temp = M_Fwx_other.ddsj;
                DateTime lksj_temp = M_Fwx_other.lksj;
                DataSet  ds_temp0  = B_Ffjzt.GetList("zyzt='" + zyzt + "' and fjbh='" + fjbh + "' and ddsj='" + ddsj_temp.ToString() + "' and lksj='" + lksj_temp.ToString() + "'");
                if ((ds_temp0.Tables[0].Rows.Count > 0))
                {
                    s = Ffjzt_add_edit_new.set_yd_ft(common_file.common_fjzt.zf, fjbh, DateTime.Parse(common_file.common_app.cssj), DateTime.Parse(common_file.common_app.cssj), czsj, zyzt + "自动修改房态成" + common_file.common_fjzt.zf, czy, xxzs);
                }
                ds_temp0.Dispose();
                B_Fwx_other.Delete(id);
                s = common_file.common_app.get_suc;
            }

            return(s);
        }
Beispiel #7
0
        private void b_delete_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (DS_Ffjrb != null && DS_Ffjrb.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.dataGridViewSummary1.Rows[i].Cells[0].GetEditedFormattedValue(i, ss) != null && Convert.ToBoolean(this.dataGridViewSummary1.Rows[i].Cells[0].GetEditedFormattedValue(i, ss)) == true)
                        {
                            //j =Convert.ToInt32( dataGridViewSummary1.Rows[i].Index.ToString());
                            DataRowView dgr = dataGridViewSummary1.Rows[i].DataBoundItem as DataRowView;
                            j = DS_Ffjrb.Tables[0].Rows.IndexOf(dgr.Row);


                            if (DS_Ffjrb.Tables[0].Rows[j]["id"].ToString() != "")
                            {
                                string   url  = common_file.common_app.service_url + "Ffjzt/Ffjzt_app.asmx";
                                string[] args = new string[9];
                                args[0] = DS_Ffjrb.Tables[0].Rows[j]["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] = common_file.common_app.get_delete;
                                args[8] = common_file.common_app.xxzs;
                                Hotel_app.Server.Ffjzt.Ffjzt_add_edit Ffjzt_app_services = new Hotel_app.Server.Ffjzt.Ffjzt_add_edit();
                                string result = Ffjzt_app_services.Ffjrb_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());
                                //object result = Hotel_app.我的替换DynamicWebServiceCall.InvokeWebService(url, "Ffjrb_add_edit", args);
                                if (result == common_file.common_app.get_suc && (s == common_file.common_app.get_suc || s == ""))
                                {
                                    s = common_file.common_app.get_suc;
                                }
                                else
                                {
                                    s = common_file.common_app.get_failure;
                                }
                            }
                            //common_file.common_app.Message_box_show(common_file.common_app.message_title, dataGridViewSummary1.Rows[i].Index.ToString());
                        }
                    }
                    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, "删除不成功!");
                    }
                    refresh_app();
                }
            }
            Cursor.Current = Cursors.Default;
        }