Exemplo n.º 1
0
 private void b_jz_1_Click(object sender, EventArgs e)
 {
     common_file.common_app.get_czsj();
     flage_status = CheckValue();
     if (flage_status)
     {
         common_file.common_app.get_czsj();
         Add_btff();
         //记帐||挂帐
         if (jj_type == common_file.common_jzzt.czzt_jz || jj_type == common_file.common_jzzt.czzt_gz)
         {
             common_file.common_app.get_czsj();
             Szwcz Frm_Szwcz_new = new Szwcz();
             Frm_Szwcz_new.InitalApp(jj_type, lsbh, "", sk_tt, "Szw_Common");
             Frm_Szwcz_new.StartPosition = FormStartPosition.CenterScreen;
             if (Frm_Szwcz_new.ShowDialog() == DialogResult.OK)
             {
                 common_file.common_app.get_czsj();
                 this.Close();
             }
             //common_file.common_form.ShowFrm_Szwcz_new(jj_type, lsbh,"", sk_tt, "Szw_Common");
         }
         //分结
         if (b_jz_1.Text == "分结")
         {
             this.Close();
             common_file.common_form.ShowFrm_Sfjcz_new(common_file.common_jzzt.czzt_bfsz, lsbh, sk_tt, "");
         }
     }
     else
     {
         common_file.common_app.Message_box_show(common_file.common_app.message_title, "加收类型选择不一致,请更正,加收半天或者加收全天");
     }
     Cursor.Current = Cursors.Default;
 }
Exemplo n.º 2
0
        private void b_find_Click(object sender, EventArgs e)
        {
            if (tB_gzdw.Text.Trim() == "")
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "请填写要结账务的主体(挂账单位名称或者客人姓名");
                return;
            }
            if (cb_pjfs.SelectedItem == null)
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "请选择批结方式");
                return;
            }

            if (cb_pjfs.SelectedItem.ToString() == "按时间")
            {
                jzType         = "Time";
                time_startTime = DateTime.Parse(dt_start.Value.ToShortDateString());
                time_endTime   = DateTime.Parse(dt_end.Value.ToShortDateString() + "  23:59:59");
                if (time_endTime < time_startTime)
                {
                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "请正确选择起始时间和结束时间"); return;
                }
            }
            if (cb_pjfs.SelectedItem.ToString() == "按金额")
            {
                jzType           = "Value";
                dt_start.Enabled = false; dt_end.Enabled = false;
                if (((Maticsoft.Common.PageValidate.IsDecimal(tB_xfje.Text.Trim()) || Maticsoft.Common.PageValidate.IsNumber(tB_xfje.Text.Trim())) == false))
                {
                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "对不起,所输入的数量不是有效数值!");
                    tB_xfje.Focus();
                    tB_xfje.SelectAll();
                    return;
                }
            }
            common_zw_pljz common_zw_pljz_new = new common_zw_pljz();

            common_zw_pljz_new.GetPLJZData(time_startTime, time_endTime, jzType, decimal.Parse(tB_xfje.Text.Trim()), tB_gzdw.Text.Trim(), common_file.common_jzzt.czzt_gz, out lsbh_last_return);
            Szwcz Frm_Szwcz_new = new Szwcz();

            Frm_Szwcz_new.InitalApp(tB_gzdw.Text.Trim(), "", "", "", "Szw_pljz");
            Frm_Szwcz_new.lsbh_last     = lsbh_last_return;
            Frm_Szwcz_new.StartPosition = FormStartPosition.CenterScreen;
            //Frm_Szwcz_new.ShowDialog();
            //common_file.common_form.ShowFrm_Szwcz_new(tB_gzdw.Text.Trim(), "", "", "", "Szw_pljz");
            //common_file.common_form.Szwcz_new.lsbh_last = lsbh_last_return;
            if (Frm_Szwcz_new.ShowDialog() == DialogResult.OK)
            {
                this.DialogResult = DialogResult.OK;
                this.Close();
                //if (common_file.common_form.Sjjzwll_new != null && common_file.common_form.Sjjzwll_new.IsDisposed == false)
                //{
                //    common_file.common_form.Sjjzwll_new.Inital_app(common_file.common_jzzt.czzt_gz);
                //}
            }
        }
