Ejemplo n.º 1
0
 protected void DropDownListLocation_SelectedIndexChanged(object sender, EventArgs e)
 {
     BindStore();
     ListBoxClaimMonth.Items.Clear();
     GridViewResult.DataBind();
     TextBoxClaimNumber.Text = "";
 }
Ejemplo n.º 2
0
        //private void BindStore()
        //{
        //    //DropDownListStore.DataSource = Store.GetStoreListByLocationId(Convert.ToInt32(DropDownListLocation.SelectedValue));
        //    DropDownListStore.DataSource = Store.GetStoreListByAccountId(Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
        //    DropDownListStore.DataTextField = "Description";
        //    DropDownListStore.DataValueField = "StoreId";
        //    DropDownListStore.DataBind();
        //    DropDownListStore.Items.Insert(0, new ListItem("Please select", "0"));
        //}

        protected void DropDownListLocation_SelectedIndexChanged(object sender, EventArgs e)
        {
            //BindStore();
            //ListBoxClaimMonth.Items.Clear();
            //GridViewResult.DataBind();
            //TextBoxClaimNumber.Text = "";
            //ButtonSaveList.Visible = false;

            ListBoxClaimMonth.DataSource    = StoreRep.Web.Code.Claim.GetClaimMonthByLocation(Convert.ToInt32(DropDownListLocation.SelectedValue), Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
            ListBoxClaimMonth.DataTextField = "FormattedClaimDate";
            //ListBoxClaimMonth.DataValueField = "ClaimScheduleId";
            ListBoxClaimMonth.DataBind();

            ListBoxClaimMonth.Enabled = ListBoxClaimMonth.Items.Count > 0;
            GridViewResult.DataBind();
            TextBoxClaimNumber.Text   = "";
            RadioButtonPaid.Checked   = false;
            RadioButtonUnpaid.Checked = false;
            ButtonSaveList.Visible    = false;
            ButtonFNBPreview.Visible  = false;
            //ButtonSaveResend.Visible = false;

            if (ListBoxClaimMonth.Items.Count == 0)
            {
                ListBoxClaimMonth.Items.Clear();
            }
            else
            {
                //ListBoxClaimMonth.Items.Insert(0, new ListItem("ALL", "0"));
            }
        }
Ejemplo n.º 3
0
        protected void DropDownListStore_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (Roles.IsUserInRole("RepClaim"))
            {
                BindRepStoreClaimMonth();
                return;
            }

            ListBoxClaimMonth.DataSource    = ClaimSku.GetClaimSkuMonthByStore(Convert.ToInt32(DropDownListStore.SelectedValue), Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
            ListBoxClaimMonth.DataTextField = "FormattedClaimDate";
            //ListBoxClaimMonth.DataValueField = "ClaimSkuId";
            ListBoxClaimMonth.DataBind();

            ListBoxClaimMonth.Enabled = ListBoxClaimMonth.Items.Count > 0;
            GridViewResult.DataBind();
            TextBoxClaimNumber.Text = "";

            if (ListBoxClaimMonth.Items.Count == 0)
            {
                ListBoxClaimMonth.Items.Clear();
            }
            else
            {
                ListBoxClaimMonth.Items.Insert(0, new ListItem("ALL", "0"));
            }
        }
Ejemplo n.º 4
0
        protected void ListBoxClaimMonth_SelectedIndexChanged(object sender, EventArgs e)
        {
            string claimMonth = "";

            for (int i = 0; i < ListBoxClaimMonth.Items.Count; i++)
            {
                if (ListBoxClaimMonth.Items[i].Selected == true)
                {
                    if (ListBoxClaimMonth.Items[i].Text == "ALL")
                    {
                        for (int j = 0; j < ListBoxClaimMonth.Items.Count; j++)
                        {
                            claimMonth += ListBoxClaimMonth.Items[j].Text + ",";
                        }
                    }
                    else
                    {
                        claimMonth += ListBoxClaimMonth.Items[i].Text + ",";
                    }
                }
            }

            GridViewResult.DataSource = ClaimSku.GetClaimSkuListByClaimMonthAndStoreId(claimMonth, Convert.ToInt32(DropDownListStore.SelectedValue), Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
            GridViewResult.DataBind();
        }
        protected void ButtonSave_Click(object sender, EventArgs e)
        {
            try
            {
                LabelError.Text = "";

                foreach (GridViewRow gridViewRow in GridViewResult.Rows)
                {
                    //HiddenField hiddenFieldClaimId = (HiddenField)gridViewRow.Cells[0].FindControl("HiddenFieldClaimId");
                    HiddenField hiddenFieldStoreId = (HiddenField)gridViewRow.Cells[0].FindControl("HiddenFieldStoreId");
                    Label       labelClaimNumber   = (Label)gridViewRow.Cells[4].FindControl("LabelClaimNumber");
                    CheckBox    checkBoxApproved   = (CheckBox)gridViewRow.Cells[7].FindControl("CheckBoxApproved");

                    //StoreRep.Web.Code.Claim.UpdateClaimApprovalByClaimId(Convert.ToInt32(hiddenFieldClaimId.Value), (checkBoxApproved.Checked) ? 1 : 0, this.Master.LoggedOnAccount);
                    StoreRep.Web.Code.Claim.UpdateClaimApprovalByStoredClaimNumber(Convert.ToInt32(hiddenFieldStoreId.Value), labelClaimNumber.Text, (checkBoxApproved.Checked) ? 1 : 0, this.Master.LoggedOnAccount);
                }

                LabelError.Text    = "Save Successful.";
                PanelError.Visible = true;

                GridViewResult.DataSource = null;
                GridViewResult.DataBind();
            }
            catch (System.Data.SqlClient.SqlException sqlEx)
            {
                LabelError.Text = "";
                for (int i = 0; i < sqlEx.Errors.Count; i++)
                {
                    LabelError.Text += (sqlEx.Errors[i].Message + "<br />");
                }
                PanelError.Visible = true;
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Form.DefaultFocus  = TextBoxSearchValue.ClientID;
            Page.Form.DefaultButton = ButtonSearch.UniqueID;

            if (!IsPostBack)
            {
                //BindASTreeView();
                string[] alphabet = "A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;All".Split(';');
                RepeaterAlphabet.DataSource = alphabet;
                RepeaterAlphabet.DataBind();
                string searchValue = (Request.QueryString["EmployeeId"] == null) ? "" : Request.QueryString["EmployeeId"];
                if (searchValue.Length != 0)
                {
                    GridViewResult.DataSource = EmployeeReportsTo.GetEmployeeReportsToListByFilter(searchValue, (CheckBoxUnassigned.Checked) ? 1 : 0, Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
                    GridViewResult.DataBind();
                }
                else
                {
                    GridViewResult.DataSource = EmployeeReportsTo.GetEmployeeReportsToListByFilter("%", (CheckBoxUnassigned.Checked) ? 1 : 0, Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
                    GridViewResult.DataBind();
                }
            }
            PanelError.Visible = false;
        }
        protected void ButtonSearchByClaimNumber_Click(object sender, EventArgs e)
        {
            LabelError.Text    = "";
            PanelError.Visible = false;

            GridViewResult.DataSource = null;
            GridViewResult.DataBind();

            Account account = Account.GetAccountByUserName(Page.User.Identity.Name.ToString());

            if (TextBoxSearchClaimNumber.Text.Length > 0)
            {
                GridViewResult.DataSource = StoreRep.Web.Code.Claim.GetClaimApprovalListByClaimNumber(TextBoxSearchClaimNumber.Text.Trim(), account.CompanyId, account.AccountId);
                GridViewResult.DataBind();
            }

            TextBoxSearchClaimNumber.Text = "";
            if (GridViewResult.Rows.Count == 0)
            {
                LabelError.Text    = "No rows returned.";
                PanelError.Visible = true;
            }
            else
            {
                ButtonSave.Visible = true;
            }
        }
Ejemplo n.º 8
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <param name="sender">控件对象</param>
 /// <param name="e">事件参数</param>
 private void BtnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         GridViewResult.Stop();
         this.Cursor = Cursors.WaitCursor;
         DateTime  bdate           = Convert.ToDateTime(sdtDate.Bdate.Value.ToString("yyyy-MM-dd 00:00:00"));
         DateTime  edate           = Convert.ToDateTime(sdtDate.Edate.Value.ToString("yyyy-MM-dd 23:59:59"));
         int       queryWorkId     = Convert.ToInt32(cmbWorker.SelectedValue);
         string    currentUserName = (string)InvokeController("GetCurrentUserName");
         DataTable dtReport        = (DataTable)InvokeController("GetFinacialDispenseData", frmName, bdate, edate, queryWorkId);
         Dictionary <string, object> myDictionary = new Dictionary <string, object>();
         myDictionary.Add("Title", cmbWorker.Text.Trim() + "发药人员工作量统计");
         myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
         myDictionary.Add("Printer", currentUserName);
         GridReport gridreport = new GridReport();
         gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 4019, 0, myDictionary, dtReport);
         GridViewResult.Report = gridreport.Report;
         GridViewResult.Start();
         GridViewResult.Refresh();
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <param name="sender">控件对象</param>
 /// <param name="e">事件参数</param>
 private void BtnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         GridViewResult.Stop();
         this.Cursor = Cursors.WaitCursor;
         DateTime  bdate           = dtTimer.Bdate.Value;
         DateTime  edate           = dtTimer.Edate.Value;
         int       queryWorkId     = Convert.ToInt32(cbbWork.SelectedValue);
         string    queryTimeType   = Convert.ToString(cbbTimeType.SelectedValue);
         string    qyeryDocType    = Convert.ToString(cbbDocType.SelectedValue);
         string    currentUserName = (string)InvokeController("GetCurrentUserName");
         DataTable dtReport        = (DataTable)InvokeController("QueryInpatientWorkLoad", queryWorkId, bdate.ToString("yyyy-MM-dd 00:00:00"), edate.ToString("yyyy-MM-dd 23:59:59"), qyeryDocType, queryTimeType);
         Dictionary <string, object> myDictionary = new Dictionary <string, object>();
         myDictionary.Add("Title", cbbWork.Text.Trim() + "住院医生工作量统计");
         myDictionary.Add("DateRange", dtTimer.Bdate.Value.ToString("yyyy-MM-dd") + "至" + dtTimer.Edate.Value.ToString("yyyy-MM-dd"));
         myDictionary.Add("Printer", currentUserName);
         myDictionary.Add("DocType", "医生类型:" + cbbDocType.Text);
         myDictionary.Add("TimeType", "时间类型:" + cbbTimeType.Text);
         GridReport gridreport = new GridReport();
         gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3011, 0, myDictionary, dtReport);
         GridViewResult.Report = gridreport.Report;
         GridViewResult.Start();
         GridViewResult.Refresh();
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
 protected void GridViewResult_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         switch (e.CommandName.ToLower())
         {
         case "delete":
         {
             Communication.DeleteCommunicationByCommunicationId(Convert.ToInt32(e.CommandArgument));
             GridViewResult.DataSource = Communication.GetCommunicationListByFilter("%", Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).CompanyId);
             GridViewResult.DataBind();
             break;
         }
         }
     }
     catch (System.Data.SqlClient.SqlException sqlEx)
     {
         //LabelError.Text = "";
         //for (int i = 0; i < sqlEx.Errors.Count; i++)
         //{
         //    LabelError.Text += (sqlEx.Errors[i].Message + "<br />");
         //}
         //PanelError.Visible = true;
     }
 }
        protected void ButtonSearch_Click(object sender, EventArgs e)
        {
            GridViewResult.DataSource = ClaimSkuSubCategorySupplier.GetClaimSkuSubCategorySupplierListByClaimSupplierId(Convert.ToInt32(DropDownListSupplier.SelectedValue));
            GridViewResult.DataBind();

            ButtonSaveList.Visible = GridViewResult.Rows.Count > 0;
        }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string filter = "";

        filter = string.Format(" Make like '%{0}%'  or Model like '%{0}%'  or Year like '%{0}%' ", (TextBoxFilter.Text.Trim() == "Keyword filter") ? "" : TextBoxFilter.Text.Trim());

        //Retrieve the table from the session object.
        dtb = get_data();

        if (dtb != null)
        {
            try
            {
                GridViewResult.PageIndex  = 0;
                GridViewResult.DataSource = dtb.Select(filter).CopyToDataTable();
            }
            catch
            {
                GridViewResult.DataSource = null;
            }
        }
        else
        {
            GridViewResult.DataSource = null;
        }
        GridViewResult.DataBind();
    }
        protected void DropDownListSupplier_SelectedIndexChanged(object sender, EventArgs e)
        {
            GridViewResult.DataSource = null;
            GridViewResult.DataBind();

            ButtonSaveList.Visible = false;
        }
