コード例 #1
0
        //初始化数据
        //public void InitializeApp()
        //{
        //    select_s = "select * from View_Qskzd";
        //    dg_skdj.AutoGenerateColumns = false;
        //    string condition = "id>=0 and  yydh='" + common_file.common_app.yydh + "'" + sel_condition + " and   yddj='" + yddj + "'  order by id ";
        //    DS_Qskdj = B_Common.GetList(select_s, condition);
        //    bindingSource1.DataSource = DS_Qskdj.Tables[0];
        //    dg_count = DS_Qskdj.Tables[0].Rows.Count;
        //}
        //窗体刷新
        public void refresh_app(string sel_cond_0)
        {
            string condition    = "";
            string sel_main_sec = "";

            if (main_sec == common_file.common_app.main_sec_main)
            {
                sel_main_sec = " and main_sec='" + common_file.common_app.main_sec_main + "'";
            }
            if (yddj != common_file.common_app.get_his)
            {
                select_s = "select * from View_Qskzd";
                if (yddj == common_file.common_yddj.yddj_dj)//登记显示团体成员
                {
                    condition = "id>=0 and  yydh='" + common_file.common_app.yydh + "' " + sel_main_sec + sel_condition + " and   yddj='" + yddj + "'            order by czsj  desc ";
                }
                if (yddj == common_file.common_yddj.yddj_yd)
                {
                    condition = "id>=0 and yydh='" + common_file.common_app.yydh + "' " + sel_main_sec + sel_condition + "  and yddj='" + yddj + "'  and     (sktt!='" + common_file.common_sktt.sktt_tt + "'  and sktt!='" + common_file.common_sktt.sktt_hy + "')   and ( ( ddyy!='" + common_file.common_app.ydzx_flag + "')  or  (       ddyy='" + common_file.common_app.ydzx_flag + "'    and   shsc=0  )        )  order by czsj desc";
                }
            }
            else
            {
                select_s  = "select * from VIEW_Qskyd_bak";
                condition = "id>=0 and  yydh='" + common_file.common_app.yydh + "' " + sel_cond_0 + sel_main_sec + sel_condition + " order by id Desc";
            }
            if (condition != "")
            {
                dg_skdj.AutoGenerateColumns = false;
                DS_Qskdj = B_Common.GetList(select_s, condition);
                bindingSource1.DataSource = DS_Qskdj.Tables[0];
                dg_count = DS_Qskdj.Tables[0].Rows.Count;
            }
        }
コード例 #2
0
        public void BindData(string ls_condition)
        {
            this.dg_zzll.AutoGenerateColumns = false;
            dg_zzll.DataSource = null;
            if (jjType == common_file.common_jzzt.czzt_gz || jjType == common_file.common_jzzt.czzt_jz || jjType == common_file.common_jzzt.czzt_jzzgz || jjType == common_file.common_jzzt.czzt_gzzjz)
            {
                string selectCondition = "";

                if (jjType == common_file.common_jzzt.czzt_gz)
                {
                    selectCondition = "id>=0    " + ls_condition + sel_cond + common_file.common_app.yydh_select + "  and  ( czzt='" + common_file.common_jzzt.czzt_gz + "'  or  czzt='" + common_file.common_jzzt.czzt_jzzgz + "')  order by czsj desc ";
                }
                if (jjType == common_file.common_jzzt.czzt_jz)
                {
                    selectCondition = "id>=0    " + ls_condition + sel_cond + common_file.common_app.yydh_select + "  and  ( czzt='" + common_file.common_jzzt.czzt_jz + "' or  czzt='" + common_file.common_jzzt.czzt_gzzjz + "')  order by czsj  desc";
                }
                ds_GetZwData = B_common.GetList("select  *  from  Sjzzd", selectCondition);
            }
            if (jjType == common_file.common_jzzt.czzt_sz || jjType == common_file.common_jzzt.czzt_bfsz || jjType == common_file.common_jzzt.czzt_gzfj || jjType == common_file.common_jzzt.czzt_jzfj || jjType == common_file.common_jzzt.czzt_gzzsz || jjType == common_file.common_jzzt.czzt_jzzsz)
            {
                //记帐分结,挂帐分结,挂账转算帐,记帐转算帐,部分结帐,挂帐分结,记帐分结
                ds_GetZwData = B_common.GetList("select * from Sjzzd", "id>=0     " + ls_condition + sel_cond + common_file.common_app.yydh_select + " and  (czzt='" + common_file.common_jzzt.czzt_sz + "'  or  czzt='" + common_file.common_jzzt.czzt_gzzsz + "'  or  czzt='" + common_file.common_jzzt.czzt_jzzsz + "'  or czzt='" + common_file.common_jzzt.czzt_bfsz + "'  or  czzt='" + common_file.common_jzzt.czzt_jzfj + "'  or  czzt='" + common_file.common_jzzt.czzt_gzfj + "')   order by czsj  desc ");
            }
            if (ds_GetZwData != null && ds_GetZwData.Tables[0].Rows.Count > 0)
            {
                dg_zzll.AutoGenerateColumns = false;
                dataSource_zwll.DataSource  = ds_GetZwData.Tables[0].DefaultView;
                dg_zzll.DataSource          = dataSource_zwll;
                dg_count = ds_GetZwData.Tables[0].Rows.Count;
                changeColor();
            }
        }
