Пример #1
0
 /// <summary>
 /// Procedure is changin the Temporary Operator
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btSave_FormSubmit(object sender, EventArgs e)
 {
     try
     {
         equip = new clsEquipment();
         equip.iOrgId = OrgId;
         equip.iId = EquipId;
         equip.iUserId = _functions.GetUserOrgId(HttpContext.Current.User.Identity.Name, true);
         equip.iTempOperatorId = Convert.ToInt32(ViewState["TempOpId"]);
         equip.sNote = tbNote.Text;
         equip.EquipAssignedTempTo();
         Response.Redirect("e_view.aspx?id=" + EquipId.ToString(), false);
     }
     catch(Exception ex)
     {
         _functions.Log(ex, HttpContext.Current.User.Identity.Name, SourcePageName);
         Session["lastpage"] = "e_selectTempOperator.aspx?id=" + EquipId.ToString();
         Session["error"] = ex.Message;
         Session["error_report"] = ex.ToString();
         Response.Redirect("error.aspx", false);
     }
     finally
     {
         if(equip != null)
         {
             equip.Dispose();
         }
     }
 }