public List <string> GetActivityNames(MDMSVC.DC_Activity_Search_RQ RQParams) { object result = null; ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Masters_GetActivityNames"], RQParams, typeof(MDMSVC.DC_Activity_Search_RQ), typeof(List <string>), out result); return(result as List <string>); }
public List <DC_ActivitySearch_RS> ActivitySearch(MDMSVC.DC_Activity_Search_RQ RQParams) { object result = null; ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Activity_Search"], RQParams, typeof(MDMSVC.DC_Activity_Search_RQ), typeof(List <MDMSVC.DC_ActivitySearch_RS>), out result); return(result as List <DC_ActivitySearch_RS>); }
public void searchactivity(string mode, Guid Activity_Id, out List <MDMSVC.DC_Activity> res) { MDMSVC.DC_Activity_Search_RQ RQParams = new MDMSVC.DC_Activity_Search_RQ(); RQParams.PageNo = PageIndex; RQParams.PageSize = int.Parse(ddlPageSize.SelectedItem.Value); if (mode == "") { if (ddlCountry.SelectedValue != "0") { RQParams.Country = ddlCountry.SelectedItem.Text; } if (ddlCity.SelectedValue != "0") { RQParams.City = ddlCity.SelectedItem.Text; } if (ddlCKISType.SelectedValue != "0") { RQParams.ProductCategorySubType = ddlCKISType.SelectedItem.Text; } if (ddlCKISActivityType.SelectedValue != "0") { RQParams.ProductCategory = ddlCKISActivityType.SelectedItem.Text; } if (!string.IsNullOrEmpty(txtHotelName.Text)) { RQParams.Name = txtHotelName.Text; } if (ddlStatus.SelectedValue != "0") { RQParams.Status = ddlStatus.SelectedItem.Text; } } else if (mode.ToUpper() == "BYID") { if (Activity_Id != Guid.Empty) { RQParams.Activity_Id = Activity_Id; } } res = mastersvc.GetActivityMaster(RQParams); }
public void ProcessRequest(HttpContext context) { var PrefixText = context.Request.QueryString["term"]; var Country = context.Request.QueryString["country"]; var City = context.Request.QueryString["city"]; var ckisproducttype = context.Request.QueryString["ckisproducttype"]; RQParams = new MDMSVC.DC_Activity_Search_RQ(); RQParams.Status = "ACTIVE"; if (PrefixText != "") { RQParams.Name = PrefixText; } if (!string.IsNullOrWhiteSpace(Country)) { if (Country.IndexOf("-") == -1) { RQParams.Country = Country; } } if (!string.IsNullOrWhiteSpace(City)) { if (City.IndexOf("-") == -1) { RQParams.City = City; } } if (!string.IsNullOrWhiteSpace(ckisproducttype)) { if (ckisproducttype.IndexOf("-") == -1) { RQParams.ProductCategorySubType = ckisproducttype; } } RQParams.PageNo = 0; RQParams.PageSize = 500; var res = _Objmaster.GetActivityNames(RQParams); context.Response.Write(new JavaScriptSerializer().Serialize(res)); }
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); } }