コード例 #3
0
        private void Qkrxh_Load(object sender, EventArgs e)
        {
            common_file.common_app.get_czsj();

            DataSet ds_temp_0 = B_Common.GetList("select * from Qkrxh_rx", "id>=0");

            if (ds_temp_0 != null && ds_temp_0.Tables[0].Rows.Count > 0)
            {
                for (int j = 0; j < ds_temp_0.Tables[0].Rows.Count; j++)
                {
                    cB_xhrx.Items.Add(ds_temp_0.Tables[0].Rows[j]["xhrx"].ToString());
                }
            }
            if (sk_hy == "hy")
            {
                if (zjhm != "")
                {
                    ds_temp_0 = B_Common.GetList("select * from Qkrxh", "zjhm='" + zjhm + "' and hykh=''");
                    if (ds_temp_0 != null && ds_temp_0.Tables[0].Rows.Count > 0)
                    {
                        B_Common.ExecuteSql("update Qkrxh set hykh='" + hykh + "'where zjhm='" + zjhm + "' and hykh=''");
                    }
                }
            }
            refresh_app();
            ds_temp_0.Dispose();
            Cursor.Current = Cursors.Default;
        }
コード例 #4
0
        //第一种生成订单编号的方法
        public static string ddbh(string bs, string rq, string counter, int lsmcd)
        {
            int    a; int c; int id;
            string b = ""; string d = "";
            string ddbhyy    = "";
            string counteryy = "";
            string rqyy      = "";
            string qybh      = common_file.common_app.qybh;

            BLL.Common B_Common = new BLL.Common();
            DataSet    DS_temp  = B_Common.GetList("select * from Qcounter", "id>=0" + common_file.common_app.yydh_select);

            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                counteryy = DS_temp.Tables[0].Rows[0][counter].ToString();
                rqyy      = DS_temp.Tables[0].Rows[0][rq].ToString();
            }

            if (counteryy == "")
            {
                B_Common.ExecuteSql("update Qcounter set " + rq + "='" + DateTime.Today.ToString() + "'," + counter + "=0 where id>=0" + common_file.common_app.yydh_select);
            }
            else
            {
                if (Convert.ToDateTime(rqyy) == DateTime.Today)
                {
                    c = Convert.ToInt32(counteryy);
                    c = c + 1;
                    B_Common.ExecuteSql("update Qcounter set " + counter + "=" + c.ToString() + " where id>=0" + common_file.common_app.yydh_select);
                }
                else
                {
                    B_Common.ExecuteSql("update Qcounter set " + rq + "='" + DateTime.Today.ToString() + "'," + counter + "=0 where id>=0" + common_file.common_app.yydh_select);
                }

                DS_temp = B_Common.GetList("select * from Qcounter", "id>=0" + common_file.common_app.yydh_select);
                if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
                {
                    counteryy = DS_temp.Tables[0].Rows[0][counter].ToString();
                    rqyy      = DS_temp.Tables[0].Rows[0][rq].ToString();
                }
                a = counteryy.ToString().Length;
                b = lsm(a, lsmcd);
                d = DateTime.Today.Year.ToString();
                if (DateTime.Today.Month.ToString().Length == 1)
                {
                    d = d + "0";
                }
                d = d + DateTime.Today.Month.ToString();
                if (DateTime.Today.Day.ToString().Length == 1)
                {
                    d = d + "0";
                }
                d      = d + DateTime.Today.Day.ToString();
                ddbhyy = qybh + bs + d + b + counteryy.ToString();
            }

            DS_temp.Dispose();
            return(ddbhyy);
        }
コード例 #5
0
        public void update_jzzt_czzt(BLL.Common B_Common, string yydh, string qymc)
        {
            DataSet DS_temp = B_Common.GetList("select * from VIEW_S_jzzt_czzt_jzmx", "1=1");

            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < DS_temp.Tables[0].Rows.Count; i++)
                {
                    string jzbh_zd = DS_temp.Tables[0].Rows[i]["jzbh"].ToString();
                    string jzzt_zd = DS_temp.Tables[0].Rows[i]["jzzt"].ToString();
                    string czzt_zd = DS_temp.Tables[0].Rows[i]["czzt"].ToString();
                    string czsj_zd = DS_temp.Tables[0].Rows[i]["czsj"].ToString();
                    B_Common.ExecuteSql(" update Sjzmx set jzzt='" + jzzt_zd + "',czzt='" + czzt_zd + "',czsj='" + czsj_zd + "' where jzbh='" + jzbh_zd + "' and yydh='" + yydh + "'");
                }
            }
            DS_temp = B_Common.GetList("select * from VIEW_S_czzt_zwmx", "1=1");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < DS_temp.Tables[0].Rows.Count; i++)
                {
                    string jzbh_zd = DS_temp.Tables[0].Rows[i]["jzbh"].ToString();
                    string czzt_zd = DS_temp.Tables[0].Rows[i]["czzt"].ToString();
                    B_Common.ExecuteSql(" update Szwmx set czzt='" + czzt_zd + "' where jzbh='" + jzbh_zd + "' and yydh='" + yydh + "'");
                }
            }
            B_Common.ExecuteSql("delete from Sjzmx where jzbh not in(select jzbh from Sjzzd)");
            DS_temp.Clear();
            DS_temp.Dispose();
        }
