Ejemplo n.º 1
0
 protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
 {
     if (e.CommandName.Equals("BACK"))
     {
         Response.Redirect(string.Format("displayfiles.aspx?submissionId={0}", SubmissionId));
     }
     if (e.CommandName.Equals("SAVE"))
     {
         if (gvDetails.Rows.Count == 0)
         {
             MessageBox.Show("There is no file details.");
             return;
         }
         var row              = gvDetails.Rows[0];
         var ddlOutcome       = row.FindControl("ddlOutcome") as DropDownList;
         var txtOutcomeReason = row.FindControl("txtOutcomeReason") as TextBox;
         if (ddlOutcome != null && txtOutcomeReason != null)
         {
             var detailse = new FileValidationOutcomeDetails {
                 Id                  = 0,
                 SubmissionId        = Convert.ToDecimal(SubmissionId),
                 FileId              = Convert.ToDecimal(Request["fId"]),
                 ValidationOutcomeId = Convert.ToInt32(ddlOutcome.SelectedValue),
                 SID                 = Sars.Systems.Security.ADUser.CurrentSID,
                 OutcomeReason       = string.IsNullOrEmpty(txtOutcomeReason.Text) ? null :txtOutcomeReason.Text
             };
             var saved = DBWriteManager.SaveFileValidationOutcome(detailse);
             if (saved > 0)
             {
                 MessageBox.Show(string.Format("Validation Saved as [{0}]", ddlOutcome.SelectedItem.Text));
             }
         }
     }
 }
Ejemplo n.º 2
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            CacheDetails();
            SaveAll();
            BindItem();
            BindDetails();
            break;

        case "return":
            Response.Redirect("NewAnalyses.aspx?view=viewAnalyse");
            break;

        case "previous":
            NavigateToPrevoius();
            break;

        case "next":
            NavigateToNext();
            break;

        default:
            break;
        }
    }
Ejemplo n.º 3
0
 protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
 {
     if (e.CommandName == "return")
     {
         Response.Redirect("StoreLocationList.aspx");
     }
 }
Ejemplo n.º 4
0
 protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
 {
     if (e.CommandName == "return")
     {
         Response.Redirect("StocktakeNoticeList.aspx?View=Result");
     }
 }
Ejemplo n.º 5
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "query":
            pagerNotiList.CurrentPage = 1;
            Query();
            break;

        default:
            break;
        }
    }
Ejemplo n.º 6
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            btnSave_Click(null, null);
            break;

        case "return":
            Response.Write("<script>window.location.href='StoreLocationTypeList.aspx';</script>");
            break;

        default:
            break;
        }
    }
Ejemplo n.º 7
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            Save();
            break;

        case "return":
            Response.Write("<script>window.location.href='PartsQuery.aspx';</script>");
            break;

        default:
            break;
        }
    }
Ejemplo n.º 8
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            Plant    plant    = new Plant();
            Workshop workshop = new Workshop();

            plant.PlantID         = int.Parse(this.ddlPlant.SelectedValue.Trim());
            workshop.Plant        = plant;
            workshop.WorkshopCode = txtWorkshopCode.Text;
            workshop.WorshopName  = txtWorkshopName.Text;
            if (WorkshopID != null)
            {
                workshop.WorkshopID = WorkshopID.Value;
            }

            bool            IsWorkshopExist = true;
            List <Workshop> workshoplist    = new List <Workshop>();
            workshoplist    = Service.GetWorkshopbyPlantID(plant.PlantID);
            IsWorkshopExist = workshoplist.Exists(w => string.Compare(w.WorkshopCode, workshop.WorkshopCode, true) == 0 && w.Available.Value && w.WorkshopID != workshop.WorkshopID);

            if (IsWorkshopExist)
            {
                Response.Write("<script>alert('该车间已存在');</script>");
                return;
            }

            if (null == WorkshopID)
            {
                /*NEW WORKSHOP*/
                Service.AddWorkshop(workshop);
                WorkshopID = workshop.WorkshopID;
            }
            else
            {
                workshop.WorkshopID = WorkshopID.Value;
                Service.UpdateWorkshop(workshop);
            }
            ScriptManager.RegisterStartupScript(this, this.GetType(), "closeScript", "closeDialogOnSave();", true);
            break;

        default:
            break;
        }
    }
