protected void GetPriceDetail() { try { string _biddingNo = hdfBiddingNo.Value; Mas_ProjectITemBidding_Manage manage = new Mas_ProjectITemBidding_Manage(); INF_BIDDINGS data = new INF_BIDDINGS(); data = manage.GetInfBidding(_biddingNo); if (data.BiddingsNo != null) { lblSummaryPrice.Text = Convert.ToDouble(data.BiddingPrice).ToString("#,##0.00"); //lblEstimatedTax.Text = Convert.ToDouble(data.BiddingVat7).ToString("#,##0.00"); hdfCompanyNo.Value = data.CompanyNo.ToString(); //lblTotal.Text = Convert.ToDouble(data.BiddingTotalPrice).ToString("#,##0.00"); GetBiddingCompany(data.CompanyNo.ToString()); } } catch (Exception ex) { logger.Error(ex.Message); logger.Error(ex.StackTrace); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["UserLogin"] == null) { Session.Clear(); Session.Abandon(); ViewState.Clear(); FormsAuthentication.SignOut(); Response.Redirect("~/Account/Login.aspx"); } else { if (!IsPostBack) { GlobalFunction fDecrypt = new GlobalFunction(); string _ProjectNo = Request.QueryString["ProjectNo"]; string _BiddingNo = Request.QueryString["BiddingNo"]; if (string.IsNullOrEmpty(_ProjectNo) || string.IsNullOrEmpty(_BiddingNo)) { Session.Clear(); Session.Abandon(); ViewState.Clear(); FormsAuthentication.SignOut(); Response.Redirect("~/Account/Login.aspx"); } else { hdfProjectNo.Value = fDecrypt.Decrypt(_ProjectNo); hdfBiddingNo.Value = fDecrypt.Decrypt(_BiddingNo); } Session["BiddingDetailRPT"] = null; MAS_COMPANYUSER_DTO retUser = (MAS_COMPANYUSER_DTO)Session["UserLogin"]; if (retUser.RolesNo > 0) { if (retUser.RolesNo == 1) { btnExport.Visible = true; } else { btnExport.Visible = false; //********************* Authen User **********************************// if (!retUser.ProjectNo.ToString().Trim().Equals(hdfProjectNo.Value.Trim())) { Session.Clear(); Session.Abandon(); ViewState.Clear(); FormsAuthentication.SignOut(); Response.Redirect("~/Account/Login.aspx"); } Mas_ProjectITemBidding_Manage manage = new Mas_ProjectITemBidding_Manage(); INF_BIDDINGS bData = new INF_BIDDINGS(); bData = manage.GetInfBidding(hdfBiddingNo.Value.Trim()); if (bData.BiddingsNo == null) { Session.Clear(); Session.Abandon(); ViewState.Clear(); FormsAuthentication.SignOut(); Response.Redirect("~/Account/Login.aspx"); } else { if (bData.CompanyNo != retUser.CompanyNo && bData.ProjectNo != retUser.ProjectNo) { Session.Clear(); Session.Abandon(); ViewState.Clear(); FormsAuthentication.SignOut(); Response.Redirect("~/Account/Login.aspx"); } } //******************************************************// } } ViewState["TemplateNo"] = string.Empty; ViewState["TemplateColName"] = null; GetProjectBidding(); BindGvAttachFile(); GetPriceDetail(); linkViewQuestionaire.Attributes["href"] = "~/Form/ViewQuestionnaire.aspx?ProjectNo=" + fDecrypt.Encrypt(hdfProjectNo.Value.Trim()) + "&CompanyNo=" + fDecrypt.Encrypt(hdfCompanyNo.Value.Trim()); } } }