コード例 #6
0
        private void Get_ydzx_Data()
        {
            dg_skyd_ydzx.AutoGenerateColumns = false;
            dg_ttyd_ydzx.AutoGenerateColumns = false;
            dg_tt_fr_mx.AutoGenerateColumns  = false;
            if (dg_skyd_ydzx.ScrollBars != ScrollBars.Both)
            {
                //dg_skyd_ydzx.ScrollBars = ScrollBars.Both;
            }
            ds_ydzx_Data_sk = B_common.GetList(" select * from  View_Qskzd ", " id>=0  and  yydh='" + common_file.common_app.yydh + "'  and  yddj='" + common_file.common_yddj.yddj_yd + "'  and  ddyy='" + Common_initalSystem.ReadXML("add", "hyrx_site") + "'  and  shsc=1");
            bindingSource_ydzx_sk.DataSource = ds_ydzx_Data_sk.Tables[0];
            dg_skyd_ydzx.DataSource          = bindingSource_ydzx_sk;

            ds_ydzx_Data_tt = B_common.GetList(" select * from View_Qttzd ", " id>=0  and yydh='" + common_file.common_app.yydh + "'  and yddj='" + common_file.common_yddj.yddj_yd + "'  and  ddyy='" + Common_initalSystem.ReadXML("add", "hyrx_site") + "'  and  shsc=1");
            bindingSource_ydzx_tt.DataSource = ds_ydzx_Data_tt.Tables[0].DefaultView;
            dg_ttyd_ydzx.DataSource          = bindingSource_ydzx_tt;

            if (dg_ttyd_ydzx.Rows.Count > 0)
            {
                int         j_000 = 0;
                DataRowView dgr   = dg_ttyd_ydzx.Rows[0].DataBoundItem as DataRowView;
                j_000 = ds_ydzx_Data_tt.Tables[0].Rows.IndexOf(dgr.Row);
                GetTTdjDetail(ds_ydzx_Data_tt.Tables[0].Rows[0]["lsbh"].ToString());
            }
            else
            {
                dg_tt_fr_mx.DataSource = null;
            }
        }
コード例 #7
0
        //抵离的分析-预计到店
        public void dr_fx_dd_lk_yjdd(BLL.Common B_Common, DataSet DS_temp, ref float yjdd_fs, ref float yjdd_rs, DateTime rq)
        {
            DS_temp = B_Common.GetList("select sum(lzfs) as lzfs from Qskyd_fjrb", "fjrb<>'' and lzfs>=0  and yddj='" + common_file.common_yddj.yddj_yd + "' and ddsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "'");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                if (DS_temp.Tables[0].Rows[0]["lzfs"].ToString() != "")
                {
                    string temp_0 = DS_temp.Tables[0].Rows[0]["lzfs"].ToString();
                    yjdd_fs = float.Parse(temp_0);
                }
            }

            DS_temp = B_Common.GetList("select fjrb,sum(lzfs) as lzfs  from Qskyd_fjrb", "fjrb<>'' and lzfs>=0  and yddj='" + common_file.common_yddj.yddj_yd + "' and ddsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "' group by fjrb");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                if (DS_temp.Tables[0].Rows[0]["lzfs"].ToString() != "")
                {
                    float yjdd_rs_0 = 0;
                    for (int i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++)
                    {
                        yjdd_rs_0 = float.Parse(DS_temp.Tables[0].Rows[i_0]["lzfs"].ToString());
                        DataSet DS_temp_0 = B_Common.GetList("select zyrs from Ffjrb", "fjrb='" + DS_temp.Tables[0].Rows[i_0]["fjrb"].ToString() + "'");
                        if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0)
                        {
                            yjdd_rs_0 = float.Parse(DS_temp.Tables[0].Rows[i_0]["lzfs"].ToString()) * float.Parse(DS_temp_0.Tables[0].Rows[0]["zyrs"].ToString());
                        }
                        yjdd_rs = yjdd_rs + yjdd_rs_0;
                        DS_temp_0.Clear();
                        DS_temp_0.Dispose();
                    }
                }
            }
        }
コード例 #8
0
 public void Refresh_app()
 {
     dg_ff_xyxf.AutoGenerateColumns = false;
     DS_ff_xyxf            = B_Common.GetList("select * from Q_ff_xyxf", "id>=0" + common_file.common_app.yydh_select + " order by id");
     bs_ff_xyxf.DataSource = DS_ff_xyxf.Tables[0];
     dg_count = DS_ff_xyxf.Tables[0].Rows.Count;
 }
