Ejemplo n.º 1
0
    protected void rptQuotes_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        try
        {
            if (e.CommandName.ToUpper() == "RESETQUOTE")
            {
                BLL_TRV_TravelRequest TRequest = new BLL_TRV_TravelRequest();
                int MailID = TRequest.ResetQuotation(requestID, 0, Convert.ToInt32(e.CommandArgument));
                TRequest = null;
                string UploadFilePath = ConfigurationManager.AppSettings["TRV_UPLOAD_PATH"];

                string URL = String.Format("window.open('../crew/EmailEditor.aspx?ID=+" + MailID.ToString() + @"&FILEPATH=" + UploadFilePath.Remove(UploadFilePath.Length - 1, 1).Replace(@"\", @"\\") + "');");
                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "k" + MailID.ToString(), URL, true);
                GetQuotationForEvaluation();
            }

            if (e.CommandName.ToUpper() == "PREFERENCE")
            {
                BLL_TRV_QuoteRequest Qr = new BLL_TRV_QuoteRequest();
                Qr.UpdateUserPreference(requestID, Convert.ToInt32(e.CommandArgument), Convert.ToInt32(Session["USERID"]));
                Qr = null;
                GetTravelRequestDetails();
                GetQuotationForEvaluation();
            }
        }
        catch { }
    }