예제 #1
0
        public void m_lngfrmload()
        {
            string startDate = null;
            string endDate   = null;

            if (this.m_objViewer.checkBox1.Checked)
            {
                startDate = this.m_objViewer.DtStart.Value.ToShortDateString();
                endDate   = this.m_objViewer.dtend.Value.ToShortDateString();
            }
            long lngRes = clsDomain.m_lngGetCarData(startDate, endDate, out bt, this.m_objViewer.txt_CarID.Text.Trim() == "" ? null : this.m_objViewer.txt_CarID.Text.Trim(), null);

            if (lngRes == 1 && bt.Rows.Count > 0)
            {
                this.m_objViewer.ctlDgList.m_mthSetDataTable(bt);
                this.m_objViewer.ctlDgList.Tag = "bt";
            }
        }
예제 #2
0
        public void m_findData(string strCard)
        {
            this.m_objViewer.m_txtOldCard.Clear();
            string startDate = null;
            string endDate   = null;
            string strCardID = null;
            string strName   = null;

            if (strCard == "")
            {
                if (this.m_objViewer.checkBox1.Checked == true)
                {
                    startDate = this.m_objViewer.DtStart.Value.ToShortDateString();
                    endDate   = this.m_objViewer.dtend.Value.ToShortDateString();
                }
                if (this.m_objViewer.txt_CarID.Text != "")
                {
                    strCardID = this.m_objViewer.txt_CarID.Text;
                }
                if (this.m_objViewer.m_txtName.Text != "")
                {
                    strName = this.m_objViewer.m_txtName.Text;
                }
            }
            else
            {
                strCardID = strCard;
            }

            long lngRes = clsDomain.m_lngGetCarData(startDate, endDate, out bt, strCardID, strName);

            if (lngRes == 1)
            {
                this.m_objViewer.ctlDgList.m_mthSetDataTable(bt);
                this.m_objViewer.ctlDgList.Tag = "bt";
                if (bt.Rows.Count > 0)
                {
                    this.m_objViewer.ctlDgList.CurrentCell = new DataGridCell(0, 0);
                    m_mthSeleCardID();
                    this.m_objViewer.m_txtNewCard.Focus();
                }
            }
        }