コード例 #9
0
        public void initalApp(string _id_app, string _jzbh, string _lsbh, string _CzOrBz)
        {
            old_id_app = _id_app;
            this.jzbh  = _jzbh;
            CzOrBz     = _CzOrBz;
            this.lsbh  = _lsbh;
            this.Text  = CzOrBz;

            if (old_id_app.Trim() != "" && jzbh.Trim() == "")
            {
                ds_temp = B_common.GetList("select  *  from Szw_temp", " id_app='" + old_id_app + "'  and  yydh='" + common_file.common_app.yydh + "' and czy_temp='" + common_file.common_app.czy_GUID + "'");
            }
            if (old_id_app.Trim() != "" && jzbh.Trim() != "")
            {
                ds_temp = B_common.GetList("select  *  from Sjzmx ", " id_app='" + old_id_app + "'  and  jzbh='" + jzbh + "'  and yydh='" + common_file.common_app.yydh + "'");
            }
            if (ds_temp != null && ds_temp.Tables[0].Rows.Count > 0)
            {
                xfdr         = ds_temp.Tables[0].Rows[0]["xfdr"].ToString();
                xfrb         = ds_temp.Tables[0].Rows[0]["xfrb"].ToString();
                mxbh         = ds_temp.Tables[0].Rows[0]["mxbh"].ToString();
                tB_xfxm.Text = ds_temp.Tables[0].Rows[0]["xfxm"].ToString();
                tB_xfje.Text = ds_temp.Tables[0].Rows[0]["sjxfje"].ToString();
                if (old_id_app.Trim() != "" && jzbh.Trim() == "")
                {
                    DataSet ds_0 = B_common.GetList(" select * from View_Qskzd ", " id>=0  " + common_file.common_app.yydh_select + " and  lsbh='" + lsbh + "'");
                    if (ds_0 != null && ds_0.Tables[0].Rows.Count > 0)
                    {
                        ddsj    = ds_0.Tables[0].Rows[0]["ddsj"].ToString();
                        lksj    = ds_0.Tables[0].Rows[0]["lksj"].ToString();
                        fjbh_ls = ds_0.Tables[0].Rows[0]["fjbh"].ToString();
                    }
                    else
                    {
                        ds_0 = B_common.GetList(" select * from View_Qttzd ", " id>=0  " + common_file.common_app.yydh_select + " and  lsbh='" + lsbh + "'");
                        if (ds_0 != null && ds_0.Tables[0].Rows.Count > 0)
                        {
                            ddsj = ds_0.Tables[0].Rows[0]["ddsj"].ToString();
                            lksj = ds_0.Tables[0].Rows[0]["lksj"].ToString();
                        }
                    }
                }
                if (old_id_app.Trim() != "" && jzbh.Trim() != "")
                {
                    DataSet ds_0 = B_common.GetList(" select * from Sjzzd ", " id>=0  " + common_file.common_app.yydh_select + " and  jzbh='" + jzbh + "'");
                    if (ds_0 != null && ds_0.Tables[0].Rows.Count > 0)
                    {
                        ddsj    = ds_0.Tables[0].Rows[0]["ddsj"].ToString();
                        lksj    = ds_0.Tables[0].Rows[0]["tfsj"].ToString();
                        fjbh_ls = ds_0.Tables[0].Rows[0]["fjbh"].ToString();
                    }
                }
                tB_je.Text = "0.0";
                tB_sj.Text = DateTime.Now.ToString();
                tB_sl.Text = "0.0";
                tb_bz.Text = "";
            }
        }
コード例 #10
0
 public void refresh_skzd(string sql_0)
 {
     select_s = "select * from Qskyd_mainrecord_temp";
     dg_skzd.AutoGenerateColumns = false;
     condition          = "id>=0 and  yydh='" + common_file.common_app.yydh + "'" + sql_0 + cond_skzd + "  order by czsj desc";
     DS_skzd            = B_Common.GetList(select_s, condition);
     bS_skzd.DataSource = DS_skzd.Tables[0];
     dg_count_skzd      = DS_skzd.Tables[0].Rows.Count;
 }
コード例 #11
0
        public void refresh_sk(string sql_s)
        {
            select_s = "select * from View_Qskzd";
            dg_sk.AutoGenerateColumns = false;
            string condition = "id>=0 and main_sec='" + common_file.common_app.main_sec_main + "' and yydh='" + common_file.common_app.yydh + "'" + sk_condition + sql_s + "  order by fjbh";

            DS_sk            = B_Common.GetList(select_s, condition);
            bS_sk.DataSource = DS_sk.Tables[0];
            dg_count_sk      = DS_sk.Tables[0].Rows.Count;
        }
コード例 #12
0
        public void refresh_sk()
        {
            select_s = "select * from View_Qskzd";
            dG_sk.AutoGenerateColumns = false;
            string condition = "id>=0 and  yydh='" + common_file.common_app.yydh + "' and   yddj='" + common_file.common_yddj.yddj_yd + "' and ddsj<'" + DateTime.Now.ToShortDateString() + "' and sktt<>'" + common_file.common_sktt.sktt_tt + "' and sktt<>'" + common_file.common_sktt.sktt_hy + "' order by fjbh";

            DS_sk            = B_Common.GetList(select_s, condition);
            bS_sk.DataSource = DS_sk.Tables[0];
            dg_count_sk      = DS_sk.Tables[0].Rows.Count;
        }
