public DC_Message UpdateTaskLog(MDMSVC.DC_SupplierScheduledTaskRQ RQParams) { object result = null; ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Supplier_UpdateTaskLog"], RQParams, typeof(MDMSVC.DC_SupplierScheduledTaskRQ), typeof(DC_Message), out result); return(result as DC_Message); }
public List <Supplier_Task_Notifications> GetScheduleNotificationTaskLog(MDMSVC.DC_SupplierScheduledTaskRQ RQParams) { object result = null; ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Supplier_ScheduleTask_notification"], RQParams, typeof(MDMSVC.DC_SupplierScheduledTaskRQ), typeof(List <MDMSVC.Supplier_Task_Notifications>), out result); return(result as List <Supplier_Task_Notifications>); }
public void ProcessRequest(HttpContext context) { MDMSVC.DC_SupplierScheduledTaskRQ RQ = new MDMSVC.DC_SupplierScheduledTaskRQ(); string strUserName = System.Web.HttpContext.Current.User.Identity.Name; RQ.UserName = strUserName; List <Supplier_Task_Notifications> notificationslist = new List <Supplier_Task_Notifications>(); notificationslist = MapSvc.GetScheduleNotificationTaskLog(RQ); var bellNotificationCount = (from a in notificationslist where a.NotificationType == "API" && a.Status_Message == "Error" select a).FirstOrDefault().Notification_Count; var bullhornNotificationCount = (from a in notificationslist where a.NotificationType == "File" && a.Status_Message != "Completed" select a.Notification_Count).Sum(); //var response = MapSvc.GetScheduleNotificationTaskLog(RQ); var data = new { bellNotification = bellNotificationCount, bullhornNotification = bullhornNotificationCount }; context.Response.Write(new JavaScriptSerializer().Serialize(data)); }
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); } }
private void fillgriddata(string Notification, int PageIndex, int PageSize) { Guid selSupplier_ID = Guid.Empty; Guid selCountry_ID = Guid.Empty; string strUserName = System.Web.HttpContext.Current.User.Identity.Name; MDMSVC.DC_SupplierScheduledTaskRQ RQ = new MDMSVC.DC_SupplierScheduledTaskRQ(); RQ.UserName = System.Web.HttpContext.Current.User.Identity.Name; //string Notification = Request.QueryString["Notification"].ToString(); if (Notification != string.Empty) { RQ.Notification = Notification; } //RQ.RedirectFrom = RedirectFromAlert; if (txtFrom.Text != string.Empty) { RQ.FromDate = DateTime.ParseExact(txtFrom.Text, "dd/MM/yyyy", null); // DateTime.ParseExact(txtFrom.Text.Trim(), "yyyy/MM/dd", System.Globalization.CultureInfo.InvariantCulture);// Convert.ToDateTime(txtFrom.Text.ToString("yyyy-MM-dd")); } if (txtTo.Text != string.Empty) { RQ.ToDate = DateTime.ParseExact(txtTo.Text, "dd/MM/yyyy", null);// Convert.ToDateTime(txtTo.Text); } if (ddlSupplierName.SelectedItem.Value != "0") { RQ.Supplier_Id = new Guid(ddlSupplierName.SelectedItem.Value); } if (ddlEntity.SelectedItem.Value != "0") { RQ.Entity = ddlEntity.SelectedItem.Text; } if (ddlstatus.SelectedItem.Value != "0") { RQ.Status = ddlstatus.SelectedValue; } RQ.PageNo = PageIndex; RQ.PageSize = Convert.ToInt32(ddlShowEntries.SelectedItem.Text); //RQ.SortBy = (SortBy + " " + SortEx).Trim(); var res = _objScheduleDataSVCs.GetScheduleTaskByRoll(RQ); if (res != null) { if (res.Count > 0) { grdSupplierScheduleTask.VirtualItemCount = res[0].TotalRecord; lblTotalCount.Text = res[0].TotalRecord.ToString(); } else { lblTotalCount.Text = "0"; } } else { lblTotalCount.Text = "0"; } grdSupplierScheduleTask.DataSource = res; grdSupplierScheduleTask.PageIndex = PageIndex; grdSupplierScheduleTask.PageSize = Convert.ToInt32(ddlShowEntries.SelectedItem.Text); grdSupplierScheduleTask.DataBind(); }