Ejemplo n.º 9
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            btnSave_Click(null, null);
            break;

        case "return":
            //Page.RegisterStartupScript("Set", "<script>setReturnValue('ok');</script>");
            //Response.Write("<script>window.location.href='CycleCountLevelList.aspx';</script>");
            break;

        default:
            break;
        }
    }
Ejemplo n.º 10
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            Save();
            break;

        case "clear":
            Service.ResetCycleCount();
            CacheHelper.RemoveCache(Consts.CACHE_KEY_BIZ_PARAMS);
            bindGridView();
            break;

        default:
            break;
        }
    }
Ejemplo n.º 11
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            btnSave_Click(null, null);
            CurrentUser.RefreshUserProfile();
            CacheHelper.RemoveCache(Consts.CACHE_KEY_USER_GROUPS);
            break;

        case "return":
            Session.Remove(SessionOperations);
            Response.Write("<script>window.location.href='UserGroupList.aspx';</script>");
            break;

        default:
            break;
        }
    }
Ejemplo n.º 12
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            if (DetailsID != null)
            {    /* Update differenceAnalyseDetail */
                updateDiffAnalyseDetails();
            }
            else
            {     /* add differenceAnalyseDetail */
                if (ddlUserGroup.SelectedValue != "--")
                {
                    DifferenceAnalyseDetails diffAnalyseDetails = new DifferenceAnalyseDetails();
                    UserGroup ugroup = new UserGroup();
                    diffAnalyseDetails.Description       = txtDescription.Text;
                    diffAnalyseDetails.UserGroup         = ugroup;
                    diffAnalyseDetails.UserGroup.GroupID = int.Parse(ddlUserGroup.SelectedValue);
                    if (Service.ExistDifferenceAnalyse(diffAnalyseDetails))
                    {
                        RegisterStartupScript("Message", "<script>alert('该用户组的差异分析项已存在');</script>");
                        return;
                    }
                    else
                    {
                        Service.AddDiffAnalyseDetail(diffAnalyseDetails);
                    }

                    ScriptManager.RegisterStartupScript(this, this.GetType(), "closeScript", "closeDialogOnSave();", true);
                }
                else
                {
                    Response.Write("<script>alert('请选择用户组');</script>");
                }
            }

            break;

        default:
            break;
        }
    }
Ejemplo n.º 13
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            Plant plant = new Plant();
            plant.PlantID   = int.Parse(Request.QueryString["PlantID"].ToString());
            plant.PlantCode = txtPlantCode.Text.Trim();
            plant.PlantName = txtPlantName.Text.Trim();
            Service.UpdatePlant(plant);
            string url = "PlantQuery.aspx";
            Response.Redirect(url);
            break;

        case "return":
            break;

        default:
            break;
        }
    }
Ejemplo n.º 14
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            Plant plant        = new Plant();
            bool  IsPlantExist = true;
            plant.PlantCode = txtPlantCode.Text.Trim();
            plant.PlantName = txtPlantName.Text.Trim();
            if (PlantID != null)
            {
                plant.PlantID = PlantID.Value;
            }

            IsPlantExist = this.Plants.Exists(p => string.Compare(p.PlantCode, plant.PlantCode, true) == 0 && p.Available.Value == true && p.PlantID != plant.PlantID);
            if (IsPlantExist)
            {
                Response.Write("<script>alert('该工厂已存在');</script>");
                return;
            }

            if (PlantID != null)
            {
                plant.PlantID = PlantID.Value;
                Container.Service.UpdatePlant(plant);
            }
            else
            {     /*NEW PLANT*/
                plant   = Container.Service.AddPlant(plant);
                PlantID = plant.PlantID;
            }
            CacheHelper.RemoveCache(Consts.CACHE_KEY_PLANT);
            ScriptManager.RegisterStartupScript(this, this.GetType(), "closeScript", "closeDialogOnSave();", true);
            break;

        default:
            break;
        }
    }