コード例 #13
0
        public void InitalApp(string _jzbh)
        {
            jzbh = _jzbh;
            DataSet ds_temp_0 = B_common.GetList(" select  *  from  Sjzzd ", "  id>=0  and  yydh='" + common_file.common_app.yydh + "'  and  jzbh='" + this.jzbh + "'");

            if (ds_temp_0 != null && ds_temp_0.Tables[0].Rows.Count > 0)
            {
                tB_gzdw_old.Text = ds_temp_0.Tables[0].Rows[0]["jzzt"].ToString();
            }
        }
コード例 #14
0
        public void tt_cy(string yydh, string qymc, DateTime czrq, string cybl, string czy, BLL.Common B_Common)
        {
            DataSet DS_temp = B_Common.GetList("select * from Qttyd_mainrecord", "yddj='" + common_file.common_yddj.yddj_dj + "' order by ddsj");
            DataSet DS_temp_0 = B_Common.GetList("select * from Qttyd_mainrecord", "yddj='" + common_file.common_yddj.yddj_dj + "'");
            decimal yj_xfje = 0; decimal cybl_0 = decimal.Parse(cybl);
            decimal fkje = 0; decimal xfje = 0;

            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                for (int i_0 = 0; i_0 < DS_temp.Tables[0].Rows.Count; i_0++)
                {
                    fkje      = 0; xfje = 0;
                    DS_temp_0 = B_Common.GetList("select sum(sjxfje) as xfje from Szwmx ", "  lsbh='" + DS_temp.Tables[0].Rows[i_0]["lsbh"].ToString() + "'");
                    if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0)
                    {
                        if (DS_temp_0.Tables[0].Rows[0]["xfje"].ToString() != "")
                        {
                            xfje = decimal.Parse(DS_temp_0.Tables[0].Rows[0]["xfje"].ToString());
                        }
                    }

                    DS_temp_0 = B_Common.GetList("select sum(sjxfje) as xfje from Syjcz ", "  lsbh='" + DS_temp.Tables[0].Rows[i_0]["lsbh"].ToString() + "'");
                    if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0)
                    {
                        if (DS_temp_0.Tables[0].Rows[0]["xfje"].ToString() != "")
                        {
                            fkje = decimal.Parse(DS_temp_0.Tables[0].Rows[0]["xfje"].ToString());
                        }
                    }

                    yj_xfje = 0;
                    if (DateTime.Parse(DS_temp.Tables[0].Rows[i_0]["lksj"].ToString()) >= czrq.AddDays(1))
                    {
                        DS_temp_0 = B_Common.GetList("select sum(sjfjjg) as fjjg from Qskyd_fjrb ", " lsbh in (select lsbh from Qskyd_mainrecord where ddbh='" + DS_temp.Tables[0].Rows[i_0]["ddbh"].ToString() + "')");
                        if (DS_temp_0 != null && DS_temp_0.Tables[0].Rows.Count > 0)
                        {
                            if (DS_temp_0.Tables[0].Rows[0]["fjjg"].ToString() != "")
                            {
                                yj_xfje = decimal.Parse(DS_temp_0.Tables[0].Rows[0]["fjjg"].ToString()) * cybl_0;
                            }
                        }
                    }
                    yj_xfje = yj_xfje + xfje;
                    if (yj_xfje > fkje)
                    {
                        insert_cy(B_Common, yydh, qymc, czy, DS_temp.Tables[0].Rows[i_0]["krxm"].ToString(), DS_temp.Tables[0].Rows[i_0]["lsbh"].ToString(), DS_temp.Tables[0].Rows[i_0]["sktt"].ToString(), "0", "", DS_temp.Tables[0].Rows[i_0]["xydw"].ToString(), DS_temp.Tables[0].Rows[i_0]["krly"].ToString(), DS_temp.Tables[0].Rows[i_0]["sktt"].ToString(), "1", DS_temp.Tables[0].Rows[i_0]["ddsj"].ToString(), DS_temp.Tables[0].Rows[i_0]["lksj"].ToString(), "", "", "", "", fkje.ToString(), xfje.ToString(), yj_xfje.ToString(), Convert.ToString(yj_xfje - fkje));
                    }
                }
            }

            DS_temp.Clear();
            DS_temp_0.Clear();
            DS_temp.Dispose();
            DS_temp_0.Dispose();
        }
コード例 #15
0
 private void YH_login_Load(object sender, EventArgs e)
 {
     DS_temp = B_Common.GetList("select syzd from Xsyzd", "id>=0 order by id");
     if (DS_temp.Tables[0].Rows.Count > 0)
     {
         for (int i = 0; i < DS_temp.Tables[0].Rows.Count; i++)
         {
             cB_syzd.Items.Add(DS_temp.Tables[0].Rows[i]["syzd"].ToString());
         }
     }
 }
コード例 #16
0
        void BindHylsrz()//会员入住记录
        {
            string select_s = "select * from VIEW_Q_skyd_lskr";

            dg_lsrz.AutoGenerateColumns = false;
            string  condition = "id>=0 and hykh='" + hykh + "'  order by czsj desc";
            DataSet DS_lskr   = B_Common.GetList(select_s, condition);

            BS_lsrz.DataSource = DS_lskr.Tables[0];
            dg_count           = DS_lskr.Tables[0].Rows.Count;
        }