Ejemplo n.º 14
0
        protected void ListBoxClaimMonth_SelectedIndexChanged(object sender, EventArgs e)
        {
            for (int i = 0; i < ListBoxClaimMonth.Items.Count; i++)
            {
                if (ListBoxClaimMonth.Items[i].Selected == true)
                {
                    if (ListBoxClaimMonth.Items[i].Text == "ALL")
                    {
                        for (int j = 0; j < ListBoxClaimMonth.Items.Count; j++)
                        {
                            claimMonth += ListBoxClaimMonth.Items[j].Text + ",";
                        }
                    }
                    else
                    {
                        claimMonth += ListBoxClaimMonth.Items[i].Text + ",";
                    }
                }
            }

            if (Roles.IsUserInRole("RepClaim"))
            {
                GridViewResult.DataSource = StoreRep.Web.Code.Claim.GetClaimListByClaimMonthAndStoreIdByRep(claimMonth, Convert.ToInt32(DropDownListStore.SelectedValue), Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
                GridViewResult.DataBind();
                return;
            }

            GridViewResult.DataSource = StoreRep.Web.Code.Claim.GetClaimListByClaimMonthAndStoreId(claimMonth, Convert.ToInt32(DropDownListStore.SelectedValue), Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
            GridViewResult.DataBind();
        }
Ejemplo n.º 15
0
 protected void DropDownListSupplier_SelectedIndexChanged(object sender, EventArgs e)
 {
     LabelError.Text           = "";
     GridViewResult.DataSource = null;
     GridViewResult.DataBind();
     BindFilter();
 }
        private void BindGridViewResultDefault()
        {
            string searchValue = "%";

            GridViewResult.DataSource = InsightSupplier.GetInsightSupplierListByFilter(searchValue);
            GridViewResult.DataBind();
        }
Ejemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Form.DefaultFocus  = TextBoxSearchValue.ClientID;
            Page.Form.DefaultButton = ButtonSearch.UniqueID;

            if (!IsPostBack)
            {
                PageLayout();

                BindRoleList();

                string[] alphabet = "A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;All".Split(';');
                RepeaterAlphabet.DataSource = alphabet;
                RepeaterAlphabet.DataBind();
                string searchValue = (Request.QueryString["EmployeeNumber"] == null) ? "" : Request.QueryString["EmployeeNumber"];
                if (searchValue.Length != 0)
                {
                    GridViewResult.DataSource = Employee.GetEmployeeListByFilterLimited(searchValue, DropDownListRole.SelectedItem.Text, Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
                    GridViewResult.DataBind();
                }
                else
                {
                    //GridViewResult.DataSource = Employee.GetEmployeeListByFilter("%", DropDownListRole.SelectedItem.Text, Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
                    //GridViewResult.DataBind();
                }
            }
            PanelError.Visible = false;
        }
Ejemplo n.º 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.supplierId = Common.GetEncryptedQueryStringValue("SupplierId", 0);

            Page.Form.DefaultFocus  = TextBoxSearchValue.ClientID;
            Page.Form.DefaultButton = ButtonSearch.UniqueID;

            if (!IsPostBack)
            {
                if (ViewState["SupplierId"] != null)
                {
                    this.supplierId = Convert.ToInt32(ViewState["SupplierId"].ToString());
                }

                string[] alphabet = "A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z;All".Split(';');
                RepeaterAlphabet.DataSource = alphabet;
                RepeaterAlphabet.DataBind();
                string searchValue = (Request.QueryString["Description"] == null) ? "" : Request.QueryString["Description"];
                if (searchValue.Length != 0)
                {
                    GridViewResult.DataSource = Product.GetProductListByFilter(searchValue, supplierId);
                    GridViewResult.DataBind();
                }
            }
            PanelError.Visible = false;
        }
    protected void GridViewResult_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        string filter = "";

        filter = string.Format(" Make like '%{0}%'  or Model like '%{0}%'  or Year like '%{0}%' ", (TextBoxFilter.Text.Trim() == "Keyword filter") ? "" : TextBoxFilter.Text.Trim());

        //Retrieve the table from the session object.
        dtb = get_data();

        if (dtb != null)
        {
            GridViewResult.PageIndex = e.NewPageIndex;
            DataTable dt = dtb.Select(filter).CopyToDataTable();
            if (Session["SortExpression"] != null)
            {
                string sort = Session["SortExpression"].ToString();
                //if (sort.LastIndexOf("ASC") > -1) sort = sort.Replace("ASC", "DESC");
                //else if (sort.LastIndexOf("DESC") > -1) sort = sort.Replace("DESC", "ASC");
                dt.DefaultView.Sort = sort;
            }

            GridViewResult.DataSource = dt;

            GridViewResult.DataBind();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["GeneralConnection"] != null)
        {
            cn = (GeneralConnection)Session["GeneralConnection"];
        }
        else
        {
            cn = ConnectionHelper.GetConnection();
        }



        if (!IsPostBack)
        {
            Session["SortExpression"] = null;
            lodding();
            if (Session["list_result"] != null)
            {
                GridViewResult.DataSource = (DataTable)Session["list_result"];
                GridViewResult.DataBind();

                get_detail();
            }
        }
    }
