protected void gvBookings_RowCommand(object sender, GridViewCommandEventArgs e) { try { if (e.CommandName == "View") { ClsBAL objManabusBAL = new ClsBAL(); objManabusBAL.bookingId = Convert.ToInt32(e.CommandArgument); DataSet ObjDataset = (DataSet)objManabusBAL.GetCusEnquiryByID(); if (ObjDataset != null) { if (ObjDataset.Tables.Count > 0) { if (ObjDataset.Tables[0].Rows.Count == 1) { string travelName = ObjDataset.Tables[0].Rows[0]["TravelOPName"].ToString(); Label lbl = new Label(); lbl.Text = travelName.ToString(); string api = ObjDataset.Tables[0].Rows[0]["APIName"].ToString(); gvDetails.DataSource = ObjDataset.Tables[0]; //foreach (DataRow item in ObjDataset.Tables[0].Rows) //{ // item["Comment"] = Convert.ToDecimal(item["Comment"]).ToString("0.00", System.Globalization.CultureInfo.InvariantCulture); // item["TotalWithMarkPrice"] = // Convert.ToDecimal( // Convert.ToDecimal(item["Comment"].ToString()) // + // Convert.ToDecimal(item["TotalFare"].ToString()) // ).ToString("0.00", System.Globalization.CultureInfo.InvariantCulture) // ; //} gvDetails.DataBind(); gvView.DataSource = ObjDataset.Tables[0]; gvView.DataBind(); GetCancellationPolicy(api); if (api == "Kesineni") { // imgKesineni.Visible = true; } else { //imgKesineni.Visible = false; } divTicketDetails.Visible = true; divBookedReport.Visible = false; } } } } } catch (Exception ex) { lblMsg.InnerHtml = ex.Message; throw; } }
protected void gvBookings_RowCommand(object sender, GridViewCommandEventArgs e) { try { if (e.CommandName == "View") { ClsBAL objManabusBAL = new ClsBAL(); objManabusBAL.bookingId = Convert.ToInt32(e.CommandArgument); DataSet ObjDataset = (DataSet)objManabusBAL.GetCusEnquiryByID(); if (ObjDataset != null) { if (ObjDataset.Tables.Count > 0) { if (ObjDataset.Tables[0].Rows.Count == 1) { string travelName = ObjDataset.Tables[0].Rows[0]["TravelOPName"].ToString(); Label lbl = new Label(); lbl.Text = travelName.ToString(); string api = ObjDataset.Tables[0].Rows[0]["APIName"].ToString(); gvDetails.DataSource = ObjDataset.Tables[0]; gvDetails.DataBind(); gvView.DataSource = ObjDataset.Tables[0]; gvView.DataBind(); GetCancellationPolicy(lbl.Text.ToString()); if (api == "Kesineni") { imgKesineni.Visible = true; } else { imgKesineni.Visible = false; } divTicketDetails.Visible = true; divBookedReport.Visible = false; } } } } } catch (Exception ex) { lblMsg.InnerHtml = ex.Message; throw; } }
protected void GvCusEnquiry_RowCommand(object sender, GridViewCommandEventArgs e) { try { if (e.CommandName == "View") { objBAL = new ClsBAL(); objBAL.bookingId = Convert.ToInt32(e.CommandArgument); ObjDataset = (DataSet)objBAL.GetCusEnquiryByID(); if (ObjDataset != null) { if (ObjDataset.Tables.Count > 0) { if (ObjDataset.Tables[0].Rows.Count == 1) { string travelName = ObjDataset.Tables[0].Rows[0]["TravelOPName"].ToString(); Label lbl = new Label(); lbl.Text = travelName.ToString(); string api = ObjDataset.Tables[0].Rows[0]["APIName"].ToString(); // gvDetails.DataSource = ObjDataset.Tables[0]; //gvDetails.DataBind(); gvView.DataSource = ObjDataset.Tables[0]; gvView.DataBind(); GetCancellationPolicy(api); MVCusEnquiry.ActiveViewIndex = 1; } } } } } catch (Exception ex) { throw ex; } finally { MVCusEnquiry.ActiveViewIndex = 1; if (ObjDataset != null) { ObjDataset = null; } } }