コード例 #17
0
        internal void refresh_app()
        {
            common_file.common_app.get_czsj();
            this.dg_lskr.AutoGenerateColumns = false;
            string s = "id>=0" + sql_condition + "  order by ddsj desc";

            DS_lskr            = B_Common.GetList("select * from VIEW_Q_skyd_lskr", s);
            bs_lskr.DataSource = DS_lskr.Tables[0];
            dg_count           = DS_lskr.Tables[0].Rows.Count;
            Cursor.Current     = Cursors.Default;
        }
コード例 #18
0
        public void refresh_skdj_app()
        {
            string condition = "";

            select_s  = "select * from View_Qskzd";
            condition = "id>=0 and  yydh='" + common_file.common_app.yydh + "' and main_sec='" + common_file.common_app.main_sec_main + "' and yddj='" + common_file.common_yddj.yddj_dj + "' and fjrb<>'' and fjbh<>'' and lsbh not in(select lsbh from S_ys_fy_gz where (czsj between '" + DateTime.Now.ToShortDateString() + "' and '" + DateTime.Now.ToShortDateString() + " 23:59:59" + "')) order by id Desc";
            dG_skdj.AutoGenerateColumns = false;
            DS_skdj            = B_Common.GetList(select_s, condition);
            bS_skdj.DataSource = DS_skdj.Tables[0];
            dg_count_skdj      = DS_skdj.Tables[0].Rows.Count;
        }
コード例 #19
0
        //抵离的分析-实际离店
        public void dr_fx_dd_lk_sjld(BLL.Common B_Common, DataSet DS_temp, ref float sjld_fs, ref float sjld_rs, DateTime rq)
        {
            DS_temp = B_Common.GetList("select distinct fjbh  from Qskyd_fjrb_bak", " fjrb<>'' and lzfs>=0 and lksj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "'");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                sjld_fs = DS_temp.Tables[0].Rows.Count;
            }

            DS_temp = B_Common.GetList("select id  from Qskyd_mainrecord_bak", "  lksj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "'");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                sjld_rs = DS_temp.Tables[0].Rows.Count;
            }
        }
コード例 #20
0
        //抵离的分析-本日到店
        public void dr_fx_dd_lk_brdd(BLL.Common B_Common, DataSet DS_temp, ref float brdd_fs, ref float brdd_rs, DateTime rq)
        {
            DS_temp = B_Common.GetList("select distinct fjbh  from Qskyd_fjrb", "fjrb<>'' and lzfs>=0  and fjbh<>'' and yddj='" + common_file.common_yddj.yddj_dj + "' and ddsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "'");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                brdd_fs = DS_temp.Tables[0].Rows.Count;
            }

            DS_temp = B_Common.GetList("select id  from Qskyd_mainrecord", "yddj='" + common_file.common_yddj.yddj_dj + "' and ddsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "'");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                brdd_rs = DS_temp.Tables[0].Rows.Count;
            }
        }
コード例 #21
0
        //抵离的分析-续住
        public void dr_fx_dd_lk_xz(BLL.Common B_Common, DataSet DS_temp, ref float xz_fs, ref float xz_rs, DateTime rq)
        {
            DS_temp = B_Common.GetList("select distinct lsbh  from Qskyd_xz", "yddj='" + common_file.common_yddj.yddj_dj + "' and czsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "'");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                xz_fs = DS_temp.Tables[0].Rows.Count;
            }

            DS_temp = B_Common.GetList("select id  from Qskyd_mainrecord", "lsbh in(select distinct lsbh  from Qskyd_xz where yddj='" + common_file.common_yddj.yddj_dj + "' and czsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "')");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                xz_rs = DS_temp.Tables[0].Rows.Count;
            }
        }
コード例 #22
0
        //抵离的分析-当日抵离
        public void dr_fx_dd_lk_drdl(BLL.Common B_Common, DataSet DS_temp, ref float drdl_fs, ref float drdl_rs, DateTime rq)
        {
            DS_temp = B_Common.GetList("select distinct fjbh  from Qskyd_fjrb", "fjrb<>'' and lzfs>=0  and  CONVERT(varchar(10),ddsj, 120)= CONVERT(varchar(10),lksj, 120) and (ddsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "')");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                drdl_fs = DS_temp.Tables[0].Rows.Count;
            }

            DS_temp = B_Common.GetList("select id  from Qskyd_mainrecord", " CONVERT(varchar(10),ddsj, 120)= CONVERT(varchar(10),lksj, 120) and (ddsj between '" + rq.ToShortDateString() + "' and '" + rq.ToShortDateString() + " 23:59:59" + "')");
            if (DS_temp != null && DS_temp.Tables[0].Rows.Count > 0)
            {
                drdl_rs = DS_temp.Tables[0].Rows.Count;
            }
        }
