protected void btnCopyRoomDef_Click(object sender, EventArgs e) { //Get Accommodation_RoomInfo_Id and Category Accomodation_ID = Guid.Parse(Request.QueryString["Hotel_Id"]); TLGX_Consumer.MDMSVC.DC_Accomodation_CopyRoomDef newObj = new MDMSVC.DC_Accomodation_CopyRoomDef { Accommodation_RoomInfo_Id = Guid.Parse(hdnAccommodation_RoomInfo_Id.Value), Accommodation_Id = Accomodation_ID, NewRoomCategory = txtRoomCategory.Text, Create_User = System.Web.HttpContext.Current.User.Identity.Name }; MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); _msg = AccSvc.CopyAccomodationInfo(newObj); if (_msg != null) { if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { GetRoomInfoDetails(PageSize, intPageIndex); hdnFlagCopyRoomInfo.Value = "true"; BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success); } else if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Duplicate) { BootstrapAlert.BootstrapAlertMessage(dvmsgCopyStatus, _msg.StatusMessage, BootstrapAlertType.Duplicate); } } ; }
protected void grdSupplierMarkets_RowCommand(object sender, GridViewCommandEventArgs e) { Guid myRow_Id = Guid.Parse(e.CommandArgument.ToString()); MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); if (e.CommandName.ToString() == "Select") { dvMsg.Style.Add("display", "none"); frmSupplierMarket.ChangeMode(FormViewMode.Edit); var result = _objMaster.GetSupplierMarket(new MDMSVC.DC_SupplierMarket() { Supplier_Market_Id = myRow_Id }); frmSupplierMarket.DataSource = result; frmSupplierMarket.DataBind(); } else if (e.CommandName.ToString() == "SoftDelete") { _msg = _objMaster.SupplierMarketSoftDelete(new MDMSVC.DC_SupplierMarket() { Supplier_Market_Id = myRow_Id, IsActive = false, Edit_Date = DateTime.Now, Edit_User = System.Web.HttpContext.Current.User.Identity.Name }); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierMarket.ChangeMode(FormViewMode.Insert); frmSupplierMarket.DataBind(); bindSUpplierMarketsGrid(); BootstrapAlert.BootstrapAlertMessage(dvMsg, "Supplier Market has been deleted successfully", BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } else if (e.CommandName.ToString() == "UnDelete") { _msg = _objMaster.SupplierMarketSoftDelete(new MDMSVC.DC_SupplierMarket() { Supplier_Market_Id = myRow_Id, IsActive = true, Edit_Date = DateTime.Now, Edit_User = System.Web.HttpContext.Current.User.Identity.Name }); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierMarket.ChangeMode(FormViewMode.Insert); frmSupplierMarket.DataBind(); bindSUpplierMarketsGrid(); BootstrapAlert.BootstrapAlertMessage(dvMsg, "Supplier Market has been retrived successfully", BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } }
protected void btnEditPort_Click(object sender, EventArgs e) { MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); MDMSVC.DC_PortMaster _newObj = new MDMSVC.DC_PortMaster(); _newObj.Port_Id = Guid.Parse(Port_ID); _newObj.OAG_loc = txtOAG_loc.Text; _newObj.OAG_multicity = txtOAG_multicity.Text; _newObj.Oag_lon = txtoag_lon.Text; _newObj.Oag_inactive = txtoag_inactive.Text; _newObj.MappingStatus = txtMappingStatus.Text; _newObj.Oag_ctryname = txtoag_ctryname.Text; _newObj.Oag_state = txtoag_state.Text; _newObj.Oag_substate = txtoag_substate.Text; _newObj.Oag_timediv = txtoag_timediv.Text; _newObj.Oag_lat = txtoag_lat.Text; _newObj.OAG_type = txtOAG_type.Text; _newObj.OAG_subtype = txtOAG_subtype.Text; _newObj.Oag_name = txtoag_name.Text; _newObj.Oag_portname = txtoag_portname.Text; _newObj.Oag_ctry = txtoag_ctry.Text; _newObj.Oag_subctry = txtoag_subctry.Text; _newObj.City_Id = Guid.Parse(ddlCityEdit.SelectedValue); _newObj.Country_Id = Guid.Parse(ddlCountryEdit.SelectedValue); _newObj.State_Id = Guid.Parse(ddlStateEdit.SelectedValue); _msg = _objMaster.UpdatePortMaster(_newObj); BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); }
protected void frmSupplierDetail_ItemCommand(object sender, FormViewCommandEventArgs e) { string supplierType; int? priority; DropDownList ddlStatusEdit = (DropDownList)frmSupplierDetail.FindControl("ddlStatusEdit"); DropDownList ddlSupplierType = (DropDownList)frmSupplierDetail.FindControl("ddlSupplierType"); DropDownList ddlPriorityEdit = (DropDownList)frmSupplierDetail.FindControl("ddlPriorityEdit"); TextBox txtNameSupplierEdit = (TextBox)frmSupplierDetail.FindControl("txtNameSupplierEdit"); TextBox txtCodeSupplierEdit = (TextBox)frmSupplierDetail.FindControl("txtCodeSupplierEdit"); CheckBox chkIsFullPull = (CheckBox)frmSupplierDetail.FindControl("chkIsFullPull"); MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); if (e.CommandName == "EditCommand") { if (ddlSupplierType.SelectedIndex == 0) { supplierType = string.Empty; } else { supplierType = ddlSupplierType.SelectedItem.Text; } if (ddlPriorityEdit.SelectedIndex == 0) { priority = null; } else { priority = Convert.ToInt32(ddlPriorityEdit.SelectedItem.Value); } _msg = _objMaster.AddUpdateSupplier(new MDMSVC.DC_Supplier() { Supplier_Id = Guid.Parse(Request.QueryString["Supplier_Id"]), Name = txtNameSupplierEdit.Text.Trim(), Code = txtCodeSupplierEdit.Text.Trim(), SupplierType = supplierType, StatusCode = ddlStatusEdit.SelectedItem.Text, Edit_Date = DateTime.Now, Edit_User = System.Web.HttpContext.Current.User.Identity.Name, Priority = priority, IsFullPull = chkIsFullPull.Checked }); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierDetail.ChangeMode(FormViewMode.Edit); frmSupplierDetail.DataBind(); BootstrapAlert.BootstrapAlertMessage(dvMsgUpdateSupplierDetails, _msg.StatusMessage, BootstrapAlertType.Success); FillPageData(Guid.Parse(Request.QueryString["Supplier_Id"])); } else { hdnFlag.Value = "false"; BootstrapAlert.BootstrapAlertMessage(dvMsgUpdateSupplierDetails, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } }
protected void frmSupplierdetail_ItemCommand(object sender, FormViewCommandEventArgs e) { MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); TextBox txtSupplierNameCreate = (TextBox)frmSupplierdetail.FindControl("txtSupplierNameCreate"); TextBox txtSupplierCodeCreate = (TextBox)frmSupplierdetail.FindControl("txtSupplierCodeCreate"); DropDownList ddlSupplierTypeCreate = (DropDownList)frmSupplierdetail.FindControl("ddlSupplierTypeCreate"); DropDownList ddlStatusCreate = (DropDownList)frmSupplierdetail.FindControl("ddlStatusCreate"); if (e.CommandName == "Add") { string strSupplierType = Convert.ToString(ddlSupplierTypeCreate.SelectedItem.Text.Trim()); string strStatus = Convert.ToString(ddlStatusCreate.SelectedItem.Text.Trim()); _msg = _objMaster.AddUpdateSupplier(new MDMSVC.DC_Supplier() { Name = txtSupplierNameCreate.Text.Trim(), Code = txtSupplierCodeCreate.Text.Trim(), SupplierType = strSupplierType, StatusCode = strStatus, Create_Date = DateTime.Now, Create_User = System.Web.HttpContext.Current.User.Identity.Name }); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierdetail.DataBind(); hdnFlag.Value = "true"; BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success); } else { hdnFlag.Value = "false"; BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } }
protected void frmPortdetail_ItemCommand(object sender, FormViewCommandEventArgs e) { #region Get Controls //Getting all controls here TextBox txtoag_portname = (TextBox)frmPortdetail.FindControl("txtoag_portname"); TextBox txtOAG_loc = (TextBox)frmPortdetail.FindControl("txtOAG_loc"); TextBox txtOAG_multicity = (TextBox)frmPortdetail.FindControl("txtOAG_multicity"); TextBox txtoag_inactive = (TextBox)frmPortdetail.FindControl("txtoag_inactive"); TextBox txtMappingStatus = (TextBox)frmPortdetail.FindControl("txtMappingStatus"); TextBox txtoag_ctryname = (TextBox)frmPortdetail.FindControl("txtoag_ctryname"); TextBox txtoag_state = (TextBox)frmPortdetail.FindControl("txtoag_state"); TextBox txtoag_substate = (TextBox)frmPortdetail.FindControl("txtoag_substate"); TextBox txtoag_timediv = (TextBox)frmPortdetail.FindControl("txtoag_timediv"); TextBox txtoag_lat = (TextBox)frmPortdetail.FindControl("txtoag_lat"); TextBox txtOAG_type = (TextBox)frmPortdetail.FindControl("txtOAG_type"); TextBox txtOAG_subtype = (TextBox)frmPortdetail.FindControl("txtOAG_subtype"); TextBox txtoag_name = (TextBox)frmPortdetail.FindControl("txtoag_name"); TextBox txtoag_ctry = (TextBox)frmPortdetail.FindControl("txtoag_ctry"); TextBox txtoag_subctry = (TextBox)frmPortdetail.FindControl("txtoag_subctry"); TextBox txtoag_lon = (TextBox)frmPortdetail.FindControl("txtoag_lon"); DropDownList ddlCountryEdit = (DropDownList)frmPortdetail.FindControl("ddlCountryEdit"); DropDownList ddlStateEdit = (DropDownList)frmPortdetail.FindControl("ddlStateEdit"); DropDownList ddlCityEdit = (DropDownList)frmPortdetail.FindControl("ddlCityEdit"); #endregion if (e.CommandName == "Add") { MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); MDMSVC.DC_PortMaster _newObj = new MDMSVC.DC_PortMaster(); _newObj.Port_Id = Guid.NewGuid(); _newObj.OAG_loc = Convert.ToString(txtOAG_loc.Text); _newObj.OAG_multicity = Convert.ToString(txtOAG_multicity.Text); _newObj.OAG_type = Convert.ToString(txtoag_lon.Text); _newObj.Oag_inactive = Convert.ToString(txtoag_inactive.Text); _newObj.MappingStatus = Convert.ToString(txtMappingStatus.Text); _newObj.Oag_ctryname = Convert.ToString(txtoag_ctryname.Text); _newObj.Oag_state = Convert.ToString(txtoag_state.Text); _newObj.Oag_substate = Convert.ToString(txtoag_substate.Text); _newObj.Oag_timediv = Convert.ToString(txtoag_timediv.Text); _newObj.Oag_lat = Convert.ToString(txtoag_lat.Text); _newObj.OAG_type = Convert.ToString(txtOAG_type.Text); _newObj.OAG_subtype = Convert.ToString(txtOAG_subtype.Text); _newObj.Oag_name = Convert.ToString(txtoag_name.Text); _newObj.Oag_portname = Convert.ToString(txtoag_portname.Text); _newObj.Oag_ctry = Convert.ToString(txtoag_ctry.Text); _newObj.Oag_subctry = Convert.ToString(txtoag_subctry.Text); _newObj.City_Id = Guid.Parse(ddlCityEdit.SelectedValue); _newObj.Country_Id = Guid.Parse(ddlCountryEdit.SelectedValue); _newObj.State_Id = Guid.Parse(ddlStateEdit.SelectedValue); _msg = _serviceMaster.AddPortMaster(_newObj); hdnFlag.Value = "true"; BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } }
protected void btnAdd_Click(object sender, EventArgs e) { Activity_Flavour_Id = new Guid(Request.QueryString["Activity_Flavour_Id"]); MDMSVC.DC_Activity_Inclusions newObj = new MDMSVC.DC_Activity_Inclusions(); if (btnAdd.Text == "Update") { newObj.Activity_Inclusions_Id = Guid.Parse(hdnId.Value); } newObj.Activity_Flavour_Id = Activity_Flavour_Id; if (chkIsInclusion.Checked) { newObj.IsInclusion = true; } else { newObj.IsInclusion = false; } newObj.InclusionFor = ddlInclusionFor.SelectedItem.Text; newObj.InclusionType = ddlInclusionType.SelectedItem.Text; newObj.InclusionName = txtName.Text; newObj.InclusionDescription = txtDescription.Text; if (!string.IsNullOrWhiteSpace(txtFrom.Text)) { newObj.InclusionFrom = DateTime.ParseExact(txtFrom.Text.Trim(), "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); } if (!string.IsNullOrWhiteSpace(txtTo.Text)) { newObj.InclusionTo = DateTime.ParseExact(txtTo.Text.Trim(), "dd/MM/yyyy", System.Globalization.CultureInfo.InvariantCulture); } newObj.Create_User = System.Web.HttpContext.Current.User.Identity.Name; newObj.Edit_User = System.Web.HttpContext.Current.User.Identity.Name; newObj.IsActive = true; MDMSVC.DC_Message _msg = ActSVC.AddUpdateActivityInclusions(newObj); if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { divMsgAlertIncExc.Visible = true; BootstrapAlert.BootstrapAlertMessage(divMsgAlertIncExc, _msg.StatusMessage, BootstrapAlertType.Success); } else { divMsgAlertIncExc.Visible = true; BootstrapAlert.BootstrapAlertMessage(divMsgAlertIncExc, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } ResetControls(); BindInclusionsExclusions(); }
public MDMSVC.DC_Message InsertFileRecord(string Entity, ReRunMode Mode) { Guid SupplierImportFile_Id = Guid.NewGuid(); MappingSVCs _objMappingSVCs = new MappingSVCs(); MDMSVC.DC_SupplierImportFileDetails _objFileDetails = new MDMSVC.DC_SupplierImportFileDetails(); _objFileDetails.SupplierImportFile_Id = SupplierImportFile_Id; _objFileDetails.Supplier_Id = Guid.Parse(ddlSupplierName.SelectedValue); _objFileDetails.Entity = Entity; _objFileDetails.OriginalFilePath = ""; _objFileDetails.SavedFilePath = ""; if (Mode == ReRunMode.RERUN) { _objFileDetails.STATUS = "UPLOADED"; } else if (Mode == ReRunMode.SCHEDULE) { _objFileDetails.STATUS = "SCHEDULED"; } _objFileDetails.Mode = "RE_RUN"; _objFileDetails.CREATE_DATE = DateTime.Now; _objFileDetails.CREATE_USER = System.Web.HttpContext.Current.User.Identity.Name; MDMSVC.DC_Message _objMsg = _objMappingSVCs.SaveSupplierStaticFileDetails(_objFileDetails); if (Mode == ReRunMode.RERUN) { //file Process logic MDMSVC.DC_SupplierImportFileDetails obj = new MDMSVC.DC_SupplierImportFileDetails(); MDMSVC.DC_SupplierImportFileDetails_RQ RQ = new MDMSVC.DC_SupplierImportFileDetails_RQ(); RQ.SupplierImportFile_Id = SupplierImportFile_Id; RQ.PageNo = 0; RQ.PageSize = int.MaxValue; var res = _objMappingSVCs.GetSupplierStaticFileDetails(RQ); obj.SupplierImportFile_Id = res[0].SupplierImportFile_Id; obj.Supplier_Id = res[0].Supplier_Id; obj.Supplier = res[0].Supplier; obj.SavedFilePath = res[0].SavedFilePath; obj.PROCESS_USER = System.Web.HttpContext.Current.User.Identity.Name; obj.Entity = res[0].Entity; obj.STATUS = res[0].STATUS; obj.Mode = res[0].Mode; var result = _objMappingSVCs.StaticFileUploadProcessFile(obj); //end //view File details hdnFileId.Value = SupplierImportFile_Id.ToString(); ClientScript.RegisterStartupScript(this.GetType(), "showDetailsModal", "showDetailsModal('" + SupplierImportFile_Id + "');", true); } // Response.Redirect("~/staticdata/files/upload.aspx"); return(_objMsg); }
protected void btnAddSelected_Click(object sender, EventArgs e) { Guid myRow_Id; Guid myAcco_Id; MDMSVC.DC_Message _newmsg = new MDMSVC.DC_Message(); List <MDMSVC.DC_Accommodation_SupplierRoomTypeMap_Update> _lstUpdate = new List <MDMSVC.DC_Accommodation_SupplierRoomTypeMap_Update>(); int localPageIndex = grdRoomTypeMappingSearchResultsBySupplier.PageIndex; foreach (GridViewRow row in grdRoomTypeMappingSearchResultsBySupplier.Rows) { HtmlInputCheckBox chkSelect = (HtmlInputCheckBox)row.FindControl("chkSelect"); if (chkSelect != null && chkSelect.Checked) { int rowindex = row.RowIndex; myRow_Id = Guid.Parse(grdRoomTypeMappingSearchResultsBySupplier.DataKeys[rowindex].Values[0].ToString()); myAcco_Id = Guid.Parse(grdRoomTypeMappingSearchResultsBySupplier.DataKeys[rowindex].Values[1].ToString()); Label lblMappingStatus = (Label)row.FindControl("lblStatus"); //Check dropdown HtmlTextArea txtSuggestedRoomInfoInGridBySupplier = (HtmlTextArea)row.FindControl("txtSuggestedRoomInfoInGridBySupplier"); if (txtSuggestedRoomInfoInGridBySupplier != null && !(string.IsNullOrWhiteSpace(txtSuggestedRoomInfoInGridBySupplier.Value))) { _lstUpdate.Add(new MDMSVC.DC_Accommodation_SupplierRoomTypeMap_Update() { Accommodation_Id = myAcco_Id, RoomCategory = txtSuggestedRoomInfoInGridBySupplier.Value.Trim(), Accommodation_SupplierRoomTypeMapping_Id = myRow_Id, Status = lblMappingStatus.Text, Edit_User = System.Web.HttpContext.Current.User.Identity.Name }); } } } if (_lstUpdate.Count > 0) { _newmsg = _mapping.AccomodationSupplierRoomTypeMapping_UpdateMap(_lstUpdate); if (_newmsg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { bool blnDataExist = false; SearchRoomTypeMappingData(ref blnDataExist, localPageIndex); BootstrapAlert.BootstrapAlertMessage(divMsgForMapping, _newmsg.StatusMessage, BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(divMsgForMapping, _newmsg.StatusMessage, (BootstrapAlertType)_newmsg.StatusCode); } } }
protected void btnUpdateSupplier_Click(object sender, EventArgs e) { //GAURAV_TMAP_746 MDMSVC.DC_Message dC_Message = MapSvc.FileProcessingCheckInSupplierImportFileDetails(ddlSupplierName.SelectedValue); if (dC_Message.StatusMessage == "RUNNING") { btnCityReRun.Enabled = false; btnHotelReRun.Enabled = false; btnHotelRun.Enabled = false; btnRoomTypeReRun.Enabled = false; btnRoomRun.Enabled = false; btnCountryReRun.Enabled = false; btnActivityReRun.Enabled = false; btnCityReRun.CssClass = "btn btn-primary btn-sm disabled"; btnHotelReRun.CssClass = "btn btn-primary btn-sm disabled"; btnHotelRun.CssClass = "btn btn-primary btn-sm disabled"; btnRoomTypeReRun.CssClass = "btn btn-primary btn-sm disabled"; btnRoomRun.CssClass = "btn btn-primary btn-sm disabled"; btnCountryReRun.CssClass = "btn btn-primary btn-sm disabled"; btnActivityReRun.CssClass = "btn btn-primary btn-sm disabled"; } else { btnCityReRun.Enabled = true; btnHotelReRun.Enabled = true; btnHotelRun.Enabled = true; btnRoomTypeReRun.Enabled = true; btnRoomRun.Enabled = true; btnCountryReRun.Enabled = true; btnActivityReRun.Enabled = true; btnCityReRun.CssClass = "btn btn-primary btn-sm"; btnHotelReRun.CssClass = "btn btn-primary btn-sm"; btnHotelRun.CssClass = "btn btn-primary btn-sm"; btnRoomTypeReRun.CssClass = "btn btn-primary btn-sm"; btnCountryReRun.CssClass = "btn btn-primary btn-sm"; btnActivityReRun.CssClass = "btn btn-primary btn-sm"; btnRoomRun.CssClass = "btn btn-primary btn-sm"; } dvMsgCountry.Style.Add("display", "none"); dvMsgHotel.Style.Add("display", "none"); dvMsgCity.Style.Add("display", "none"); dvMsgRoomType.Style.Add("display", "none"); dvMsgActivity.Style.Add("display", "none"); }
protected void frmCityMaster_ItemCommand(object sender, FormViewCommandEventArgs e) { TextBox txtCityCode = (TextBox)frmCityMaster.FindControl("txtCityCode"); TextBox txtStateCode = (TextBox)frmCityMaster.FindControl("txtStateCode"); TextBox txtCityName = (TextBox)frmCityMaster.FindControl("txtCityName"); TextBox txtKey = (TextBox)frmCityMaster.FindControl("txtKey"); TextBox txtRank = (TextBox)frmCityMaster.FindControl("txtRank"); TextBox txtPriority = (TextBox)frmCityMaster.FindControl("txtPriority"); DropDownList ddlState = (DropDownList)frmCityMaster.FindControl("ddlState"); dvMsgCity.Visible = true; if (Convert.ToString(e.CommandName) == "UpdateCityManager") { MDMSVC.DC_City _obj = new MDMSVC.DC_City(); _obj.City_Id = Guid.Parse(Request.QueryString["City_Id"]); _obj.Country_Id = refCountryId; _obj.Name = txtCityName.Text; _obj.Code = txtCityCode.Text; _obj.Key = txtKey.Text; _obj.Rank = txtRank.Text; _obj.Priority = txtPriority.Text; _obj.State_Id = Guid.Parse(ddlState.SelectedValue); _obj.StateName = ddlState.SelectedItem.Text; _obj.StateCode = txtStateCode.Text; _obj.Edit_Date = DateTime.Now; _obj.Edit_User = System.Web.HttpContext.Current.User.Identity.Name; MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); _msg = _objMasterData.UpdateCityMasterData(_obj); if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { BootstrapAlert.BootstrapAlertMessage(dvMsgCity, "City has been updated successfully", BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvMsgCity, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } }
protected void grdSupplierScheduleTask_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName.ToString() == "Download") { GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int index = row.RowIndex; MDMSVC.DC_SupplierScheduledTaskRQ RQ = new MDMSVC.DC_SupplierScheduledTaskRQ(); Guid myRow_Id = Guid.Parse(e.CommandArgument.ToString()); supplierStaticDownloadData.mySupplier_Id = (Guid)this.grdSupplierScheduleTask.DataKeys[index]["Suppllier_ID"]; supplierStaticDownloadData.LoadDownloadData(5, 0); ScriptManager.RegisterStartupScript((Control)grdSupplierScheduleTask, ((Control)grdSupplierScheduleTask).GetType(), "Pop" + index.ToString(), "showInstruction();", true); } if (e.CommandName.ToString() == "TaskComplete") { GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int index = row.RowIndex; MDMSVC.DC_SupplierScheduledTaskRQ RQ = new MDMSVC.DC_SupplierScheduledTaskRQ(); Guid myRow_Id = Guid.Parse(e.CommandArgument.ToString()); RQ.Supplier_Id = (Guid)this.grdSupplierScheduleTask.DataKeys[index]["Suppllier_ID"]; RQ.Entity = grdSupplierScheduleTask.Rows[index].Cells[1].Text; RQ.TaskId = myRow_Id; RQ.Edit_User = System.Web.HttpContext.Current.User.Identity.Name; RQ.Edit_Date = System.DateTime.Now; MDMSVC.DC_Message _objMsg = _objScheduleDataSVCs.UpdateTaskLog(RQ); if (_objMsg != null) { BootstrapAlert.BootstrapAlertMessage(msgAlert, "" + _objMsg.StatusMessage, (BootstrapAlertType)_objMsg.StatusCode); } LoadDownloadData(Convert.ToInt32(ddlShowEntries.SelectedItem.Text), 0); } }
protected void btnTTFUSelectedBySupplier_Click(object sender, EventArgs e) { Guid Acco_RoomTypeMap_Id; MDMSVC.DC_Message _newmsg = new MDMSVC.DC_Message(); List <MDMSVC.DC_SupplierRoomType_TTFU_RQ> _lstUpdate = new List <MDMSVC.DC_SupplierRoomType_TTFU_RQ>(); int localPageIndex = grdRoomTypeMappingSearchResultsBySupplier.PageIndex; foreach (GridViewRow row in grdRoomTypeMappingSearchResultsBySupplier.Rows) { HtmlInputCheckBox chkSelect = (HtmlInputCheckBox)row.FindControl("chkSelect"); if (chkSelect != null && chkSelect.Checked) { int rowindex = row.RowIndex; Acco_RoomTypeMap_Id = Guid.Parse(grdRoomTypeMappingSearchResultsBySupplier.DataKeys[rowindex].Values[0].ToString()); _lstUpdate.Add(new MDMSVC.DC_SupplierRoomType_TTFU_RQ() { Acco_RoomTypeMap_Id = Acco_RoomTypeMap_Id, Edit_User = System.Web.HttpContext.Current.User.Identity.Name }); } } if (_lstUpdate.Count > 0) { _newmsg = _mapping.AccomodationSupplierRoomTypeMapping_TTFUALL(_lstUpdate); if (_newmsg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { bool blnDataExist = false; SearchRoomTypeMappingData(ref blnDataExist, localPageIndex); BootstrapAlert.BootstrapAlertMessage(divMsgForMapping, _newmsg.StatusMessage, BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(divMsgForMapping, _newmsg.StatusMessage, (BootstrapAlertType)_newmsg.StatusCode); } } }
protected void btnAdd_Click(object sender, EventArgs e) { MDMSVC.DC_SupplierImportAttributes newObj = new MDMSVC.DC_SupplierImportAttributes { SupplierImportAttribute_Id = Guid.NewGuid(), Supplier_Id = ddlAddFor.SelectedItem.Text.Trim().ToUpper() == "MATCHING" ? Guid.Empty : Guid.Parse(ddlAddSupplier.SelectedItem.Value), Entity = ddlAddEntity.SelectedItem.Text, Status = "ACTIVE", CREATE_DATE = DateTime.Now, CREATE_USER = System.Web.HttpContext.Current.User.Identity.Name, For = ddlAddFor.SelectedItem.Text }; MDMSVC.DC_Message dc = new MDMSVC.DC_Message(); dc = mappingsvc.AddStaticDataMappingAttribute(newObj); if (!(dc.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success)) { dvModalMsg.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvModalMsg, dc.StatusMessage, BootstrapAlertType.Duplicate); resetModalControls(); hdnFlag.Value = "false"; } else { //Added code to fill filter and show added data. ddlSupplierName.SelectedIndex = ddlAddSupplier.Items.IndexOf(ddlSupplierName.Items.FindByValue(Convert.ToString(newObj.Supplier_Id))); ddlFor.SelectedIndex = ddlAddFor.Items.IndexOf(ddlAddFor.Items.FindByText(Convert.ToString(newObj.For))); ddlEntity.SelectedIndex = ddlAddEntity.Items.IndexOf(ddlAddEntity.Items.FindByText(Convert.ToString(newObj.Entity))); fillconfigdata(0, Convert.ToInt32(ddlShowEntries.SelectedItem.Text)); dvModalMsg.Visible = false; dvMsg.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvMsg, dc.StatusMessage, BootstrapAlertType.Success); resetModalControls(); hdnFlag.Value = "true"; } }
protected void frmApplicationdetail_ItemCommand(object sender, FormViewCommandEventArgs e) { // get the textbox value and use it to create a new record in Project TextBox txtApplicationName = (TextBox)frmApplicationdetail.FindControl("txtApplicationName"); TextBox txtDescription = (TextBox)frmApplicationdetail.FindControl("txtDescription"); MDMSVC.DC_ApplicationMgmt _obj = new MDMSVC.DC_ApplicationMgmt(); if (e.CommandName == "Edit") { Guid myRow_Id = Guid.Parse(grdListOfApplication.SelectedDataKey.Value.ToString()); _obj.ApplicationId = myRow_Id; _obj.ApplicationName = txtApplicationName.Text; _obj.Description = txtDescription.Text; } else if (e.CommandName == "Add") { _obj.ApplicationId = Guid.NewGuid(); _obj.ApplicationName = txtApplicationName.Text; _obj.Description = txtDescription.Text; } _msg = _objAdminSVCs.AddUpdateApplication(_obj); if ((BootstrapAlertType)Convert.ToInt32(_msg.StatusCode) == BootstrapAlertType.Warning) { hdnFlag.Value = "false"; BootstrapAlert.BootstrapAlertMessage(msgAlert, _msg.StatusMessage, (BootstrapAlertType)Convert.ToInt32(_msg.StatusCode)); } else { frmApplicationdetail.ChangeMode(FormViewMode.Insert); frmApplicationdetail.DataBind(); msgAlert.Attributes.Add("display", "none"); hdnFlag.Value = "true"; BindApplicationDetails(intPageIndex); BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)Convert.ToInt32(_msg.StatusCode)); } }
protected void frmvwCity_ItemCommand(object sender, FormViewCommandEventArgs e) { TextBox txtCityName = (TextBox)frmvwCity.FindControl("txtCityName"); TextBox txtCityCode = (TextBox)frmvwCity.FindControl("txtCityCode"); DropDownList ddlStates = (DropDownList)frmvwCity.FindControl("ddlStates"); DropDownList ddlStatus = (DropDownList)frmvwCity.FindControl("ddlStatus"); Guid ddlCountry_Id_Value = Guid.Parse(ddlCountry.SelectedValue); if (Convert.ToString(e.CommandName) == "AddCity") { var stateid = Guid.Parse(Convert.ToString(ddlStates.SelectedValue).Trim()); var status = Convert.ToString(ddlStatus.SelectedValue); MDMSVC.DC_City _objCityMaster = new MDMSVC.DC_City(); _objCityMaster.City_Id = Guid.NewGuid(); _objCityMaster.Name = Convert.ToString(txtCityName.Text).Trim(); _objCityMaster.Code = Convert.ToString(txtCityCode.Text).Trim(); _objCityMaster.State_Id = stateid; //Get Country Details var resultCountry = _objMasterData.GetCountryMasterData(new MDMSVC.DC_Country_Search_RQ() { Country_Id = ddlCountry_Id_Value }); if (resultCountry != null) { _objCityMaster.Country_Id = ddlCountry_Id_Value; _objCityMaster.CountryCode = resultCountry[0].Code; _objCityMaster.CountryName = Convert.ToString(resultCountry[0].Name).Trim(); _objCityMaster.Google_PlaceId = Convert.ToString(resultCountry[0].GooglePlaceID); } //Get State detils var resultState = _objMasterData.GetStatesMaster(new MDMSVC.DC_State_Search_RQ() { State_Id = stateid }); if (resultState != null) { _objCityMaster.State_Id = stateid; _objCityMaster.StateName = Convert.ToString(resultState[0].State_Name).Trim(); _objCityMaster.StateCode = Convert.ToString(resultState[0].State_Code).Trim(); } _objCityMaster.Create_User = System.Web.HttpContext.Current.User.Identity.Name; _objCityMaster.Create_Date = DateTime.Now; _objCityMaster.Status = status; MDMSVC.DC_Message _msg = _objMasterData.AddCityMasterData(_objCityMaster); if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { fillgvCityyList(ddlCountry_Id_Value, 0); hdnFlagCity.Value = "true"; dvMsgCity2.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvMsgCity2, _msg.StatusMessage, BootstrapAlertType.Success); } else { dvMsgCity2.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvmsgCityAlert, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } txtCityName.Text = String.Empty; txtCityCode.Text = String.Empty; ddlStates.SelectedIndex = 0; ddlStatus.SelectedIndex = 0; }
public void SupplierSchedulesave() { try { string frequencyvalue = Request.Form["ddl_period"]; string expression = cron_expression.Value; List <MDMSVC.DC_Supplier_Schedule> _objresult = new List <MDMSVC.DC_Supplier_Schedule>(); _objresult = GetListOfScheduleBySupplier(); Guid SupplierScheduleID = Guid.Empty; Guid mySupplier_Id = Guid.Parse(Request.QueryString["Supplier_Id"]); MDMSVC.DC_Supplier_Schedule _objSupSch = new MDMSVC.DC_Supplier_Schedule(); if (_objresult != null && _objresult.Count > 0) { if (Session["SupplierScheduleId"] != null) { SupplierScheduleID = (Guid)(Session["SupplierScheduleId"]); } //mySupplier_Id = _objresult[0].Suppllier_ID; _objSupSch.SupplierScheduleID = SupplierScheduleID; _objSupSch.Create_User = _objSupSch.Create_User; _objSupSch.Create_Date = _objSupSch.Create_Date; _objSupSch.Edit_Date = DateTime.Now; _objSupSch.Edit_User = System.Web.HttpContext.Current.User.Identity.Name; } if (SupplierScheduleID == Guid.Empty) { _objSupSch.Create_Date = DateTime.Now; _objSupSch.Create_User = System.Web.HttpContext.Current.User.Identity.Name; } _objSupSch.Suppllier_ID = mySupplier_Id; _objSupSch.ISXMLSupplier = Convert.ToBoolean(Convert.ToInt16(rdbtnIsAPIXMLSupplier.SelectedValue)); _objSupSch.ISUpdateFrequence = Convert.ToBoolean(Convert.ToInt16(rdbIsUpdateFrequencyRequired.SelectedValue)); StringBuilder sbFrequencyTypeCode = new StringBuilder(); sbFrequencyTypeCode.Append(frequencyvalue); //if (Convert.ToBoolean(Convert.ToInt16(rdbtnIsAPIXMLSupplier.SelectedValue))) //{ #region Yearly if (frequencyvalue == "Y") { //_objSupSch.Recur_No = Convert.ToInt32(txtRecurEvery_Year.Text); string Yearly_type = Request.Form["yearlyType"]; if (Yearly_type == "byDay") { sbFrequencyTypeCode.Append("M"); _objSupSch.MonthOfYear = Convert.ToInt32(Request.Form["ddl_yearly_Month"]); _objSupSch.DateOfMonth = Convert.ToInt32(Request.Form["ddl_yearly_day"]); } else if (Yearly_type == "byWeek") { sbFrequencyTypeCode.Append("W"); _objSupSch.WeekOfMonth = Convert.ToInt32(Request.Form["ddl_yearly_nthday"]); string strDays = Convert.ToString("0000000").Remove(Convert.ToInt32(Request.Form["ddl_yearly_day_od_week"]) - 1, 1).Insert(Convert.ToInt32(Request.Form["ddl_yearly_day_od_week"]) - 1, "1"); // string strDays = "00000000"; _objSupSch.DayOfWeek = strDays; _objSupSch.MonthOfYear = Convert.ToInt32(Request.Form["ddl_yearly_month_by_week"]); } } #endregion #region Monthly if (frequencyvalue == "M") { string Monthly_type = Request.Form["monthlyType"]; if (Monthly_type == "byDay") { sbFrequencyTypeCode.Append("D"); _objSupSch.DateOfMonth = Convert.ToInt32(Request.Form["ddl_monthly_day"]); _objSupSch.Recur_No = Convert.ToInt32(Request.Form["ddl_monthly_monthly"]); } else if (Monthly_type == "byWeek") { sbFrequencyTypeCode.Append("W"); _objSupSch.WeekOfMonth = Convert.ToInt32(Request.Form["ddl_monthly_nthday"]); string strDays = Convert.ToString("0000000").Remove(Convert.ToInt32(Request.Form["ddl_monthly_day_of_week"]) - 1, 1).Insert(Convert.ToInt32(Request.Form["ddl_monthly_day_of_week"]) - 1, "1"); _objSupSch.DayOfWeek = strDays; //_objSupSch.DayOfWeek = ("1" + strDays.Substring(0, (Convert.ToInt32(ddlTheDaysOf_Month.SelectedValue) - 1))).PadLeft(7, '0'); _objSupSch.Recur_No = Convert.ToInt32(Request.Form["ddl_monthly_month_by_week"]); } } #endregion #region Weekly if (frequencyvalue == "W") { //_objSupSch.Recur_No = Convert.ToInt32(txtRecur_Weekly.Text); string test = Request.Form["dayOfWeek"]; int[] nums = test.Split(',').Select(int.Parse).ToArray(); //1001011 2571 1100101 StringBuilder sbDay = new StringBuilder("0000000"); foreach (int i in nums) { if (i != 1) { sbDay[Convert.ToInt32(i) - 2] = '1'; // selected.Add(item); } else { sbDay[Convert.ToInt32(6)] = '1'; } } _objSupSch.DayOfWeek = sbDay.ToString(); } #endregion #region Daily if (frequencyvalue == "D") { _objSupSch.Recur_No = Convert.ToInt32(Request.Form["ddl_daily"]); } #endregion #region Hourly if (frequencyvalue == "H") { _objSupSch.Recur_No = Convert.ToInt32(Request.Form["ddl_hourly"]); } #endregion _objSupSch.FrequencyTypeCode = sbFrequencyTypeCode.ToString(); _objSupSch.Status = Convert.ToString(ddlStatus.SelectedValue); //Need To Do string startHour = Request.Form["ddl_clock_hour"]; string startminute = Request.Form["ddl_clock_minute"]; if (Convert.ToInt32(startHour) < 9) { startHour = startHour.ToString().PadLeft(2, '0'); //startHour = '0' + startHour; } if (Convert.ToInt32(startminute) < 9) { startminute = startminute.ToString().PadLeft(2, '0'); //startminute = '0' + startminute; } _objSupSch.StartTime = Convert.ToString(startHour + ":" + startminute); //_objSupSch.StartTime = Convert.ToString(timepickerStart_Hourly.Value); //_objSupSch.EndTime = Convert.ToString(timepickerEnd_Hourly.Value); //} List <string> selected = new List <string>(); foreach (ListItem item in Checkentitysequence.Items) { if (item.Selected) { selected.Add(item.Text); _objSupSch.lstEnity = selected.ToArray(); } } _objSupSch.CronExpression = expression; _objSupSch.User_Role_Id = Convert.ToString(ddlUserRoleId.SelectedValue); //MDMSVC.DC_Supplier_Schedule_RQ obj = new DC_Supplier_Schedule_RQ(); //obj.Suppllier_ID = _objSupSch.Suppllier_ID; //obj.Entities = _objSupSch.lstEnity; //var result = _objSchedularService.CheckSupplierScheduleData(obj); //if (result == false) //{ // //ScriptManager.RegisterStartupScript(this.Page, this.GetType(), DateTime.Now.Ticks.ToString(), "alert('record alreday exist');e.preventDefault();e.stopPropagation(); return false;", true); // BootstrapAlert.BootstrapAlertMessage(msgAlert, "One of Entity Record Already Exist", BootstrapAlertType.Information); //} //else //{ MDMSVC.DC_Message _objMsg = _objSchedularService.AddUpdateSchedule(_objSupSch); if (_objMsg != null) { BootstrapAlert.BootstrapAlertMessage(msgAlert, "" + _objMsg.StatusMessage, (BootstrapAlertType)_objMsg.StatusCode); } LoadSupplierScheduleData(); //} } catch (Exception ex) { throw ex; } }
protected void frmSupplierMarket_ItemCommand(object sender, FormViewCommandEventArgs e) { Guid mySupplier_Id = Guid.Parse(Request.QueryString["Supplier_Id"]); TextBox txtSupplierMarketName = (TextBox)frmSupplierMarket.FindControl("txtSupplierMarketName"); TextBox txtSupplierMarketCode = (TextBox)frmSupplierMarket.FindControl("txtSupplierMarketCode"); MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); if (e.CommandName.ToString() == "Add") { MDMSVC.DC_SupplierMarket newObj = new MDMSVC.DC_SupplierMarket { Supplier_Id = mySupplier_Id, IsActive = true, Name = txtSupplierMarketName.Text.Trim(), Code = txtSupplierMarketCode.Text.Trim(), Status = "ACT", Create_Date = DateTime.Now, Create_User = System.Web.HttpContext.Current.User.Identity.Name }; _msg = _objMaster.AddUpdateSupplierMarket(newObj); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierMarket.ChangeMode(FormViewMode.Insert); frmSupplierMarket.DataBind(); bindSUpplierMarketsGrid(); BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } if (e.CommandName.ToString() == "Modify") { Guid myRow_Id = Guid.Parse(grdSupplierMarkets.SelectedDataKey.Value.ToString()); MDMSVC.DC_SupplierMarket newObj = new MDMSVC.DC_SupplierMarket { Supplier_Market_Id = myRow_Id, Supplier_Id = mySupplier_Id, IsActive = true, Name = txtSupplierMarketName.Text.Trim(), Code = txtSupplierMarketCode.Text.Trim(), Edit_Date = DateTime.Now, Edit_User = System.Web.HttpContext.Current.User.Identity.Name }; _msg = _objMaster.AddUpdateSupplierMarket(newObj); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierMarket.ChangeMode(FormViewMode.Insert); frmSupplierMarket.DataBind(); bindSUpplierMarketsGrid(); BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } }
protected void frmSupplierProductCategory_ItemCommand(object sender, FormViewCommandEventArgs e) { Guid mySupplier_Id = Guid.Parse(Request.QueryString["Supplier_Id"]); DropDownList ddlProductCategory = (DropDownList)frmSupplierProductCategory.FindControl("ddlProductCategory"); DropDownList ddlProductCategorySubType = (DropDownList)frmSupplierProductCategory.FindControl("ddlProductCategorySubType"); // HtmlInputCheckBox chckbIsDefaultSupplier = (HtmlInputCheckBox)frmSupplierProductCategory.FindControl("chckbIsDefaultSupplier"); MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); dvMsg.Visible = true; if (e.CommandName.ToString() == "Add") { MDMSVC.DC_Supplier_ProductCategory newObj = new MDMSVC.DC_Supplier_ProductCategory { ProductCategory = ddlProductCategory.SelectedItem.Text, ProductCategorySubType = ddlProductCategorySubType.SelectedItem.Text, Create_Date = DateTime.Now, Supplier_Id = mySupplier_Id, //IsDefaultSupplier = chckbIsDefaultSupplier.Checked, Create_User = System.Web.HttpContext.Current.User.Identity.Name, IsActive = true, Status = "ACT" }; _msg = _objMaster.AddUpdateSupplier_ProductCategory(newObj); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierProductCategory.ChangeMode(FormViewMode.Insert); frmSupplierProductCategory.DataBind(); BindPageData(); BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } if (e.CommandName.ToString() == "Modify") { Guid myRow_Id = Guid.Parse(grdSupplierProductCategory.SelectedDataKey.Value.ToString()); MDMSVC.DC_Supplier_ProductCategory newObj = new MDMSVC.DC_Supplier_ProductCategory { Supplier_ProductCategory_Id = myRow_Id, Supplier_Id = mySupplier_Id, ProductCategory = ddlProductCategory.SelectedItem.Text, ProductCategorySubType = ddlProductCategorySubType.SelectedItem.Text, //IsDefaultSupplier = chckbIsDefaultSupplier.Checked, Edit_Date = DateTime.Now, Edit_User = System.Web.HttpContext.Current.User.Identity.Name, IsActive = true, Status = "ACT" }; _msg = _objMaster.AddUpdateSupplier_ProductCategory(newObj); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierProductCategory.ChangeMode(FormViewMode.Insert); frmSupplierProductCategory.DataBind(); BindPageData(); BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } } }
protected void btnUpload_Click(object sender, EventArgs e) { if (ddlSupplierList.SelectedValue == "0" || ddlEntityList.SelectedValue == "0") { BootstrapAlert.BootstrapAlertMessage(dvmsgUploadCompleted, "Please select valid supplier & entity before upload.", BootstrapAlertType.Danger); return; } if (FileUpload1.HasFile) { string strFileType = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName).Replace(".", "").ToLower(); string strSavedValidFileExtension = ValidFile(); if (strFileType == string.Empty) { BootstrapAlert.BootstrapAlertMessage(dvmsgUploadCompleted, "Invalid file.", BootstrapAlertType.Danger); } else if (strSavedValidFileExtension == string.Empty) { BootstrapAlert.BootstrapAlertMessage(dvmsgUploadCompleted, "No file type has been defined.", BootstrapAlertType.Danger); } else if (strSavedValidFileExtension == strFileType) { Guid FileUploadId = Guid.NewGuid(); long ActualFileSize = FileUpload1.PostedFile.ContentLength; var response = UploadFileInChunks(FileUpload1.PostedFile, ActualFileSize, FileUploadId); if (response.UploadSucceeded) { MappingSVCs _objMappingSVCs = new MappingSVCs(); MDMSVC.DC_SupplierImportFileDetails _objFileDetails = new MDMSVC.DC_SupplierImportFileDetails(); _objFileDetails.SupplierImportFile_Id = FileUploadId; _objFileDetails.Supplier_Id = Guid.Parse(ddlSupplierList.SelectedValue); _objFileDetails.Entity = ddlEntityList.SelectedItem.Text; _objFileDetails.OriginalFilePath = FileUpload1.FileName; _objFileDetails.SavedFilePath = response.UploadedPath; //_objFileDetails.STATUS = "UPLOADED"; _objFileDetails.STATUS = "NEW"; _objFileDetails.Mode = "ALL"; _objFileDetails.CREATE_DATE = DateTime.Now; _objFileDetails.CREATE_USER = System.Web.HttpContext.Current.User.Identity.Name; MDMSVC.DC_Message _objMsg = _objMappingSVCs.SaveSupplierStaticFileDetails(_objFileDetails); if (_objMsg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { btnReset_Click(null, EventArgs.Empty); BootstrapAlert.BootstrapAlertMessage(dvmsgUploadCompleted, _objMsg.StatusMessage, BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvmsgUploadCompleted, _objMsg.StatusMessage, BootstrapAlertType.Danger); } _objFileDetails = null; clearControls(); } } else { BootstrapAlert.BootstrapAlertMessage(dvmsgUploadCompleted, "Please select valid file.", BootstrapAlertType.Danger); } } else { BootstrapAlert.BootstrapAlertMessage(dvmsgUploadCompleted, "No file has been selected to upload.", BootstrapAlertType.Danger); } }
protected void grdSupplierProductCategory_RowCommand(object sender, GridViewCommandEventArgs e) { Guid myRow_Id = Guid.Parse(e.CommandArgument.ToString()); MDMSVC.DC_Message _msg = new MDMSVC.DC_Message(); if (e.CommandName.ToString() == "Select") { dvMsg.Style.Add("display", "none"); frmSupplierProductCategory.ChangeMode(FormViewMode.Edit); var result = _objMaster.GetProductCategoryBySupplier(new MDMSVC.DC_Supplier_ProductCategory() { Supplier_ProductCategory_Id = myRow_Id }); frmSupplierProductCategory.DataSource = result; frmSupplierProductCategory.DataBind(); DropDownList ddlProductCategory = (DropDownList)frmSupplierProductCategory.FindControl("ddlProductCategory"); DropDownList ddlProductCategorySubType = (DropDownList)frmSupplierProductCategory.FindControl("ddlProductCategorySubType"); //HtmlInputCheckBox chckbIsDefaultSupplier = (HtmlInputCheckBox)frmSupplierProductCategory.FindControl("chckbIsDefaultSupplier"); BindProductCategory(ddlProductCategory); if (result != null) { if (result.Count > 0) { if (ddlProductCategory != null) { ddlProductCategory.Items.FindByText(result[0].ProductCategory).Selected = true; } BindProductCategorySubType(ddlProductCategorySubType, ddlProductCategory.SelectedValue.ToString()); if (ddlProductCategorySubType != null) { ddlProductCategorySubType.Items.FindByText(result[0].ProductCategorySubType).Selected = true; } //if (chckbIsDefaultSupplier != null) // chckbIsDefaultSupplier.Checked = Convert.ToBoolean(result[0].IsDefaultSupplier); } } } else if (e.CommandName.ToString() == "SoftDelete") { _msg = _objMaster.Supplier_ProductCategorySoftDelete(new MDMSVC.DC_Supplier_ProductCategory() { Supplier_ProductCategory_Id = myRow_Id, IsActive = false, Edit_Date = DateTime.Now, Edit_User = System.Web.HttpContext.Current.User.Identity.Name }); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierProductCategory.ChangeMode(FormViewMode.Insert); frmSupplierProductCategory.DataBind(); BindSupplierProductCategoryGrid(); BootstrapAlert.BootstrapAlertMessage(dvMsg, "Supplier Product Category has been deleted successfully", BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } BindPageData(); } else if (e.CommandName.ToString() == "UnDelete") { _msg = _objMaster.Supplier_ProductCategorySoftDelete(new MDMSVC.DC_Supplier_ProductCategory() { Supplier_ProductCategory_Id = myRow_Id, IsActive = true, Edit_Date = DateTime.Now, Edit_User = System.Web.HttpContext.Current.User.Identity.Name }); if (Convert.ToInt32(_msg.StatusCode) == Convert.ToInt32(BootstrapAlertType.Success)) { frmSupplierProductCategory.ChangeMode(FormViewMode.Insert); frmSupplierProductCategory.DataBind(); BindSupplierProductCategoryGrid(); BootstrapAlert.BootstrapAlertMessage(dvMsg, "Supplier Product Category has been retrived successfully", BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } BindPageData(); } }
protected void frmPolicy_ItemCommand(object sender, FormViewCommandEventArgs e) { Activity_Flavour_Id = new Guid(Request.QueryString["Activity_Flavour_Id"]); DropDownList ddlPolicyType = (DropDownList)frmPolicy.FindControl("ddlPolicyType"); TextBox txtName = (TextBox)frmPolicy.FindControl("txtName"); TextBox txtDescription = (TextBox)frmPolicy.FindControl("txtDescription"); CheckBox chkIsAllow = (CheckBox)frmPolicy.FindControl("chkIsAllow"); CheckBox chkIsActive = (CheckBox)frmPolicy.FindControl("chkIsActive"); if (e.CommandName.ToString() == "Add") { MDMSVC.DC_Activity_Policy newObj = new MDMSVC.DC_Activity_Policy { Activity_Flavour_Id = Activity_Flavour_Id, Activity_Policy_Id = Guid.NewGuid(), AllowedYN = true, IsActive = true, PolicyName = txtName.Text, PolicyDescription = txtDescription.Text, Policy_Type = ddlPolicyType.SelectedItem.Text }; MDMSVC.DC_Message _msg = ActSVC.AddUpdateActivityPolicy(newObj); if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { divMsgAlertPolicy.Visible = true; BootstrapAlert.BootstrapAlertMessage(divMsgAlertPolicy, _msg.StatusMessage, BootstrapAlertType.Success); } else { divMsgAlertPolicy.Visible = true; BootstrapAlert.BootstrapAlertMessage(divMsgAlertPolicy, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } ResetControls(); BindDataSource(); } if (e.CommandName.ToString() == "Update") { Guid myRowId = Guid.Parse(frmPolicy.DataKey.Value.ToString()); MDMSVC.DC_Activity_Policy newObj = new MDMSVC.DC_Activity_Policy(); { newObj.Activity_Policy_Id = myRowId; newObj.Activity_Flavour_Id = Activity_Flavour_Id; if (chkIsAllow.Checked) { newObj.AllowedYN = true; } else { newObj.AllowedYN = false; } if (chkIsActive.Checked) { newObj.IsActive = true; } else { newObj.IsActive = false; } newObj.Policy_Type = ddlPolicyType.SelectedItem.Text; newObj.PolicyName = txtName.Text; newObj.PolicyDescription = txtDescription.Text; } MDMSVC.DC_Message _msg = ActSVC.AddUpdateActivityPolicy(newObj); if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { divMsgAlertPolicy.Visible = true; BootstrapAlert.BootstrapAlertMessage(divMsgAlertPolicy, _msg.StatusMessage, BootstrapAlertType.Success); } else { divMsgAlertPolicy.Visible = true; BootstrapAlert.BootstrapAlertMessage(divMsgAlertPolicy, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } ResetControls(); BindDataSource(); } if (e.CommandName.ToString() == "Reset") { ResetControls(); } }
protected void btnMapAllBySupplier_Click(object sender, EventArgs e) { Guid myRow_Id; Guid myAcco_Id; MDMSVC.DC_Message _newmsg = new MDMSVC.DC_Message(); List <MDMSVC.DC_Accommodation_SupplierRoomTypeMap_Update> _lstUpdate = new List <MDMSVC.DC_Accommodation_SupplierRoomTypeMap_Update>(); int localPageIndex = grdRoomTypeMappingSearchResultsBySupplier.PageIndex; foreach (GridViewRow row in grdRoomTypeMappingSearchResultsBySupplier.Rows) { int rowindex = row.RowIndex; myRow_Id = Guid.Parse(grdRoomTypeMappingSearchResultsBySupplier.DataKeys[rowindex].Values[0].ToString()); myAcco_Id = Guid.Parse(grdRoomTypeMappingSearchResultsBySupplier.DataKeys[rowindex].Values[1].ToString()); //Check dropdown DropDownList ddlMappingStatusInGridBySupplier = (DropDownList)row.FindControl("ddlMappingStatusInGridBySupplier"); if (ddlMappingStatusInGridBySupplier != null) { if (ddlMappingStatusInGridBySupplier.SelectedValue == "0") { } else if (ddlMappingStatusInGridBySupplier.SelectedValue.ToUpper() == "ADD") //ADD { HtmlTextArea txtSuggestedRoomInfoInGridBySupplier = (HtmlTextArea)row.FindControl("txtSuggestedRoomInfoInGridBySupplier"); if (txtSuggestedRoomInfoInGridBySupplier != null && !(string.IsNullOrWhiteSpace(txtSuggestedRoomInfoInGridBySupplier.Value))) { _lstUpdate.Add(new MDMSVC.DC_Accommodation_SupplierRoomTypeMap_Update() { Accommodation_Id = myAcco_Id, RoomCategory = txtSuggestedRoomInfoInGridBySupplier.Value.Trim(), Accommodation_SupplierRoomTypeMapping_Id = myRow_Id, Status = ddlMappingStatusInGridBySupplier.SelectedValue, Edit_User = System.Web.HttpContext.Current.User.Identity.Name }); } } else { DropDownList ddlSuggestedRoomInGridBySupplier = (DropDownList)row.FindControl("ddlSuggestedRoomInGridBySupplier"); HtmlInputHidden hdnAccommodation_RoomInfo_Id = (HtmlInputHidden)row.FindControl("hdnAccommodation_RoomInfo_Id"); Guid? Accommodation_RoomInfo_Id = Guid.Empty; if (ddlSuggestedRoomInGridBySupplier != null && ddlSuggestedRoomInGridBySupplier.SelectedValue != "0" || (hdnAccommodation_RoomInfo_Id != null && !String.IsNullOrWhiteSpace(hdnAccommodation_RoomInfo_Id.Value))) { //if (ddlSuggestedRoomInGridBySupplier.SelectedValue != "0") // Accommodation_RoomInfo_Id = Guid.Parse(ddlSuggestedRoomInGridBySupplier.SelectedValue); //else if (hdnAccommodation_RoomInfo_Id.Value != null && hdnAccommodation_RoomInfo_Id.Value != string.Empty) { Accommodation_RoomInfo_Id = Guid.Parse(hdnAccommodation_RoomInfo_Id.Value); _lstUpdate.Add(new MDMSVC.DC_Accommodation_SupplierRoomTypeMap_Update() { Accommodation_Id = myAcco_Id, // Accommodation_RoomInfo_Id = Guid.Parse(ddlSuggestedRoomInGridBySupplier.SelectedValue), Accommodation_RoomInfo_Id = Accommodation_RoomInfo_Id, Accommodation_SupplierRoomTypeMapping_Id = myRow_Id, Status = ddlMappingStatusInGridBySupplier.SelectedValue == "REVIEW" ? "MAPPED" : ddlMappingStatusInGridBySupplier.SelectedValue, Edit_User = System.Web.HttpContext.Current.User.Identity.Name }); } } } } } if (_lstUpdate.Count > 0) { _newmsg = _mapping.AccomodationSupplierRoomTypeMapping_UpdateMap(_lstUpdate); if (_newmsg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { bool blnDataExist = false; SearchRoomTypeMappingData(ref blnDataExist, localPageIndex); BootstrapAlert.BootstrapAlertMessage(divMsgForMapping, _newmsg.StatusMessage, BootstrapAlertType.Success); } else { BootstrapAlert.BootstrapAlertMessage(divMsgForMapping, _newmsg.StatusMessage, (BootstrapAlertType)_newmsg.StatusCode); } } }
protected void grdMappingConfig_RowCommand(object sender, GridViewCommandEventArgs e) { try { GridViewRow row = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer); int index = row.RowIndex; Guid myRow_Id = Guid.Parse(grdMappingConfig.DataKeys[index].Values[0].ToString()); if (e.CommandName.ToString() == "SoftDelete") { List <MDMSVC.DC_SupplierImportAttributes> RQ = new List <MDMSVC.DC_SupplierImportAttributes>(); MDMSVC.DC_SupplierImportAttributes newObj = new MDMSVC.DC_SupplierImportAttributes { SupplierImportAttribute_Id = myRow_Id, For = grdMappingConfig.Rows[index].Cells[0].Text, Entity = grdMappingConfig.Rows[index].Cells[2].Text, Status = "INACTIVE", EDIT_DATE = DateTime.Now, EDIT_USER = System.Web.HttpContext.Current.User.Identity.Name }; if (grdMappingConfig.DataKeys[index].Values[1] != null) { newObj.Supplier_Id = Guid.Parse(grdMappingConfig.DataKeys[index].Values[1].ToString()); } RQ.Add(newObj); MDMSVC.DC_Message dc = new MDMSVC.DC_Message(); dc = mappingsvc.UpdateStaticDataMappingAttribute(RQ); if (!(dc.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success)) { dvMsg.Style.Add("display", "block"); dvMsg.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvMsg, dc.StatusMessage, BootstrapAlertType.Duplicate); fillconfigdata(0, Convert.ToInt32(ddlShowEntries.SelectedItem.Text)); } else { dvMsg.Style.Add("display", "block"); dvMsg.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvMsg, "Record has been deleted Successfully", BootstrapAlertType.Success); fillconfigdata(0, Convert.ToInt32(ddlShowEntries.SelectedItem.Text)); } } else if (e.CommandName.ToString() == "UnDelete") { List <MDMSVC.DC_SupplierImportAttributes> RQ = new List <MDMSVC.DC_SupplierImportAttributes>(); MDMSVC.DC_SupplierImportAttributes newObj = new MDMSVC.DC_SupplierImportAttributes { SupplierImportAttribute_Id = myRow_Id, For = grdMappingConfig.Rows[index].Cells[0].Text, Entity = grdMappingConfig.Rows[index].Cells[2].Text, Status = "ACTIVE", EDIT_DATE = DateTime.Now, EDIT_USER = System.Web.HttpContext.Current.User.Identity.Name }; if (grdMappingConfig.DataKeys[index].Values[1] != null) { newObj.Supplier_Id = Guid.Parse(grdMappingConfig.DataKeys[index].Values[1].ToString()); } RQ.Add(newObj); MDMSVC.DC_Message dc = new MDMSVC.DC_Message(); dc = mappingsvc.UpdateStaticDataMappingAttribute(RQ); if (!(dc.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success)) { dvMsg.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvMsg, dc.StatusMessage, BootstrapAlertType.Duplicate); fillconfigdata(0, Convert.ToInt32(ddlShowEntries.SelectedItem.Text)); } else { dvMsg.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvMsg, "Record has been un deleted Successfully", BootstrapAlertType.Success); fillconfigdata(0, Convert.ToInt32(ddlShowEntries.SelectedItem.Text)); } } else if (e.CommandName == "Select") { Guid myRowId = Guid.Parse(e.CommandArgument.ToString()); //create Query String string strQueryString = GetQueryString(myRowId.ToString(), ((GridView)sender).PageIndex.ToString()); Response.Redirect(strQueryString, false); //end Query string } } catch { } }
protected void frmProductInfo_ItemCommand(object sender, FormViewCommandEventArgs e) { TextBox txtActivityID = (TextBox)frmProductInfo.FindControl("txtActivityID"); TextBox txtProductName = (TextBox)frmProductInfo.FindControl("txtProductName"); TextBox txtCommPID = (TextBox)frmProductInfo.FindControl("txtCommPID"); TextBox txtCompanyProductID = (TextBox)frmProductInfo.FindControl("txtCompanyProductID"); TextBox txtFinanceControlID = (TextBox)frmProductInfo.FindControl("txtFinanceControlID"); TextBox txtDisplayName = (TextBox)frmProductInfo.FindControl("txtDisplayName"); DropDownList ddlProductCategory = (DropDownList)frmProductInfo.FindControl("ddlProductCategory"); DropDownList ddlProductCatSubType = (DropDownList)frmProductInfo.FindControl("ddlProductCatSubType"); DropDownList ddlProductType = (DropDownList)frmProductInfo.FindControl("ddlProductType"); DropDownList ddlCountry = (DropDownList)frmProductInfo.FindControl("ddlCountry"); DropDownList ddlCity = (DropDownList)frmProductInfo.FindControl("ddlCity"); DropDownList ddlAffiliation = (DropDownList)frmProductInfo.FindControl("ddlAffiliation"); DropDownList ddlProductRating = (DropDownList)frmProductInfo.FindControl("ddlProductRating"); DropDownList ddlCompanyRating = (DropDownList)frmProductInfo.FindControl("ddlCompanyRating"); DropDownList ddlModeOfTransport = (DropDownList)frmProductInfo.FindControl("ddlModeOfTransport"); dvMsg.Visible = true; if (e.CommandName.ToString() == "SaveProduct") { MDMSVC.DC_Activity _obj = new MDMSVC.DC_Activity(); if (Request.QueryString["Activity_Id"] != null) { _obj.Activity_Id = new Guid(txtActivityID.Text); _obj.Edit_User = System.Web.HttpContext.Current.User.Identity.Name; } else { _obj.Create_User = System.Web.HttpContext.Current.User.Identity.Name; } if (txtProductName.Text != string.Empty) { _obj.Product_Name = txtProductName.Text; } if (txtCommPID.Text != string.Empty) { _obj.CommonProductID = Convert.ToInt32(txtCommPID.Text); } if (txtCompanyProductID.Text != string.Empty) { _obj.CompanyProductID = Convert.ToInt32(txtCompanyProductID.Text); } if (txtFinanceControlID.Text != string.Empty) { _obj.FinanceProductID = Convert.ToInt32(txtFinanceControlID.Text); } if (txtDisplayName.Text != string.Empty) { _obj.Display_Name = txtDisplayName.Text; } if (ddlProductCategory.SelectedIndex != 0) { _obj.ProductCategory = ddlProductCategory.SelectedItem.Text; } if (ddlProductCatSubType.SelectedIndex != 0) { _obj.ProductCategorySubType = ddlProductCatSubType.SelectedItem.Text; } if (ddlProductType.SelectedIndex != 0) { _obj.ProductType = ddlProductType.SelectedItem.Text; } if (ddlCountry.SelectedIndex != 0) { _obj.Country = ddlCountry.SelectedItem.Text; _obj.Country_Id = Guid.Parse(ddlCountry.SelectedValue); } if (ddlCity.SelectedIndex != 0) { _obj.City = ddlCity.SelectedItem.Text; _obj.City_Id = Guid.Parse(ddlCity.SelectedValue); } if (ddlAffiliation.SelectedIndex != 0) { _obj.Affiliation = ddlAffiliation.SelectedItem.Text; } if (ddlProductRating.SelectedIndex != 0) { _obj.ProductRating = Convert.ToInt32(ddlProductRating.SelectedItem.Text); } if (ddlCompanyRating.SelectedIndex != 0) { _obj.CompanyRating = Convert.ToInt32(ddlCompanyRating.SelectedItem.Text); } if (ddlModeOfTransport.SelectedIndex != 0) { _obj.Mode_Of_Transport = ddlModeOfTransport.SelectedItem.Text; } MDMSVC.DC_Message _msg = activitySVC.AddUpdateProductInfo(_obj); if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, BootstrapAlertType.Success); } else if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Duplicate) { MDMSVC.DC_Activity_Search_RQ _objDup = new MDMSVC.DC_Activity_Search_RQ(); _objDup.Name = txtProductName.Text; var res = activitySVC.ActivitySearch(_objDup); if (res != null && res.Count != 0) { if (res.Count > 0) { grdSearchResults.VirtualItemCount = Convert.ToInt32(res[0].TotalRecord); grdSearchResults.DataSource = res; grdSearchResults.PageIndex = 0; grdSearchResults.PageSize = 1; grdSearchResults.DataBind(); grdSearchResults.Visible = true; } } else { grdSearchResults.DataSource = null; grdSearchResults.DataBind(); } dvMsg.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } else { dvMsg.Visible = true; BootstrapAlert.BootstrapAlertMessage(dvMsg, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } //frmVwNewActivity.ChangeMode(FormViewMode.Insert); } }
protected void frmRevAndScore_ItemCommand(object sender, FormViewCommandEventArgs e) { Activity_Flavour_Id = new Guid(Request.QueryString["Activity_Flavour_Id"]); CheckBox chkIsActive = (CheckBox)frmRevAndScore.FindControl("chkIsActive"); CheckBox chkIsCustomerReview = (CheckBox)frmRevAndScore.FindControl("chkIsCustomerReview"); TextBox txtReviewName = (TextBox)frmRevAndScore.FindControl("txtReviewName"); TextBox txtReviewDescription = (TextBox)frmRevAndScore.FindControl("txtReviewDescription"); DropDownList ddlReviewType = (DropDownList)frmRevAndScore.FindControl("ddlReviewType"); DropDownList ddlReviewSource = (DropDownList)frmRevAndScore.FindControl("ddlReviewSource"); DropDownList ddlReviewScore = (DropDownList)frmRevAndScore.FindControl("ddlReviewScore"); if (e.CommandName.ToString() == "Add") { MDMSVC.DC_Activity_ReviewsAndScores newObj = new MDMSVC.DC_Activity_ReviewsAndScores { Activity_Flavour_Id = Activity_Flavour_Id, Activity_ReviewsAndScores_Id = Guid.NewGuid(), IsCustomerReview = chkIsCustomerReview.Checked, IsActive = chkIsActive.Checked, Review_Title = txtReviewName.Text, Review_Description = txtReviewDescription.Text, Review_Type = ddlReviewType.SelectedItem.Text, Review_Source = ddlReviewSource.SelectedItem.Text, Review_Score = Convert.ToDecimal(ddlReviewScore.SelectedItem.Text) }; var result = ActSVC.AddUpdateActReviewsNScores(newObj); BootstrapAlert.BootstrapAlertMessage(divMsgAlertRevAndScore, result.StatusMessage, (BootstrapAlertType)result.StatusCode); frmRevAndScore.ChangeMode(FormViewMode.Insert); frmRevAndScore.DataBind(); ResetControls(); } if (e.CommandName.ToString() == "Update") { MDMSVC.DC_Activity_ReviewsAndScores newObj = new MDMSVC.DC_Activity_ReviewsAndScores(); { newObj.Activity_Flavour_Id = Activity_Flavour_Id; if (chkIsCustomerReview.Checked) { newObj.IsCustomerReview = true; } else { newObj.IsCustomerReview = false; } if (chkIsActive.Checked) { newObj.IsActive = true; } else { newObj.IsActive = false; } newObj.Review_Type = ddlReviewType.SelectedItem.Text; newObj.Review_Source = ddlReviewSource.SelectedItem.Text; newObj.Review_Title = txtReviewName.Text; newObj.Review_Description = txtReviewDescription.Text; } MDMSVC.DC_Message _msg = ActSVC.AddUpdateActReviewsNScores(newObj); if (_msg.StatusCode == MDMSVC.ReadOnlyMessageStatusCode.Success) { divMsgAlertRevAndScore.Visible = true; BootstrapAlert.BootstrapAlertMessage(divMsgAlertRevAndScore, _msg.StatusMessage, BootstrapAlertType.Success); } else { divMsgAlertRevAndScore.Visible = true; BootstrapAlert.BootstrapAlertMessage(divMsgAlertRevAndScore, _msg.StatusMessage, (BootstrapAlertType)_msg.StatusCode); } ResetControls(); } if (e.CommandName.ToString() == "Reset") { ResetControls(); } }