Ejemplo n.º 21
0
 /// <summary>
 /// 查询
 /// </summary>
 /// <param name="sender">控件对象</param>
 /// <param name="e">事件参数</param>
 private void BtnQuery_Click(object sender, EventArgs e)
 {
     try
     {
         GridViewResult.Stop();
         this.Cursor = Cursors.WaitCursor;
         DateTime  bdate           = Convert.ToDateTime(sdtDate.Bdate.Value.ToString("yyyy-MM-dd 00:00:00"));
         DateTime  edate           = Convert.ToDateTime(sdtDate.Edate.Value.ToString("yyyy-MM-dd 23:59:59"));
         int       queryWorkId     = Convert.ToInt32(cmbWorker.SelectedValue);
         int       queryTimeType   = cmbTimeType.SelectedIndex;//0收费时间 1缴款时间
         int       rowGroupType    = cmbRowGroupType.SelectedIndex;
         int       colGroupType    = cmbColGroupType.SelectedIndex;
         string    currentUserName = (string)InvokeController("GetCurrentUserName");
         DataTable dtReport        = (DataTable)InvokeController("GetFinacialOPRevenueData", frmName, bdate, edate, queryWorkId, queryTimeType, rowGroupType, colGroupType);
         Dictionary <string, object> myDictionary = new Dictionary <string, object>();
         myDictionary.Add("Title", cmbWorker.Text.Trim() + "门诊收入统计");
         myDictionary.Add("DateRange", sdtDate.Bdate.Value.ToString("yyyy-MM-dd") + "至" + sdtDate.Edate.Value.ToString("yyyy-MM-dd"));
         myDictionary.Add("Printer", currentUserName);
         gridreport = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 2006, 0, myDictionary, dtReport);
         gridreport.Report.Initialize += new _IGridppReportEvents_InitializeEventHandler(ReportInitialize);
         GridViewResult.Report         = gridreport.Report;
         GridViewResult.Start();
         GridViewResult.Refresh();
     }
     catch (Exception error)
     {
         MessageBox.Show(error.Message);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
        private void BindGridViewResult()
        {
            string claimMonth = "";

            for (int i = 0; i < ListBoxClaimMonth.Items.Count; i++)
            {
                if (ListBoxClaimMonth.Items[i].Selected == true)
                {
                    if (ListBoxClaimMonth.Items[i].Text == "ALL")
                    {
                        for (int j = 0; j < ListBoxClaimMonth.Items.Count; j++)
                        {
                            claimMonth += ListBoxClaimMonth.Items[j].Text + ",";
                        }
                    }
                    else
                    {
                        claimMonth += ListBoxClaimMonth.Items[i].Text;
                    }
                }
            }

            PanelErrorSpace.Visible = false;
            PanelSaveSpace.Visible  = false;

            GridViewResult.DataSource = ClaimPayment.GetClaimPaymentListByClaimMonthAndLocationIdNonDairy(claimMonth, Convert.ToInt32(DropDownListLocation.SelectedValue), Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId, (RadioButtonPaid.Checked) ? 1 : 0);
            GridViewResult.DataBind();
            ButtonSaveList.Visible   = GridViewResult.Rows.Count > 0 && !RadioButtonPaid.Checked;
            ButtonFNBPreview.Visible = GridViewResult.Rows.Count > 0 && !RadioButtonPaid.Checked;
        }
Ejemplo n.º 23
0
        private void LoggedOnUserSearch()
        {
            PanelPageHeaderControls.Visible = false;

            GridViewResult.DataSource = Employee.GetEmployeeByAccountId(Account.GetAccountByUserName(Page.User.Identity.Name.ToString()).AccountId);
            GridViewResult.DataBind();
        }
Ejemplo n.º 24
0
        /// <summary>
        /// 血糖数据绑定
        /// </summary>
        /// <param name="dtBloodGluRecord">血糖数据</param>
        public void BindBloodGluRecord(DataTable dtBloodGluRecord)
        {
            try
            {
                GridViewResult.Stop();
                this.Cursor = Cursors.WaitCursor;
                Dictionary <string, object> myDictionary = new Dictionary <string, object>();
                int       rowindex = dgvPatInfo.CurrentCell.RowIndex;
                DataTable dt       = (DataTable)dgvPatInfo.DataSource;
                myDictionary.Add("医院名称", (InvokeController("this") as AbstractController).LoginUserInfo.WorkName);
                myDictionary.Add("科室", dt.Rows[rowindex]["deptName"]);
                myDictionary.Add("姓名", dt.Rows[rowindex]["PatName"]);
                myDictionary.Add("性别", dt.Rows[rowindex]["PatSex"]);
                myDictionary.Add("年龄", GetAge(dt.Rows[rowindex]["Age"].ToString()));
                myDictionary.Add("床号", dt.Rows[rowindex]["BedNo"]);
                myDictionary.Add("住院号", dt.Rows[rowindex]["SerialNumber"]);

                gridreport            = new GridReport();
                gridreport            = ReportTool.GetReport((InvokeController("this") as AbstractController).LoginUserInfo.WorkId, 3205, 0, myDictionary, dtBloodGluRecord);
                GridViewResult.Report = gridreport.Report;
                GridViewResult.Start();
                GridViewResult.Refresh();
            }
            catch (Exception error)
            {
                MessageBox.Show(error.Message);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Ejemplo n.º 25
0
        private void GridData()
        {
            SqlCommand     sqlcmd;
            SqlDataAdapter da;
            DataTable      dt = new DataTable();
            String         query;

            if (tbSearch.Text == "")
            {
                query = "select * from result";
            }
            else
            {
                query = "select * from result where enrollment_no like '" + tbSearch.Text.ToString().Trim() + "%'";
            }
            sqlcmd = new SqlCommand(query, Db.DbConnect());
            da     = new SqlDataAdapter(sqlcmd);
            dt.Clear();
            da.Fill(dt);
            if (dt.Rows.Count > 0)
            {
                //Label1.Text = "";

                GridViewResult.DataSource = dt;
                GridViewResult.DataBind();
            }
            else
            {
                GridViewResult.DataBind();
                //Label1.Text = "No Records Found";
            }
        }
Ejemplo n.º 26
0
 protected void ListBoxRoleName_SelectedIndexChanged(object sender, EventArgs e)
 {
     BindEmployee();
     GridViewResult.DataSource = null;
     GridViewResult.DataBind();
     ListBoxEmployee.Visible = ListBoxEmployee.Items.Count > 0;
 }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        List <Book> theList      = new List <Book>();
        string      sql          = "";
        string      bookTitle    = txtSearch.Text.ToString();
        string      bookAuthor   = txtAuthor.Text.ToString();
        string      bookCategory = DropDownListCategory.Items[DropDownListCategory.SelectedIndex].ToString();

        if (chkSearch.Checked == true && chkAuthor.Checked == true && ChkCategory.Checked == true)
        {
            theList = booksController.RetrieveByTitleAuthorCategory(txtSearch.Text, txtAuthor.Text, int.Parse(DropDownListCategory.SelectedValue.ToString()));
            //sql = "Select * from Book, Category where Book.CategoryID= Category.CategoryID and Title like '%" + bookTitle + "%' and Author like '%" + bookAuthor + "%' and Name = '" + bookCategory + "' ";
        }

        else if (chkSearch.Checked == true && chkAuthor.Checked == true)
        {
            theList = booksController.RetrieveByTitleAuthor(txtSearch.Text, txtAuthor.Text);
            //sql = "Select * from Book where Title like '%" + bookTitle + "%' and Author like '%" + bookAuthor + "%' ";
        }

        else if (chkSearch.Checked == true && ChkCategory.Checked == true)
        {
            theList = booksController.RetrieveByTitleCategory(txtSearch.Text, int.Parse(DropDownListCategory.SelectedValue.ToString()));
            //sql = "Select * from Book, Category where Book.CategoryID= Category.CategoryID and Title like '%" + bookTitle + "%' and Name = '" + bookCategory + "' ";
        }

        else if (chkAuthor.Checked == true && ChkCategory.Checked == true)
        {
            theList = booksController.RetrieveByAuthorCategory(txtAuthor.Text, int.Parse(DropDownListCategory.SelectedValue.ToString()));
            //sql = "Select * from Book, Category where Book.CategoryID= Category.CategoryID and Author like '%" + bookAuthor + "%' and Name = '" + bookCategory + "' ";
        }
        else if (chkSearch.Checked == true)
        {
            theList = booksController.RetrieveByTitle(txtSearch.Text);
            //sql = "Select * from Book where Title like '%" + bookTitle + "%' ";
        }

        else if (chkAuthor.Checked == true)
        {
            theList = booksController.RetrieveByAuthor(txtAuthor.Text);
            //sql = "Select * from Book where Author like '%" + bookAuthor + "%' ";
        }

        else if (ChkCategory.Checked == true)
        {
            theList = booksController.RetrieveByCategory(int.Parse(DropDownListCategory.SelectedValue.ToString()));
            //sql = "Select * from Book, Category where Book.CategoryID= Category.CategoryID and Name= '" + bookCategory + "' ";
        }

        else
        {
            theList = booksController.RetrieveAll();
        }

        Session["TaskTable"]      = theList;
        GridViewResult.DataSource = theList;

        GridViewResult.DataBind();
    }
Ejemplo n.º 28
0
 /// <summary>
 /// 查找病人列表
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="e">e</param>
 private void btnQuery_Click(object sender, EventArgs e)
 {
     InvokeController("GetPatInfoList", sdtDate.Bdate.Value, sdtDate.Edate.Value, radOutHosp.Checked, DeptId, frmName);
     GridViewResult.Stop();
     GridViewResult.Report = null;
     GridViewResult.Stop();
     GridViewResult.Report = null;
 }
Ejemplo n.º 29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string      name    = Request.QueryString["Name"];
        List <Book> theList = booksController.RetrieveByTitle(name);

        GridViewResult.DataSource = theList;
        GridViewResult.DataBind();
    }
Ejemplo n.º 30
0
        protected void ButtonSearch_Click(object sender, EventArgs e)
        {
            LabelError.Text = "";
            string filter = DropDownListSupplier.SelectedValue == "All" ? "All" : DropDownListFilter.SelectedValue;

            GridViewResult.DataSource = Barcode.GetBarcodeListByFilter("%" + TextBoxSearchValue.Text + "%", DropDownListSupplier.SelectedValue, filter, companyId);
            GridViewResult.DataBind();
        }