コード例 #23
0
        public void refresh_app(string sel_s_0)
        {
            sel_condition = sel_s_0;
            select_s      = "select * from VIEW_Qttyd_qx";
            dg_ttyd_qx.AutoGenerateColumns = false;
            string condition = "id>=0 and  yydh='" + common_file.common_app.yydh + "'" + sel_s_0 + sel_condition + " order by id desc";

            DS_ttyd_qx            = B_Common.GetList(select_s, condition);
            bS_ttyd_qx.DataSource = DS_ttyd_qx.Tables[0];
            dg_count_ttyd_qx      = DS_ttyd_qx.Tables[0].Rows.Count;
            if (dg_count_ttyd_qx > 0)
            {
                bind_child_data(0);
            }
        }
コード例 #24
0
        private void displayBB(string sql_0, string sql_other)
        {
            sel_str = "";
            sel_str = " id>=0   and   yydh='" + common_file.common_app.yydh + "' " + sql_0 + sql_other + "  order by   xfsj  Desc  ";
            ds      = B_common.GetList(" select *  from VIEW_S_xf_czORbz  ", sel_str);

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                p_gl.Visible = false;
                common_bb.displayprogress(progressBar1);
                string _qymc = ""; string _qymc_english = ""; string _address_chinese = ""; string _address_english = ""; string _qydh = ""; string _qycz = ""; string _qyyb = ""; string _website = "";
                common_file.common_app.GetPrintInfo(ref _qymc, ref _qymc_english, ref _address_chinese, ref _address_english, ref _qydh, ref _qycz, ref _qyyb, ref _website);
                BB_czORbz myreport = new BB_czORbz();
                myreport.SetDataSource(ds.Tables[0]);

                myreport.SetParameterValue("qymc", common_file.common_app.qymc);
                myreport.SetParameterValue("cssj", Time_begin.Trim().Replace('/', '-'));
                myreport.SetParameterValue("jssj", Time_end.Trim().Replace('/', '-'));
                myreport.SetParameterValue("address", _address_chinese);
                myreport.SetParameterValue("Tel", _qydh);
                myreport.SetParameterValue("Fax", _qycz);
                crystalReportViewer1.ReportSource = myreport;
            }
            else
            {
                crystalReportViewer1.ReportSource = null;
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "当前时间段内没有分析数据,您可以更改查询条件来获取其它的分析数据!");
                //return;
            }
        }
コード例 #25
0
        private void displayBB(string cond, string other_cond)
        {
            common_bb.displayprogress(progressBar1);
            ds = B_common.GetList(" select *  from BB_sh_wj  ", "id>=0  and   yydh='" + common_file.common_app.yydh + "'  " + cond + other_cond + "   order by bbrq  asc");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                p_gl.Visible = false;
                common_bb.displayprogress(progressBar1);
                string _qymc = ""; string _qymc_english = ""; string _address_chinese = ""; string _address_english = ""; string _qydh = ""; string _qycz = ""; string _qyyb = ""; string _website = "";
                common_file.common_app.GetPrintInfo(ref _qymc, ref _qymc_english, ref _address_chinese, ref _address_english, ref _qydh, ref _qycz, ref _qyyb, ref _website);
                BBfx_zzwj myreport = new BBfx_zzwj();
                myreport.SetDataSource(ds.Tables[0]);

                myreport.SetParameterValue("qymc", common_file.common_app.qymc);
                myreport.SetParameterValue("cssj", dt_date);
                myreport.SetParameterValue("address", _address_chinese);
                myreport.SetParameterValue("Tel", _qydh);
                myreport.SetParameterValue("Fax", _qycz);
                crystalReportViewer1.ReportSource = myreport;
            }
            else
            {
                crystalReportViewer1.ReportSource = null;
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "当前时间段内没有分析数据,您可以更改查询条件来获取其它的分析数据!");
            }
        }
コード例 #26
0
        //当日 sktt 分析//在住
        public void dr_yd_yl_zz_update(string yydh, string qymc, BLL.Common B_Common, string table_name, string select_cond, string fs, string rs)
        {
            DataSet DS_temp = B_Common.GetList("select sktt,sum(lzfs) as fs from Qskyd_fjrb", select_cond + " group by sktt");

            DataSet DS_temp_0 = B_Common.GetList("select sktt,count(id) as rs from Qskyd_fjrb", select_cond + " group by sktt");

            dr_yd_yl_zz_update_repeat(yydh, qymc, B_Common, common_file.common_sktt.sktt_sk, table_name, DS_temp, DS_temp_0, fs, rs);
            dr_yd_yl_zz_update_repeat(yydh, qymc, B_Common, common_file.common_sktt.sktt_cz, table_name, DS_temp, DS_temp_0, fs, rs);
            dr_yd_yl_zz_update_repeat(yydh, qymc, B_Common, common_file.common_sktt.sktt_zd, table_name, DS_temp, DS_temp_0, fs, rs);
            dr_yd_yl_zz_update_repeat(yydh, qymc, B_Common, common_file.common_sktt.sktt_tt, table_name, DS_temp, DS_temp_0, fs, rs);
            dr_yd_yl_zz_update_repeat(yydh, qymc, B_Common, common_file.common_sktt.sktt_hy, table_name, DS_temp, DS_temp_0, fs, rs);
            DS_temp.Clear();
            DS_temp.Dispose();
            DS_temp_0.Clear();
            DS_temp_0.Dispose();
        }
