Пример #1
0
        protected void BtnOk_Click(object a, EventArgs e)
        {
            for (int i = 0; i < this.rep.Items.Count; i++)
            {
                CheckBox check = (CheckBox)this.rep.Items[i].FindControl("cbk");
                if (check != null)
                {
                    if (check.Checked)
                    {
                        HiddenField             hidNewsId = this.rep.Items[i].FindControl("hidId") as HiddenField;
                        Model.occu_infor        model     = blloc.GetModel(Convert.ToInt32(hidNewsId.Value));
                        List <Model.occu_infor> listiccs  = blloc.GetModelList(" order_id='" + model.order_id + "'");
                        if (listiccs.Count > 0)
                        {
                            foreach (Model.occu_infor item in listiccs)
                            {
                                item.order_id   = orderid.Value;
                                item.lordRoomid = loadRoom.Value;
                                blloc.Update(item);
                            }
                        }
                        List <Model.goods_account> listga = bllga.GetModelList1(" ga_occuid=" + model.order_id + "");
                        foreach (Model.goods_account modelga in listga)
                        {
                            modelga.ga_occuid = orderid.Value;
                            bllga.Update(modelga);
                        }
                        model.lordRoomid = loadRoom.Value;
                        model.order_id   = orderid.Value;
                        blloc.Update(model);
                    }
                }
            }

            List <Model.occu_infor> listicc = blloc.GetModelList("order_id='" + orderid.Value + "'");

            foreach (Model.occu_infor item in listicc)
            {
                sbroom.Append(item.room_number + ",");
            }
            Helper.AddRoom(loadRoom.Value, sbroom.ToString() + loadRoom.Value + ",");
            Response.Write("<script>alert('合并成功!');parent.Window_Close();</script>");
        }
Пример #2
0
        protected void btnOk_Click(object sender, EventArgs e)
        {
            if (btnok.Text == "确定")
            {
                Model.goods_account gamodel = new Model.goods_account();
                gamodel           = bllga.GetModels1(Convert.ToInt32(txtid.Value));
                gamodel.ga_remker = yying.Value;
                bllga.Update(gamodel);
                Response.Write("<script>parent.Window_Close();</script>");
            }
            else
            {
                Model.goods_account gamodel = new Model.goods_account();
                gamodel = bllga.GetModels1(Convert.ToInt32(txtid.Value));
                if (gamodel.ga_price != 0)
                {
                    gamodel.ga_price     = Convert.ToDecimal(czprice.Value) * -1;
                    gamodel.ga_sum_price = 0;
                    gamodel.ga_Type      = 12;
                    gamodel.ga_remker    = "冲减入帐日期为" + gamodel.ga_date + "的" + gamodel.ga_name + "" + gamodel.ga_price + "元!/n原因为:" + yying.Value;
                }
                if (gamodel.ga_sum_price != 0)
                {
                    gamodel.ga_price     = Convert.ToDecimal(czprice.Value) * -1;
                    gamodel.ga_sum_price = 0;
                    gamodel.ga_Type      = 12;
                    gamodel.ga_remker    = "冲减入帐日期为" + gamodel.ga_date + "的" + gamodel.ga_name + "" + gamodel.ga_sum_price + "元!/n原因为:" + yying.Value;
                }
                gamodel.ga_name = "冲减";
                gamodel.ga_isys = 0;

                gamodel.ga_date = DateTime.Now;

                if (bllga.Add(gamodel) > 0)
                {
                    Response.Write("<script>alert('冲减成功');parent.Window_Close();</script>");
                }
                Helper.AddRoom(gamodel.ga_roomNumber);
            }
        }
Пример #3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string  account = Request.QueryString["accounts"];
            decimal pri     = Convert.ToDecimal(price.Value);

            Model.goods_account modelag = new Model.goods_account();
            modelag.ga_name    = "结账收款";
            modelag.Ga_Account = account;
            modelag.ga_zffs_id = Convert.ToInt32(DDlZffs.SelectedValue);
            modelag.ga_date    = DateTime.Now;
            modelag.ga_people  = UserNow.UserID;
            modelag.ga_remker  = "收款结算";
            modelag.ga_Type    = 202;
            modelag.ga_price   = pri;
            if (rad1.Checked)
            {
                modelag.ga_jsfs = 0;
            }
            else
            {
                modelag.ga_jsfs = 1;
                bllga.Add(modelag);
            }



            List <Model.goods_account> listag = bllga.GetModelList1("ga_goodNo in (" + idss.Value + ")");

            if (listag.Count > 0)
            {
                foreach (Model.goods_account item in listag)
                {
                    item.ga_Type = 203;
                    bllga.Update(item);
                }
            }
            ClientScript.RegisterStartupScript(GetType(), "message", "<script language='javascript' defer>alert('结帐成功');parent.window.location.reload();</script>");
        }
Пример #4
0
        protected void MemberCard_Click(object sender, EventArgs e)
        {
            string accountY = account.Value;
            string accountS = accounts.Value;

            if (accountS == accountY)
            {
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>alert('目标客户不能为自己!');</script>");
            }
            else
            {
                string goodno = goodnos.Value;
                List <Model.goods_account> listga = bllga.GetModelList1("ga_goodNo in (" + goodno + ") and ga_Account='" + accountY + "' and ga_Type=204");
                if (listga.Count > 0)
                {
                    foreach (Model.goods_account modelga in listga)
                    {
                        modelga.Ga_Account = accountS;
                        bllga.Update(modelga);
                    }
                }
                ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script>alert('转帐成功!');</script>");
            }
        }