示例#1
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            bal = new SourceFile_MappingHeaderBAL();

            DataView dvFilter = new DataView(dtDetail);

            dvFilter.RowFilter = string.Format("KeyWord='{0}'", ddlSourceType.SelectedValue.ToString());

            ds = bal.FindByKeyWord(string.Format("Temp_{0}", ddlSourceType.SelectedValue.ToString()), dtTranDate.Value, dvFilter[0]["DID"].ToString());


            splashScreenManager1.ShowWaitForm();


            if (ds.Tables.Count > 1 && ds.Tables[1].Rows.Count > 0)
            {
                dtDetailList = ds.Tables[0];


                LoadDetail(dtDetailList);
                txtRemark.Text = ds.Tables[1].Rows[0]["Remark"].ToString();
                splashScreenManager1.CloseWaitForm();
            }
            else
            {
                ClearDetailData();


                splashScreenManager1.CloseWaitForm();
                DevExpress.XtraEditors.XtraMessageBox.Show("Not Found Data!!", "VIEW", MessageBoxButtons.OK);
            }
        }
 private void btnView_Click(object sender, EventArgs e)
 {
     bal      = new SourceFile_MappingHeaderBAL();
     dtDetail = bal.FindByKeyWord(string.Format("Temp_{0}", cbSourceType.SelectedValue.ToString()));
     splashScreenManager1.ShowWaitForm();
     LoadDetail(dtDetail);
     splashScreenManager1.CloseWaitForm();
 }