コード例 #27
0
        public void DisplayBB()
        {
            ds = B_common.GetList(" select * from BB_ysk_cy", "id>=0  and   yydh='" + common_file.common_app.yydh + "'   and   czy='" + common_file.common_app.czy + "'      order by  krxm,lzbh  asc ");
            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                p_gl.Visible = false;
                common_bb.displayprogress(progressBar1);
                common_bb.displayprogress(progressBar1);
                string _qymc = ""; string _qymc_english = ""; string _address_chinese = ""; string _address_english = ""; string _qydh = ""; string _qycz = ""; string _qyyb = ""; string _website = "";
                common_file.common_app.GetPrintInfo(ref _qymc, ref _qymc_english, ref _address_chinese, ref _address_english, ref _qydh, ref _qycz, ref _qyyb, ref _website);

                BB_ysk_cy myreport = new BB_ysk_cy();
                myreport.SetDataSource(ds.Tables[0]);
                myreport.SetParameterValue("qymc", common_file.common_app.qymc);
                myreport.SetParameterValue("address", _address_chinese);
                myreport.SetParameterValue("Tel", _qydh);
                myreport.SetParameterValue("Fax", _qycz);
                crystalReportViewer1.ReportSource = myreport;
            }
            else
            {
                crystalReportViewer1.ReportSource = null;
                common_file.common_app.Message_box_show(common_file.common_app.message_title, "没有查到分析数据,请更改查询条件!");
            }
        }
コード例 #28
0
        private void loadInfo()
        {
            if (id_app.Trim() != "")
            {
                B_common = new Hotel_app.BLL.Common();
                ds_0     = B_common.GetList(" select  *  from sjzmx_gd_temp ", "id>=0 and yydh='" + common_file.common_app.yydh + "' and  id_app='" + id_app + "'");
                if (ds_0 != null && ds_0.Tables[0].Rows.Count > 0)
                {
                    tB_xfxm.Text     = ds_0.Tables[0].Rows[0]["xfxm"].ToString();
                    tB_xfxm_new.Text = ds_0.Tables[0].Rows[0]["xfxm"].ToString();

                    tB_xfje.Text     = ds_0.Tables[0].Rows[0]["sjxfje"].ToString();
                    tB_xfje_new.Text = ds_0.Tables[0].Rows[0]["sjxfje"].ToString();

                    tB_xfzy.Text     = ds_0.Tables[0].Rows[0]["xfzy"].ToString();
                    tB_xfzy_new.Text = ds_0.Tables[0].Rows[0]["xfzy"].ToString();

                    tB_xfbz.Text     = ds_0.Tables[0].Rows[0]["xfbz"].ToString();
                    tB_xfbz_new.Text = ds_0.Tables[0].Rows[0]["xfbz"].ToString();

                    tB_xfsj.Text      = ds_0.Tables[0].Rows[0]["xfsj"].ToString();
                    dT_xfsj_Date.Text = DateTime.Parse(tB_xfsj.Text).ToShortDateString();
                    dT_xfsj_Time.Text = DateTime.Parse(tB_xfsj.Text).ToShortTimeString();
                }
                else
                {
                    common_file.common_app.Message_box_show(common_file.common_app.message_title, "加载旧消费项目出错.");
                }
            }
        }
コード例 #29
0
        private void InitializeApp(bool isLoad, string sql_0, string sql_refresh)
        {
            dg_ckmx.AutoGenerateColumns = false; dg_ckmx.ScrollBars = ScrollBars.Both;
            string sql_con = " id>=0  ";

            if (isLoad)
            {
                sql_con += "   and   xfsj>='" + DateTime.Now.AddDays(-30) + "'  ";
            }
            else
            {
                if (sql_0.Trim() != "")
                {
                    sql_con += sql_0;
                }
                if (sql_refresh.Trim() != "")
                {
                    sql_con += sql_refresh;
                }
            }
            sql_0 += "  order by id desc  ";
            ds_0   = B_common.GetList("select  * from VIEW_S_KC ", sql_con);
            bindingSource_ckmx.DataSource = ds_0.Tables[0].DefaultView;
            dg_ckmx.DataSource            = bindingSource_ckmx;
        }
コード例 #30
0
        public static decimal Get_lksl(string xrbh, string lksl, string lsbh)
        {
            BLL.Common B_Common = new BLL.Common();
            decimal    xfsl     = 0;
            decimal    xfsl_01  = 0;
            decimal    sumxfsl  = 0;
            DataSet    ds       = B_Common.GetList("select * from Xxfmx_lkmx", "mxbh='" + xrbh + "' and lsbh='" + lsbh + "'");

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                xfsl = Convert.ToDecimal(ds.Tables[0].Rows[0]["xfsl"].ToString());
                if (lksl != null && lksl != "")
                {
                    xfsl_01 = Convert.ToDecimal(lksl);
                    sumxfsl = xfsl + xfsl_01;
                    // Update_xfmx_kcsl(xrbh, xfsl_01);//更新xfmx里的kcsl
                }
            }
            else
            {
                sumxfsl = Convert.ToDecimal(lksl);
                //Update_xfmx_kcsl(xrbh, sumxfsl);//更新xfmx里的kcsl
            }
            return(sumxfsl);
        }