Ejemplo n.º 15
0
 protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
 {
     switch (e.CommandName)
     {
         case "Publish":
             List<StoreLocationType> locationTypes = new List<StoreLocationType>();
             for (int i = 0; i < rpSLOC.Items.Count; i++)
             {
                 CheckBox cbSLOC = rpSLOC.Items[i].FindControl("cbSLOC") as CheckBox;
                 if (cbSLOC.Checked)
                 {
                     string sloc = cbSLOC.Text;
                     StoreLocationType location = this.StoreLocationTypes.Find(s => s.TypeName == sloc);
                     if (location != null)
                     {
                         locationTypes.Add(location);
                     }
                 }
             }
             if (locationTypes.Count <= 0)
             {
                 return;
             }
             TextBox txtPlanDate = fvNotification.FindControl("txtPlanDate") as TextBox;
             DateTime planDate = DateTime.Parse(txtPlanDate.Text);
             RadioButtonList rblEmergency = fvNotification.FindControl("rblEmergency") as RadioButtonList;
             bool isEmergent = (rblEmergency.SelectedIndex == 0);
             Service.PublishNotification(new StocktakeNotification { NotificationID = NotificationID, Publisher = CurrentUser.UserInfo, PlanDate = planDate, IsEmergent = isEmergent }, locationTypes);
             Toolbar1.Visible = false;
             //Toolbar1.Items[1].Visible = true;
             Response.Write("<script>alert('发布成功!');</script>");
             Response.Write("<script>window.close();</script>");
             //ScriptManager.RegisterStartupScript(this, this.GetType(), "closeScript", "closeDialogOnPublish();", true);
             break;
         default:
             break;
     }
 }
Ejemplo n.º 16
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "query":
            pagerNotiList.CurrentPage = 1;
            pagerDetails.CurrentPage  = 1;
            Query();
            break;

        case "delete":
            Delete();
            Query();
            break;

        case "export":
            Export(GetSelectedItems());
            break;

        default:
            break;
        }
    }
