protected void uoLinkExport_Click(object sender, EventArgs e)
        {
            DataSet ds       = ManifestBLL.getAllDataFiles(GlobalCode.Field2DateTime(Session["DateFrom"]), GlobalCode.Field2String(Session["UserName"]));
            string  FilePath = Server.MapPath("~/Extract/Manifest/");
            string  mDate    = GlobalCode.Field2DateTime(Session["DateFrom"]).ToString(TravelMartVariable.DateTimeFormatFileExtension);
            string  sDate    = DateTime.Now.ToString(TravelMartVariable.DateTimeFormatFileExtension);
            string  FileName = "Manifest_" + mDate + "_" + sDate + ".xls";

            ds.Tables[0].TableName = "Same day Arrival Departure";
            ds.Tables[1].TableName = "No Travel request";
            int count = 2;

            while (count < ds.Tables.Count)
            {
                ds.Tables[count].TableName = ds.Tables[count].Rows[0]["HotelName"].ToString();
                count += 1;
            }
            string strFileName = FilePath + FileName;

            if (File.Exists(strFileName))
            {
                File.Delete(strFileName);
            }
            Convert(ds, strFileName);
            OpenExcelFile(FileName);
        }
Beispiel #2
0
        /// Date Created:   05/Jan/2015
        /// Created By:     Josephine Monteza
        /// (description)   tag record to TblTag_Hotel
        /// -------------------------------------------
        private void TagSeafarer(string sIdBigint, string sTRId, string sBranch, string sRecLoc, string sE1Id, string sStatusOnOff)
        {
            string sUser = uoHiddenFieldUser.Value;
            string sRole = uoHiddenFieldRole.Value;

            string      strLogDescription = "Tag Seafarer To Hotel Service Provider";
            string      strFunction       = "TagSeafarer";
            DateTime    dateNow           = CommonFunctions.GetCurrentDateTime();
            ManifestBLL MBLL = new ManifestBLL();

            MBLL.TagToHotel(GlobalCode.Field2Long(sIdBigint), GlobalCode.Field2Long(sTRId), sRecLoc,
                            GlobalCode.Field2Long(sE1Id), sStatusOnOff, 0, GlobalCode.Field2Long(sBranch),
                            uoHiddenFieldUser.Value, strLogDescription, strFunction, Path.GetFileName(Request.Path),
                            CommonFunctions.GetDateTimeGMT(dateNow), dateNow);

            if (sBranch != "0")
            {
                BindHotelManifest(1);
            }
        }
        /// <summary>
        /// Date Created:  23/Apr/2014
        /// Created By:    Muhallidin G Wali
        /// (description)  cancel hotel booking and insert into a table (TblHotelTransactionOtherCancel)
        /// ==========================================================
        /// Date Modified:  24/Apr/2014
        /// Modified By:    Josephine Gad
        /// (description)   Add ClosePage to close this page and refresh the parent page
        ///                 Change Session["UserName"].ToString() to uoHiddenFieldUser.Value
        ///                 Add parameter fot Audit Trail
        /// ==========================================================
        /// </summary>
        protected void btnSaveCancelHotel_Click(object sender, EventArgs e)
        {
            try
            {
                ManifestBLL bll = new ManifestBLL();
                string      strLogDescription = "Cancel Hotel in Primary Vendor";
                DateTime    dateNow           = CommonFunctions.GetCurrentDateTime();

                bll.CancelHotelBooking(uoHiddenFieldTravelReq.Value, uoHiddenFieldUser.Value,
                                       txtEmailTo.Text.ToString(), txtEmailCC.Text.ToString(), uoTextBoxConfirmedBy.Text.ToString(),
                                       uoTextBoxComment.Text.ToString(), DateTime.Now, true, uoHiddenFieldRole.Value,
                                       strLogDescription, "btnSaveCancelHotel_Click",
                                       Path.GetFileName(Request.UrlReferrer.AbsolutePath), CommonFunctions.GetDateTimeGMT(dateNow));

                ClosePage();
            }
            catch (Exception ex)
            {
                AlertMessage(ex.Message.ToString());
            }
        }