コード例 #1
0
        protected void Submit_Click(object sender, EventArgs e)
        {
            LabMS.BLL.Recipients brecipients = new LabMS.BLL.Recipients();
            LabMS.Model.Recipients mrecipients = new LabMS.Model.Recipients();
            ExtendBLL.Recipients ebrecipients = new ExtendBLL.Recipients();
            try
            {
                mrecipients = brecipients.GetModel(long.Parse(lbCID.Text));
            }
            catch (Exception ex)
            {
                lbErr.Visible = true;
                lbErr.Text = ex.Message.ToString();
            }

            mrecipients.ReturnState = ddlRStatus.SelectedValue;
            mrecipients.ReturnTime = DateTime.Parse(tbReturnDate.Text.ToString());

            try
            {
                ebrecipients.ExtendReturn(mrecipients);
                LabMS.Common.JShelper.JSAlertAndRedirect(Page, "AddSuccess", "归还成功!", "valuablesborrowlist.aspx");
            }
            catch (Exception ex)
            {
                lbErr.Text = ex.Message.ToString();
            }
        }
コード例 #2
0
ファイル: lowreturn.aspx.cs プロジェクト: dalinhuang/labms
        protected void lbReturn_Click(object sender, EventArgs e)
        {
            LabMS.BLL.Recipients brecipients = new LabMS.BLL.Recipients();
            LabMS.Model.Recipients mrecipients = new LabMS.Model.Recipients();
            ExtendBLL.Recipients ebrecipients = new ExtendBLL.Recipients();
            try
            {
                mrecipients = brecipients.GetModel(long.Parse(lbCID.Text));
            }
            catch (Exception ex)
            {
                Common.JShelper.JSAlert(Page, "err2", ex.Message.ToString());
                return;
            }

            mrecipients.ReturnState = tbReturnState.Text;
            mrecipients.ReturnTime = DateTime.Parse(tbReturnTime.Text.ToString());

            try
            {
                ebrecipients.ExtendReturn(mrecipients);
                LabMS.Common.JShelper.JSAlertAndRedirect(Page, "AddSuccess", "归还成功!", "lowrecipientslist.aspx");
            }
            catch (Exception ex)
            {
                lbErr.Text = ex.Message.ToString();
            }
        }
コード例 #3
0
 public void bind(string strWhere)
 {
     BLL.Recipients brecipients = new LabMS.BLL.Recipients();
     List<Model.Recipients> recipient = brecipients.GetModelList(strWhere);
     gvInstrument.DataSource = recipient;
     gvInstrument.DataBind();
 }
コード例 #4
0
 LabMS.Model.Recipients checkQueryString(string strID)
 {
     LabMS.BLL.Recipients brecipients = new LabMS.BLL.Recipients();
     string strWhere = " Type = 'guizhongyiqi' and ID =" + strID;
     List<LabMS.Model.Recipients> listrecipients = brecipients.GetModelList(strWhere);
     if (listrecipients.Count <= 0)
     {
         return null;
     }
     return listrecipients[0];
 }