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(); } }
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(); } }