Ejemplo n.º 17
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "save":
            List <View_StocktakeResult> list = new List <View_StocktakeResult>();
            #region get items
            for (int i = 0; i < gvItems.Rows.Count; i++)
            {
                View_StocktakeResult result = new View_StocktakeResult();
                //for (int j = 0; j < gvItems.Rows[i].Cells.Count; j++)
                //{
                //TableCell cell = gvItems.Rows[i].Cells[j];


                TextBox txtGenBlock = gvItems.Rows[i].FindControl("txtGenBlock") as TextBox;
                if (txtGenBlock != null && !string.IsNullOrEmpty(txtGenBlock.Text.Trim()))
                {
                    result.GenBlockAdjust = int.Parse(txtGenBlock.Text);
                }

                TextBox txtGenQI = gvItems.Rows[i].FindControl("txtGenQI") as TextBox;
                if (txtGenQI != null && !string.IsNullOrEmpty(txtGenQI.Text.Trim()))
                {
                    result.GenQIAdjust = int.Parse(txtGenQI.Text);
                }
                TextBox txtGenAvailable = gvItems.Rows[i].FindControl("txtGenAvailable") as TextBox;
                if (txtGenAvailable != null && !string.IsNullOrEmpty(txtGenAvailable.Text.Trim()))
                {
                    result.GenAvailableAdjust = int.Parse(txtGenAvailable.Text);
                }


                TextBox txtCSMTBlock = gvItems.Rows[i].FindControl("txtCSMTBlock") as TextBox;
                if (txtCSMTBlock != null && !string.IsNullOrEmpty(txtCSMTBlock.Text.Trim()))
                {
                    result.CSMTBlockAdjust = int.Parse(txtCSMTBlock.Text);
                }

                TextBox txtCSMTQI = gvItems.Rows[i].FindControl("txtCSMTQI") as TextBox;
                if (txtCSMTQI != null && !string.IsNullOrEmpty(txtCSMTQI.Text.Trim()))
                {
                    result.CSMTQIAdjust = int.Parse(txtCSMTQI.Text);
                }
                TextBox txtCSMTAvailable = gvItems.Rows[i].FindControl("txtCSMTAvailable") as TextBox;
                if (txtCSMTAvailable != null && !string.IsNullOrEmpty(txtCSMTAvailable.Text.Trim()))
                {
                    result.CSMTAvailableAdjust = int.Parse(txtCSMTAvailable.Text);
                }


                TextBox txtRepairBlock = gvItems.Rows[i].FindControl("txtRepairBlock") as TextBox;
                if (txtRepairBlock != null && !string.IsNullOrEmpty(txtRepairBlock.Text.Trim()))
                {
                    result.RepairBlockAdjust = int.Parse(txtRepairBlock.Text);
                }
                TextBox txtRepairQI = gvItems.Rows[i].FindControl("txtRepairQI") as TextBox;
                if (txtRepairQI != null && !string.IsNullOrEmpty(txtRepairQI.Text.Trim()))
                {
                    result.RepairQIAdjust = int.Parse(txtRepairQI.Text);
                }
                TextBox txtRepairAvailable = gvItems.Rows[i].FindControl("txtRepairAvailable") as TextBox;
                if (txtRepairAvailable != null && !string.IsNullOrEmpty(txtRepairAvailable.Text.Trim()))
                {
                    result.RepairAvailableAdjust = int.Parse(txtRepairAvailable.Text);
                }

                TextBox txtRDCBlock = gvItems.Rows[i].FindControl("txtRDCBlock") as TextBox;
                if (txtRDCBlock != null && !string.IsNullOrEmpty(txtRDCBlock.Text.Trim()))
                {
                    result.RDCBlockAdjust = int.Parse(txtRDCBlock.Text);
                }

                TextBox txtRDCQI = gvItems.Rows[i].FindControl("txtRDCQI") as TextBox;
                if (txtRDCQI != null && !string.IsNullOrEmpty(txtRDCQI.Text.Trim()))
                {
                    result.RDCQIAdjust = int.Parse(txtRDCQI.Text);
                }

                TextBox txtRDCAvailable = gvItems.Rows[i].FindControl("txtRDCAvailable") as TextBox;
                if (txtRDCAvailable != null && !string.IsNullOrEmpty(txtRDCAvailable.Text.Trim()))
                {
                    result.RDCAvailableAdjust = int.Parse(txtRDCAvailable.Text);
                }

                TextBox txtSGMAvailable = gvItems.Rows[i].FindControl("txtSGMAvailable") as TextBox;
                if (txtSGMAvailable != null && !string.IsNullOrEmpty(txtSGMAvailable.Text.Trim()))
                {
                    result.SGMAvailableAdjust = int.Parse(txtSGMAvailable.Text);
                }

                TextBox txtSGMBlock = gvItems.Rows[i].FindControl("txtSGMBlock") as TextBox;
                if (txtSGMBlock != null && !string.IsNullOrEmpty(txtSGMBlock.Text.Trim()))
                {
                    result.SGMBlockAdjust = int.Parse(txtSGMBlock.Text);
                }

                TextBox txtSGMQI = gvItems.Rows[i].FindControl("txtSGMQI") as TextBox;
                if (txtSGMQI != null && !string.IsNullOrEmpty(txtSGMQI.Text.Trim()))
                {
                    result.SGMQIAdjust = int.Parse(txtSGMQI.Text);
                }

                //TextBox txtMachining = gvItems.Rows[i].FindControl("txtMachining") as TextBox;
                //if (txtMachining != null && !string.IsNullOrEmpty(txtMachining.Text.Trim()))
                //{
                //    result.Machining = int.Parse(txtMachining.Text);

                //}

                //TextBox txtLine = gvItems.Rows[i].FindControl("txtLine") as TextBox;
                //if (txtLine != null && !string.IsNullOrEmpty(txtLine.Text.Trim()))
                //{
                //    result.Line = int.Parse(txtLine.Text);

                //}

                //TextBox txtStore = gvItems.Rows[i].FindControl("txtStore") as TextBox;
                //if (txtStore != null && !string.IsNullOrEmpty(txtStore.Text.Trim()))
                //{
                //    result.Store = int.Parse(txtStore.Text);

                //}
                if (!string.IsNullOrEmpty(gvItems.DataKeys[i]["DetailsID"] + ""))
                {
                    result.DetailsID = long.Parse(gvItems.DataKeys[i]["DetailsID"] + "");
                }
                if (!string.IsNullOrEmpty(gvItems.DataKeys[i]["SGMItemID"] + ""))
                {
                    result.SGMItemID = long.Parse(gvItems.DataKeys[i]["SGMItemID"] + "");
                }
                if (!string.IsNullOrEmpty(gvItems.DataKeys[i]["RDCItemID"] + ""))
                {
                    result.RDCItemID = long.Parse(gvItems.DataKeys[i]["RDCItemID"] + "");
                }
                if (!string.IsNullOrEmpty(gvItems.DataKeys[i]["GeneralItemID"] + ""))
                {
                    result.GeneralItemID = long.Parse(gvItems.DataKeys[i]["GeneralItemID"] + "");
                }
                if (!string.IsNullOrEmpty(gvItems.DataKeys[i]["CSMTItemID"] + ""))
                {
                    result.CSMTItemID = long.Parse(gvItems.DataKeys[i]["CSMTItemID"] + "");
                }
                if (!string.IsNullOrEmpty(gvItems.DataKeys[i]["RepairItemID"] + ""))
                {
                    result.RepairItemID = long.Parse(gvItems.DataKeys[i]["RepairItemID"] + "");
                }
                list.Add(result);
            }
            #endregion
            Service.FillStocktakeAdjustment(list);
            break;

        case "export":
            byte[] content = Service.ExportStocktakeResult(new StocktakeNotification {
                NotificationID = long.Parse(this.ID)
            }, CurrentUser.UserInfo);
            if (content != null)
            {
                Response.Clear();
                Response.Buffer      = true;
                Response.ContentType = "application/vnd.ms-excel";
                string fileName = HttpUtility.UrlEncode(DateTime.Now.ToString("yyyyMMdd") + "盘点结果(" + DateTime.Now.DayOfWeek + ").xls");
                Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName + ";filetype=excel");
                Response.OutputStream.Write(content, 0, content.Length);
                Response.Flush();
            }
            break;

        case "import":
            break;

        default:
            break;
        }
    }
