Exemple #1
0
        /// <summary>
        /// 保存
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAdds_Click(object sender, EventArgs e)
        {
            string no = "CZ" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("-", "").Replace(":", "").Replace(" ", "").Replace("/", "");

            CdHotelManage.Model.goods_account model = new CdHotelManage.Model.goods_account();
            CdHotelManage.BLL.goods_account   bll   = new CdHotelManage.BLL.goods_account();
            model.ga_number    = DDlName.SelectedValue;
            model.ga_name      = DDlName.SelectedItem.Text;
            model.ga_Type      = 204;
            model.ga_price     = 0;
            model.ga_sum_price = Convert.ToDecimal(txt_Money.Value);
            model.ga_date      = Convert.ToDateTime(System.DateTime.Now);
            model.ga_people    = UserNow.UserID;
            model.ga_sfacount  = "否";
            model.ga_remker    = txt_Remaker.Value;
            model.Ga_Account   = ga_Account.Text;
            model.Ga_goodNo    = no;
            int Result = bll.Add(model);

            if (Result > 0)
            {
                ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('保存成功');parent.window.location.href='account_goods.aspx?readValue=204&accounts=" + ga_Account.Text + "';</script>");
            }
            else
            {
                Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存失败!", "");
            }
        }
Exemple #2
0
        /// <summary>
        /// 保存
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAdds_Click(object sender, EventArgs e)
        {
            CdHotelManage.Model.goods_account model = new CdHotelManage.Model.goods_account();
            CdHotelManage.BLL.goods_account   bll   = new CdHotelManage.BLL.goods_account();
            model.ga_number     = DDlName.SelectedValue;
            model.ga_name       = DDlName.SelectedItem.Text;
            model.ga_Type       = 1;
            model.ga_price      = 0;
            model.ga_sum_price  = Convert.ToDecimal(txt_Money.Value);
            model.ga_date       = Convert.ToDateTime(System.DateTime.Now);
            model.ga_people     = UserNow.UserID;
            model.ga_sfacount   = "否";
            model.ga_remker     = txt_Remaker.Value;
            model.ga_occuid     = fmrzInfo.GetModel(ids).order_id;
            model.ga_roomNumber = fmrzInfo.GetModel(ids).room_number;
            model.Ga_goodNo     = fmrzInfo.GetModel(ids).occ_no;
            int Result = bll.Add(model);

            if (Result > 0)
            {
                Helper.AddRoom(model.ga_roomNumber);
                if (DDlZffs.SelectedValue != "入账")
                {
                    model.ga_number     = DDlName.SelectedItem.Text;
                    model.ga_name       = "费用收款";
                    model.ga_unit       = "";
                    model.ga_Type       = 0;
                    model.ga_price      = Convert.ToDecimal(txt_Money.Value);
                    model.ga_sum_price  = 0;
                    model.ga_date       = Convert.ToDateTime(System.DateTime.Now);
                    model.ga_people     = UserNow.UserID;
                    model.ga_sfacount   = "否";
                    model.ga_zffs_id    = Convert.ToInt32(DDlZffs.SelectedValue);
                    model.ga_remker     = "费用收款";
                    model.ga_roomNumber = fmrzInfo.GetModel(ids).room_number;
                    model.ga_occuid     = fmrzInfo.GetModel(ids).order_id;
                    model.Ga_goodNo     = fmrzInfo.GetModel(ids).occ_no;
                    Result = bll.Add(model);
                }
                ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>ShowOk();</script>");
            }
            else
            {
                Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存失败!", "");
            }
        }
