Ejemplo n.º 1
0
        private void Fmain_Load(object sender, EventArgs e)
        {
            xtraTabbedMdiManager1.MdiParent = true ? this : null;
            common_form.Fmain_new           = this;
            Qskyd_www_open = common_file.common_app.Qskyd_www_open;
            this.Visible   = false;

            #region 写入系统启动目录,并进行验证检查
            string MThtPath = Application.StartupPath;
            try
            {
                common_file.Common_initalSystem.SaveConfig("XmlSystemInfo.xml", "System_path", "aaa");
                Yhgl.YH_login YH_login_new = new Hotel_app.Yhgl.YH_login("zc");
                if (YH_login_new.ShowDialog() == DialogResult.OK)
                {
                    this.Visible = true;
                    //common_file.common_form.Fmain_new = this;
                    M_ftll_Click(sender, e);
                    set_tsl();
                    common_file.common_roles.set_menu_is_visible(menuStrip1, common_file.common_app.user_type);
                    if (Qskyd_www_open == true)
                    {
                        this.timer_GetYdzxData.Enabled  = true;
                        this.timer_GetYdzxData.Interval = 1000 * 60 * int.Parse(Common_initalSystem.ReadNameValueSectionValue("qyinfo", "ydzxPopTime"));
                    }
                }
                else
                {
                    this.Close();
                }
            }
            catch (Exception ee)
            {
                MessageBox.Show(ee.ToString());
            }

            #endregion
        }
Ejemplo n.º 2
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;
            }
        }