Ejemplo n.º 18
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "Save":
            RefreshComments();
            RadioButtonList       rblIsStatic  = dlNotification.Items[0].FindControl("rblIsStatic") as RadioButtonList;
            StocktakeNotification notifciation = new StocktakeNotification {
                Creator = CurrentUser.UserInfo, IsStatic = (rblIsStatic.SelectedIndex == 1)
            };
            DropDownList ddlPlant = dlNotification.Items[0].FindControl("ddlPlant") as DropDownList;
            notifciation.Plant = new Plant {
                PlantID = Convert.ToInt32(ddlPlant.SelectedValue)
            };
            if (NotificationID != null)    //update
            {
                notifciation.NotificationID = NotificationID.Value;
                Service.UpdateNotification(notifciation, RemovedDetails.Select(d => d.DetailsID).ToList(), IncludedDetails, false);
            }
            else
            {
                List <long> removed = RemovedDetails.Select(d => d.DetailsID).ToList();
                notifciation.DetailsView = IncludedDetails;
                notifciation             = Service.CreateNotification(notifciation, removed);
                NotificationID           = notifciation.NotificationID;
            }
            RemovedDetails.Clear();
            IncludedDetails.Clear();
            BindData();
            ScriptManager.RegisterStartupScript(this, this.GetType(), "closeScript", "closeDialogOnSave();", true);

            break;

        case "SaveDynamic":
            //StocktakeNotification dynamicNotifciation = new StocktakeNotification { Creator = CurrentUser.UserInfo };
            //if (!string.IsNullOrEmpty(ddlPlant.SelectedValue))
            //{
            //    dynamicNotifciation.Plant = new Plant { PlantID = Convert.ToInt32(ddlPlant.SelectedValue) };
            //}
            //if (NotificationID != null)
            //{
            //    dynamicNotifciation.NotificationID = NotificationID.Value;
            //}
            //else
            //{
            //    dynamicNotifciation.IsStatic = false;
            //    dynamicNotifciation = Service.CreateNotification(dynamicNotifciation, RemovedDynamicDetails);
            //    NotificationID = dynamicNotifciation.NotificationID;
            //    rblGenerateBy.Enabled = false;
            //}
            //List<StocktakeNotification> dynamicNotiList = new List<StocktakeNotification> { dynamicNotifciation };
            //BindDataControl(dlDynamic, dynamicNotiList);

            //Toolbar1.Items[3].Enabled = true;
            break;

        case "query":
            BindData();
            break;

        default:
            break;
        }
    }