Exemple #3
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAdds_Click(object sender, EventArgs e)
        {
            try
            {
                CdHotelManage.Model.goods_account model = new CdHotelManage.Model.goods_account();
                CdHotelManage.BLL.goods_account   bll   = new CdHotelManage.BLL.goods_account();
                Model.occu_infor Ocmodels = new Model.occu_infor();
                Ocmodels.state_id     = 1;
                Ocmodels.continuelive = ids;
                Ocmodels.brithday     = Convert.ToDateTime(fmrzInfo.GetModel(ids).brithday).ToString();
                Ocmodels.occ_time     = System.DateTime.Now;
                Ocmodels.depar_time   = Convert.ToDateTime(txt_ydDate.Value);
                Ocmodels.pha_sched    = Convert.ToDateTime(txt_xdDate.Value);
                Ocmodels.deposit      = Convert.ToDecimal(txt_yjMoney.Value);
                Ocmodels.stay_day     = Convert.ToInt32(txt_liveDay.Value);
                Ocmodels.meth_pay_id  = Convert.ToInt32(DDlZffs.SelectedValue);
                model.ga_number       = ids.ToString();
                model.ga_Type         = 3;
                model.ga_name         = "续住收款";
                model.ga_number       = ids.ToString();
                model.ga_price        = Convert.ToDecimal(txt_yjMoney.Value);
                model.ga_sum_price    = 0;
                model.ga_date         = Convert.ToDateTime(System.DateTime.Now);
                model.ga_occuid       = fmrzInfo.GetModel(ids).order_id;
                model.ga_people       = UserNow.UserID;
                model.ga_sfacount     = "否";
                model.ga_remker       = txt_Remaker.Value;
                model.Ga_goodNo       = fmrzInfo.GetModel(ids).occ_no;
                model.ga_zffs_id      = Convert.ToInt32(DDlZffs.SelectedValue);
                model.ga_roomNumber   = fmrzInfo.GetModel(ids).room_number;
                int Result = bll.Add(model);
                int day    = Convert.ToInt32(fmrzInfo.GetModel(ids).stay_day) + Convert.ToInt32(txt_liveDay.Value);

                string sql = "update occu_infor set stay_day='" + day + "',depar_time='" + txt_xdDate.Value + "' where occ_id=" + fmrzInfo.GetModel(ids).occ_id + " ";
                fmrzInfo.Updates(sql);
                if (Result > 0 && fmrzInfo.Add(Ocmodels) > 0)
                {
                    Helper.AddRoom(model.ga_roomNumber);
                    //  Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "");
                    ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript'>if(confirm('续住成功,是否打印收款单?')){XZintRZ(this," + fmrzInfo.GetModel(ids).order_id + ") }else{Close('房态图'); }; parent.Window_Close();</script>");
                }
                else
                {
                    Maticsoft.Common.MessageBox.ShowAndRedirect(this, "续住失败!", "");
                }
            }
            catch { }
        }
        //public void Bind()
        //{
        //    Model.occu_infor mod = new Model.occu_infor();
        //    labfh.Text = fmrzInfo.GetModel(ids).room_number;
        //    labfx.Text = GetRealTypeName((fmrzInfo.GetModel(ids).real_type_id));
        //    labkffs.Text = GetKffsName(fmrzInfo.GetModel(ids).real_mode_id);
        //    lably.Text = GetLYName(fmrzInfo.GetModel(ids).source_id);
        //    labname.Text = fmrzInfo.GetModel(ids).occ_name.ToString();
        //    labrzDate.Text = fmrzInfo.GetModel(ids).occ_time.ToString();
        //    labfjMoney.Text = fmrzInfo.GetModel(ids).real_price.ToString();

        //    double ysMoney = 0;
        //    DataSet dt = fmgoodvount.GetList(" ga_occuid in ('" + fmrzInfo.GetModel(ids).order_id + "')");
        //    foreach (DataRow dr in dt.Tables[0].Rows)
        //    {
        //        try
        //        {
        //            ysMoney += double.Parse(dr["ga_sum_price"].ToString());
        //        }
        //        catch { }
        //    }
        //    labSymoney.Text = ysMoney.ToString();
        //}

        /// <summary>
        /// 确认添加
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnAdds_Click(object sender, EventArgs e)
        {
            string no     = "CZ" + System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss").Replace("-", "").Replace(":", "").Replace(" ", "").Replace("/", "");
            int    Result = 0;

            CdHotelManage.Model.goods_account model = new CdHotelManage.Model.goods_account();
            CdHotelManage.BLL.goods_account   bll   = new CdHotelManage.BLL.goods_account();
            int b = hidcontent.Value.Split('|').Length;

            string[] hidcon = hidcontent.Value.Split('|');
            for (int i = 0; i < hidcon.Length - 1; i++)
            {
                try
                {
                    model.ga_number = hidcon[i].Split('#')[0];
                    model.ga_name   = hidcon[i].Split('#')[1];
                    model.ga_unit   = hidcon[i].Split('#')[2];
                    model.ga_Type   = 204;
                    model.ga_price  = 0;
                    model.ga_num    = Convert.ToInt32(hidcon[i].Split('#')[4]);
                    string a = hidcon[i].Split('#')[5];
                    model.ga_sum_price = Convert.ToDecimal(hidcon[i].Split('#')[5]);
                    model.ga_date      = Convert.ToDateTime(System.DateTime.Now);
                    model.ga_people    = UserNow.UserID;
                    model.ga_sfacount  = "否";
                    model.Ga_Account   = ga_Account.Text;
                    // model.ga_zffs_id = Convert.ToInt32(DDlZffs.SelectedValue);
                    model.ga_remker = txt_Remaker.Value;
                    model.Ga_goodNo = no;

                    Result = bll.Add(model);

                    //if (DDlZffs.SelectedValue != "入账")
                    //{
                    //    model.ga_number = hidcon[i].Split('#')[0];
                    //    model.ga_name = "商品收款";
                    //    model.ga_unit = hidcon[i].Split('#')[2];
                    //    model.ga_Type = 0;
                    //    model.ga_price = Convert.ToDecimal(hidcon[i].Split('#')[5]);
                    //    model.ga_num = Convert.ToInt32(hidcon[i].Split('#')[4]);
                    //    model.ga_sum_price = 0;
                    //    model.ga_date = Convert.ToDateTime(System.DateTime.Now);
                    //    model.ga_people = UserNow.UserID;
                    //    model.ga_sfacount = "否";
                    //    model.ga_zffs_id = Convert.ToInt32(DDlZffs.SelectedValue);
                    //    model.ga_remker = txt_Remaker.Value;
                    //    model.ga_roomNumber = fmrzInfo.GetModel(ids).room_number;
                    //    model.ga_occuid = fmrzInfo.GetModel(ids).order_id;
                    //    model.Ga_goodNo = fmrzInfo.GetModel(ids).occ_no;
                    //    Result = bll.Add(model);
                    //}
                }

                catch
                {
                }
            }
            if (Result > 0)
            {
                // ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('保存成功');parent.document.getElementById('btnsercher').click();parent.Window_Close();</script>");
                // ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "alert('保存成功');parent.document.getElementById('btnsercher').click();parent.Window_Close();", "", true);
                //Helper.AddRoom(model.ga_roomNumber);
                ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "click", "alert('保存成功');parent.window.location.href='account_goods.aspx?readValue=204&accounts=" + ga_Account.Text + "';", true);
            }
        }