Exemplo n.º 3
0
        public void open_mx()
        {
            common_file.common_app.get_czsj();
            if (common_file.common_roles.get_user_qx("B_Sjjzwll_mx", common_file.common_app.user_type) == false)
            {
                return;
            }
            if (dg_zzll.CurrentRow != null && dg_zzll.CurrentRow.Index > -1 && dg_zzll.CurrentRow.Index < ds_GetZwData.Tables[0].Rows.Count && ds_GetZwData.Tables[0].Rows[dg_zzll.CurrentRow.Index]["id"] != null)
            {
                // int i = dg_zzll.CurrentRow.Index;
                DataRowView dgr = dg_zzll.SelectedRows[0].DataBoundItem as DataRowView;
                if (dgr != null)
                {
                    int i = ds_GetZwData.Tables[0].Rows.IndexOf(dgr.Row);
                    if (i > -1 && i < dg_count)//当前行为内容行
                    {
                        string czzt  = ds_GetZwData.Tables[0].Rows[dg_zzll.CurrentRow.Index]["czzt"].ToString();
                        string lsbh  = ds_GetZwData.Tables[0].Rows[dg_zzll.CurrentRow.Index]["lsbh"].ToString();
                        string sk_tt = ds_GetZwData.Tables[0].Rows[dg_zzll.CurrentRow.Index]["sktt"].ToString();
                        string jzbh  = ds_GetZwData.Tables[0].Rows[dg_zzll.CurrentRow.Index]["jzbh"].ToString();
                        string fjbh  = ds_GetZwData.Tables[0].Rows[dg_zzll.CurrentRow.Index]["fjbh"].ToString();
                        czzt  = ds_GetZwData.Tables[0].Rows[i]["czzt"].ToString();
                        lsbh  = ds_GetZwData.Tables[0].Rows[i]["lsbh"].ToString();
                        jzbh  = ds_GetZwData.Tables[0].Rows[i]["jzbh"].ToString();
                        fjbh  = ds_GetZwData.Tables[0].Rows[i]["fjbh"].ToString();
                        sk_tt = ds_GetZwData.Tables[0].Rows[i]["sktt"].ToString();

                        if ((sk_tt == common_file.common_sktt.sktt_tt) || (sk_tt == common_file.common_sktt.sktt_hy))
                        {
                            sk_tt = "tt";
                        }
                        else
                        {
                            sk_tt = "sk";
                        }
                        //要显示出Szwcz界面(由于这里可以查出团体成员的帐务,但是要按客散的情形来查询

                        Szwcz Frm_Szwcz_new = new Szwcz();
                        Frm_Szwcz_new.InitalApp(czzt, lsbh, jzbh, sk_tt, "Sjjzwll");
                        Frm_Szwcz_new.fjbh          = fjbh;
                        Frm_Szwcz_new.StartPosition = FormStartPosition.CenterScreen;
                        if (Frm_Szwcz_new.ShowDialog() == DialogResult.OK)
                        {
                            //this.Inital_app(jjType);
                            BindData(sel_cond);
                        }
                        //common_file.common_form.ShowFrm_Szwcz_new(jzzt, lsbh, jzbh, sk_tt, "Sjjzwll");
                        //common_file.common_form.Szwcz_new.fjbh = fjbh;
                    }
                }
            }
            Cursor.Current = Cursors.Default;
        }
Exemplo n.º 4
0
        private void b_zz_Click(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();
            if (dg_xzjl.Rows.Count > 0)
            {
                if (czzt != common_file.common_jzzt.czzt_zz)
                {
                    Szwcz Frm_Szwcz_new = new Szwcz();
                    Frm_Szwcz_new.InitalApp(czzt, lsbh, jzbh, sk_tt, "Sfjcz");
                    Frm_Szwcz_new.StartPosition = FormStartPosition.CenterScreen;
                    if (Frm_Szwcz_new.ShowDialog() == DialogResult.OK)
                    {
                        BindData_dg_xyjl();
                        BindData_dg_xzjl();
                    }
                }

                if (czzt == common_file.common_jzzt.czzt_zz)//在住转帐
                {
                    string load_type = "";
                    if (this.sk_tt == "sk")
                    {
                        id        = DbHelperSQL.GetSingle("select ID  FROM  Qskyd_mainrecord where lsbh='" + lsbh + "' and yydh='" + common_file.common_app.yydh + "'").ToString();
                        load_type = "skzz";//散客转帐
                    }
                    if (this.sk_tt == "tt")
                    {
                        id        = DbHelperSQL.GetSingle("select id from  Qttyd_mainrecord where lsbh='" + lsbh + "'  and yydh='" + common_file.common_app.yydh + "'").ToString();
                        load_type = "ttzz";//团体转帐
                    }
                    //这里传散客或团体主单的ID
                    Qyddj.Q_sk_tt_app Q_sk_tt_app_new = new Hotel_app.Qyddj.Q_sk_tt_app(id, common_file.common_yddj.yddj_dj, load_type);
                    Q_sk_tt_app_new.StartPosition = FormStartPosition.CenterScreen;
                    if (Q_sk_tt_app_new.ShowDialog() == DialogResult.OK)
                    {
                        BindData_dg_xyjl();
                        BindData_dg_xzjl();
                    }
                }
            }
            else
            {
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "没有选择要分结的帐务或者金额");
            }
            Cursor.Current = Cursors.Default;
        }