Ejemplo n.º 19
0
 protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
 {
 }
Ejemplo n.º 20
0
    protected void Toolbar1_ButtonClicked(object sender, SCS.Web.UI.WebControls.ButtonEventArgs e)
    {
        switch (e.CommandName)
        {
        case "query":
            pagerNew.CurrentPage = 1;
            //pagerAnalysis.CurrentPage = 1;
            NotiToAnalyse        = null;
            hdnDeleteItems.Value = string.Empty;
            Query();
            break;

        case "add":

            RefreshNotiToAnalyse();

            if (NotiToAnalyse.DetailsView.Count > 0)
            {
                long   reportID;
                string reportCode;

                Service.CreateAnalyseReport(NotiToAnalyse, CurrentUser.UserInfo, out reportCode, out reportID);
                ScriptManager.RegisterStartupScript(this, this.GetType(), "CreateAnaSuccess", "alert('生成差异分析报告成功!')", true);
            }
            break;

        case "AddAll":
            long   reportIDAll;
            string reportCodeAll;
            View_StocktakeDetails filter = BuildNewAnalyseCondition();

            Service.CreateAnalyseRptByCondition(filter, CurrentUser.UserInfo, out reportCodeAll, out reportIDAll);
            ScriptManager.RegisterStartupScript(this, this.GetType(), "CreateAnaSuccess", "alert('生成差异分析报告成功!')", true);
            Query();
            break;

        case "export":
            string notiCode = null;
            Query();
            if (!string.IsNullOrEmpty(txtMgrNoticeNo.Text.Trim()))
            {
                notiCode = txtMgrNoticeNo.Text.Trim();
            }
            byte[] report = Service.ExportAnalyseReport(FilteredDetails);
            if (report != null)
            {
                Response.Clear();
                Response.Buffer      = true;
                Response.ContentType = "application/vnd.ms-excel";
                //string fileName = HttpUtility.UrlEncode(DateTime.Now.ToString("yyyyMMdd") + "差异分析结果(" + DateTime.Now.DayOfWeek + ").xls");
                string fileName = notiCode + HttpUtility.UrlEncode("差异分析结果.xls");
                Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName + ";filetype=excel");
                Response.OutputStream.Write(report, 0, report.Length);
                Response.Flush();
            }
            break;

        case "delete":

            try
            {
                if (!string.IsNullOrEmpty(hdnDeleteItems.Value))
                {
                    hdnDeleteItems.Value = hdnDeleteItems.Value.Substring(1, hdnDeleteItems.Value.Length - 2);
                    hdnDeleteItems.Value = hdnDeleteItems.Value.Replace(",,", ",");
                    List <string> idList = hdnDeleteItems.Value.Split(',').ToList();
                    List <DiffAnalyseReportItem> list = new List <DiffAnalyseReportItem>();
                    foreach (var id in idList)
                    {
                        if (!string.IsNullOrEmpty(id))
                        {
                            DiffAnalyseReportItem item = new DiffAnalyseReportItem {
                                ItemID = Convert.ToInt64(id)
                            };
                            list.Add(item);
                        }
                    }

                    Service.DeleteAnalyseItems(list);
                    hdnDeleteItems.Value = string.Empty;
                }
            }
            catch (Exception ex)
            {
                hdnDeleteItems.Value = string.Empty;
                throw;
            }
            Query();
            break;

        case "analyse":

            //pagerNew.CurrentPage = 1;
            ////pagerAnalysis.CurrentPage = 1;
            //NotiToAnalyse = null;
            //hdnDeleteItems.Value = string.Empty;
            //Query();
            //if (gvAnalysis.Rows.Count > 0)
            //{
            Response.Redirect("AnalyseReportItem.aspx?NoticeNo=" + txtRptNoticeNo.Text.Trim());
            //}
            break;

        default:
            break;
        }
    }