Пример #1
0
    protected void SearchBLDblClick(object sender, AjaxEventArgs e)
    {
        RowSelectionModel sm = gpSearchBL.SelectionModel.Primary as RowSelectionModel;

        if (sm.SelectedRows.Count > 0)
        {
            //var yh = from hd in dc.Gethazardusing
            //         where hd.HNumber == sm.SelectedRow.RecordID && hd.Deptnumber == SessionBox.GetUserSession().DeptNumber
            //         select new
            //         {
            //             yhNumber = hd.HNumber,
            //             yhContent = hd.SwBm
            //         };
            //修改多列显示
            var yh = from hd in dc.Gethazardusing
                     where hd.HNumber == sm.SelectedRow.RecordID && hd.Deptnumber == SessionBox.GetUserSession().DeptNumber
                     select new
            {
                yhNumber  = hd.HNumber,
                yhContent = hd.HBm,
                hd.Gzrwname,
                hd.Gxname
            };
            yhStore.DataSource = yh;
            yhStore.DataBind();
            cbbSWcontent.SelectedItem.Value = sm.SelectedRow.RecordID;
            SearchBLWindow.Hide();
            Ext.DoScript("#{cbbSWcontent}.triggers[0].show();");
            SelectLoad();
        }
    }
Пример #2
0
 protected void btnUpdateClick(object sender, AjaxEventArgs e)
 {
     if (hdnID.Value.ToString().Trim() == "")
     {
         ParKind pk = new ParKind
         {
             Fid       = decimal.Parse(hdnTreeParentID.Value.ToString()),
             Pkindname = tfPKINDNAME.Text,
             Fullscore = decimal.Parse(nfFULLSCORE.Text),
             Rate      = cbbRATE.SelectedItem.Value,
             Checkway  = cbbCHECKWAY.SelectedItem.Value,
             Indate    = System.DateTime.Today,
             Status    = "1",
             Usingdept = SessionBox.GetUserSession().DeptNumber
         };
         dc.ParKind.InsertOnSubmit(pk);
         dc.SubmitChanges();
         Ext.Msg.Alert("提示", "新增成功!").Show();
     }
     else
     {
         var pk = dc.ParKind.First(p => p.Pkindid == decimal.Parse(hdnID.Value.ToString()));
         pk.Pkindname = tfPKINDNAME.Text;
         pk.Fullscore = decimal.Parse(nfFULLSCORE.Text);
         pk.Rate      = cbbRATE.SelectedItem.Value;
         pk.Checkway  = cbbCHECKWAY.SelectedItem.Value;
         dc.SubmitChanges();
         Ext.Msg.Alert("提示", "修改成功!").Show();
     }
     Ext.DoScript("refreshTree(#{tpkind});");
 }
Пример #3
0
    public void SelectPerson()
    {
        RowSelectionModel sm  = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
        string            url = string.Format("FinePersonSelect.aspx?Post={0}&Mod={1}&Win={2}", sm.SelectedRow.RecordID, "sw", FineWin.ClientID);

        Ext.DoScript("#{FineWin}.load('" + url + "');#{FineWin}.show();");
    }
Пример #4
0
    public void DetailLoad()//加载明细信息
    {
        RowSelectionModel sm  = this.GridPanel1.SelectionModel.Primary as RowSelectionModel;
        string            url = string.Format("../YSNewSearch/YhView.aspx?Yhid={0}", sm.SelectedRows[0].RecordID.Trim());

        Ext.DoScript("#{DetailWindow}.load('" + url + "');#{DetailWindow}.show();");
    }
Пример #5
0
    public void AgStatus(string reason, string ID)
    {
        var view = dc.Swinput.Where(p => p.Id == decimal.Parse(ID));

        if (view.Count() > 0)
        {
            SwinputNullify sn = new SwinputNullify
            {
                Id                      = view.First().Id,
                Banci                   = view.First().Banci,
                Fine                    = view.First().Fine,
                Inputpersonid           = view.First().Inputpersonid,
                Intime                  = view.First().Intime,
                Isadministrativepenalty = view.First().Isadministrativepenalty,
                Isend                   = view.First().Isend,
                Ispublic                = view.First().Ispublic,
                Maindeptid              = view.First().Maindeptid,
                Nullify                 = reason,
                Pcpersonid              = view.First().Pcpersonid,
                Pctime                  = view.First().Pctime,
                Placeid                 = view.First().Placeid,
                Remarks                 = view.First().Remarks,
                Swnumber                = view.First().Swnumber,
                Swpersonid              = view.First().Swpersonid
            };
            dc.SwinputNullify.InsertOnSubmit(sn);
            dc.SubmitChanges();
            dc.Swinput.DeleteOnSubmit(view.First());
            dc.SubmitChanges();
            Ext.DoScript("#{Store1}.reload();");
            Ext.Msg.Alert("提示", "作废成功!").Show();
        }
    }
Пример #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Ext.IsAjaxRequest)
     {
         Ext.DoScript("refreshTree(#{tpkind});");
     }
 }
Пример #7
0
    [AjaxMethod]//win 显示
    public void JoemInfo(string action)
    {
        if (action == "Jnew")
        {
            Ext.DoScript("#{fpJoem}.getForm().reset();");
            hdnJoemid.SetValue("-1");
            nfScore.Disabled = false;
            taMEANS.Disabled = false;
        }
        if (action == "Nnew")
        {
            Ext.DoScript("#{fpJoem}.getForm().reset();");
            hdnJoemid.SetValue("-2");
            nfScore.Disabled = true;
            taMEANS.Disabled = true;
            taMEANS.Text     = "不达标扣10分,得分不得超过不达标标准分";
        }
        if (action == "Dnew")
        {
            Ext.DoScript("#{fpJoem}.getForm().reset();");
            hdnJoemid.SetValue("-3");
            nfScore.Disabled = true;
            taMEANS.Disabled = true;
            taMEANS.Text     = "降一级扣5分,得分不得超过下一级的最高分";
        }
        if (action == "edit")
        {
            RowSelectionModel sm = gpJoem.SelectionModel.Primary as RowSelectionModel;
            if (sm.SelectedRows.Count > 0)
            {
                hdnJoemid.SetValue(sm.SelectedRow.RecordID);
                switch (sm.SelectedRow.RecordID.Trim().Substring(0, 1))
                {
                case "j":
                    var joem = dc.SqsJeomcriterion.First(p => p.Jcid == decimal.Parse(sm.SelectedRow.RecordID.Trim().Substring(1)));
                    tfJccontent.Text = joem.Jccontent;
                    nfScore.Text     = joem.Score.ToString();
                    taMEANS.Text     = joem.Means;
                    break;

                case "n":
                    var ec = dc.SqsEssentialcondition.First(p => p.Ecid == decimal.Parse(sm.SelectedRow.RecordID.Trim().Substring(1)));
                    tfJccontent.Text = ec.Content;
                    nfScore.Disabled = true;
                    taMEANS.Disabled = true;
                    taMEANS.Text     = "不达标扣10分,得分不得超过不达标标准分";
                    break;

                case "d":
                    var de = dc.SqsDemotion.First(p => p.Deid == decimal.Parse(sm.SelectedRow.RecordID.Trim().Substring(1)));
                    tfJccontent.Text = de.Content;
                    nfScore.Disabled = true;
                    taMEANS.Disabled = true;
                    taMEANS.Text     = "降一级扣5分,得分不得超过下一级的最高分";
                    break;
                }
            }
        }
        JoemWindow.Show();
    }
Пример #8
0
    protected void Cell_Click(object sender, AjaxEventArgs e)
    {
        CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;

        if (sm.SelectedCell.ColIndex == 0 || sm.SelectedCell.Value.Trim() == "0" || sm.SelectedCell.ColIndex == 1)
        {
            return;
        }
        Window1.Title = dc.Department.First(p => p.Deptnumber == sm.SelectedCell.RecordID).Deptname.Trim() + "---";
        string url = "";

        switch (sm.SelectedCell.Name.Trim())
        {
        case "YHALL":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "所有隐患";
            url            = string.Format("YHcondition.aspx?DeptID={0}&begin={1}&end={2}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            break;

        case "YHYZG":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "已闭合隐患";
            url            = string.Format("YHcondition.aspx?DeptID={0}&begin={1}&end={2}&status={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "1");
            break;

        case "YHWZG":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "未闭合隐患";
            url            = string.Format("YHcondition.aspx?DeptID={0}&begin={1}&end={2}&status={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "0");
            break;

        case "SWALL":
            Window1.Width  = 890;
            Window1.Height = 400;
            Window1.Title += "三违信息";
            url            = string.Format("SWcondition.aspx?DeptID={0}&begin={1}&end={2}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            break;

        case "YZD":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "已走动信息";
            url            = string.Format("MPcondition.aspx?DeptID={0}&begin={1}&end={2}&status={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "1");
            break;

        case "WZD":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "未走动信息";
            url            = string.Format("MPcondition.aspx?DeptID={0}&begin={1}&end={2}&status={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "0");
            break;
        }
        //url=Server.HtmlEncode(url);
        Ext.DoScript("#{Window1}.load('" + url + "');");
        Window1.Show();
    }
Пример #9
0
    public void SuerDeleteT(string id)
    {
        HBBLL hb = new HBBLL();

        hb.DeleteYPPT(int.Parse(id));
        Ext.Msg.Alert("提示", "删除成功!").Show();
        Ext.DoScript("#{placeTemplateStore}.reload();");
    }
Пример #10
0
    public void TreeNote_Del(string id)
    {
        var pk = dc.ParKind.First(p => p.Pkindid == decimal.Parse(id));

        dc.ParKind.DeleteOnSubmit(pk);
        dc.SubmitChanges();
        Ext.Msg.Alert("提示", "删除成功!").Show();
        Ext.DoScript("refreshTree(#{tpkind});");
    }
Пример #11
0
    public void btnEdit_Click()
    {
        RowSelectionModel sm = gpEdit.SelectionModel.Primary as RowSelectionModel;

        if (sm.SelectedRows.Count > 0)
        {
            Ext.DoScript("#{Window1}.load('EditAccess_new.aspx?type=edit&Rid=" + sm.SelectedRow.RecordID + "');#{Window1}.show();");
        }
    }
Пример #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Ext.IsAjaxRequest)
        {
            Ext.DoScript("refreshTree(#{tpkind});");

            dfBeginDate.SelectedDate = System.DateTime.Today.AddDays(-7);
            dfEndDate.SelectedDate   = System.DateTime.Today;
        }
    }
Пример #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string url = string.Format("{0}?begin={1}&end={2}&PAreasID={3}", Request["url"].Trim(), Request["begin"].Trim(), Request["end"].Trim(), Request["PAreasID"].Trim());

        if (!string.IsNullOrEmpty(this.Request["status"]))
        {
            url += "&status=" + this.Request["status"].Trim();
        }
        BuildTree(int.Parse(this.Request["PAreasID"]), url);
        Ext.DoScript("#{pnlDetail}.load('" + url + "');");
    }
Пример #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (!SessionBox.CheckUserSession())
            {
                Response.Redirect("~/Login.aspx");
            }
            else
            {
                //弹出公告
                winNotice.Hide();
                Ext.DoScript("showMessage();");
                GetNoticeInfo();

                if (!Ext.IsAjaxRequest)
                {
                    AutoDoSth();
                    //AutoUpdate();
                    lblLoginName.Text = SessionBox.GetUserSession().Name; //== "ghtntech" ? "国华天能管理员" : (from p in dc.Person where p.PersonNumber == SessionBox.GetUserSession().PersonNumber select p.Name).Single();
                    lblRoleName.Text  = "所属单位:";
                    lblRole.Text      = SessionBox.GetUserSession().DeptName;
                    List <string> Role = SessionBox.GetUserSession().Role;
                    if (Role.Count != 0)
                    {
                        lblR.Text = "您的身份:";
                        for (int i = 0; i < Role.Count; i++)
                        {
                            cboRoleName.Items.Add(new Coolite.Ext.Web.ListItem(Role[i].ToString().Split(',')[1], Role[i].ToString().Split(',')[0]));
                        }
                        //cboRoleName.SelectedIndex = 0;
                        cboRoleName.SelectedItem.Value = Role[0].ToString().Split(',')[0];
                        //cboRoleName.SelectedItem.Text = Role[0].ToString().Split(',')[1];
                        if (Role.Count > 1)
                        {
                            cboRoleName.Disabled = false;
                        }
                        else
                        {
                            cboRoleName.Disabled = true;
                        }
                    }
                    else
                    {
                        lblR.Text = "程序维护员";
                    }
                    InitMain();

                    lblServerIP.Text = System.Web.HttpContext.Current.Request.ServerVariables["Local_Addr"];
                }
            }
        }
    }
Пример #15
0
    public void PlaceDown()
    {
        RowSelectionModel sm = this.GridPanel2.SelectionModel.Primary as RowSelectionModel;

        if (sm.SelectedRows.Count == 1)
        {
            HBBLL hb = new HBBLL();
            int   id = int.Parse(sm.SelectedRows[0].RecordID.Trim());
            hb.MoveDown(id, hb.GetMoveOrderByID(id), int.Parse(TID.Value.ToString()));
            Ext.DoScript("#{YPPTDetailStore}.reload();");
        }
    }
Пример #16
0
    public void BaseSave()
    {
        if (cbbCheckDept.SelectedIndex == -1 || cbbforcheckDept.SelectedIndex == -1 || tfplace.Text.Trim() == "" || cbbXZ.SelectedIndex == -1)
        {
            Ext.Msg.Alert("提示", "请填写完整信息!").Show();
            return;
        }
        string  type   = Request.QueryString["Type"].Trim();
        decimal strrid = 0;

        if (hdnId.Value.ToString().Trim() == "")
        {
            SqsResult pr = new SqsResult
            {
                Checkdate    = dfDate.SelectedDate,
                Checkdept    = cbbCheckDept.SelectedItem.Value,
                Checkfordept = cbbforcheckDept.SelectedItem.Value,
                Did          = decimal.Parse(Request.QueryString["Pkindid"]),
                Checkway     = cbbXZ.SelectedItem.Value,
                Placeid      = tfplace.Text,
                Rstatus      = "1",
                Total        = 0
            };
            dc.SqsResult.InsertOnSubmit(pr);
            dc.SubmitChanges();
            strrid = dc.SqsResult.Max(p => p.Rid);
            hdnId.SetValue(strrid.ToString());
        }
        else
        {
            var result = dc.SqsResult.First(p => p.Rid == decimal.Parse(hdnId.Value.ToString()));
            result.Checkfordept = cbbforcheckDept.SelectedItem.Value;
            result.Placeid      = tfplace.Text;
            result.Checkdate    = dfDate.SelectedDate;
            result.Checkway     = cbbXZ.SelectedItem.Value;
            dc.SubmitChanges();
            strrid = result.Rid;
        }
        //Ext.Msg.Alert("提示", "1").Show();
        Ext.DoScript("#{gpESSENTIALCONDITION}.save();");
        Ext.DoScript("#{gpDEMOTION}.save();#{gpJeom}.save();");
        Ext.DoScript("#{gpJeom}.save();");

        Ext.Msg.Alert("提示", "保存成功!").Show();

        //var res = dc.SqsResult.First(p => p.Rid == decimal.Parse(hdnId.Value.ToString()));
        //decimal total = dc.SqsResultDetail.Where(p => p.Rid == decimal.Parse(hdnId.Value.ToString())).Sum(p => p.Jeom).Value;
        //var d = dc.SqsDemotiondetail.Where(p => p.Rid == decimal.Parse(hdnId.Value.ToString()));
        //if (total - d.Count() * 10 < 80)
        //{
        //    total = 70 + total % 10 - d.Count() * 5;
        //}
    }
Пример #17
0
 public void Changed()//处别选择下拉事件
 {
     if (cboPlaceTemplate.SelectedIndex > 0)
     {
         Ext.DoScript("#{YPPTDetailStore}.reload();");
         btnLookRoute.Disabled = false;
     }
     else
     {
         btnLookRoute.Disabled = true;
     }
 }
Пример #18
0
 public void homeload()
 {
     if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "43")
     {
         Ext.DoScript("#{pnlFrame}.load('Main_Leader.aspx');");
     }
     else if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "46")
     {
         Ext.DoScript("#{pnlFrame}.load('Main_JTLeader.aspx');");
     }
     else
     {
         Ext.DoScript("#{pnlFrame}.load('Main.aspx');");
     }
 }
Пример #19
0
    public void DetailLoad()
    {
        RowSelectionModel sm = this.gpEdit.SelectionModel.Primary as RowSelectionModel;

        if (sm.SelectedRows.Count > 0)
        {
            string url = "";
            Window1.Width  = 890;
            Window1.Height = 400;
            Window1.Title  = "三违明细信息";
            url            = string.Format("../LeaderSearch/SWcondition.aspx?begin={0}&end={1}&SWperson={2}", DateTime.Parse(System.DateTime.Today.Year + "-01-01"), DateTime.Parse(System.DateTime.Today.Year + "-12-31"), sm.SelectedRow.RecordID);
            Ext.DoScript("#{Window1}.load('" + url + "');");
            Window1.Show();
        }
    }
Пример #20
0
    public void DeleteDept()
    {
        var dept   = dc.Department.First(p => p.Deptnumber == hdnKindid.Value.ToString());
        var person = dc.Person.Where(p => p.Areadeptid == hdnKindid.Value.ToString());

        dept.Visualfield = 2;
        foreach (var p in person)
        {
            p.Visualfield = 2;
        }
        dc.SubmitChanges();
        Ext.Msg.Alert("提示", "删除成功!").Show();
        hdnKindid.SetValue("0");
        Ext.DoScript("refreshTree(#{tpkind});");
    }
Пример #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Ext.IsAjaxRequest)
        {
            if (string.IsNullOrEmpty(this.Request["Workid"]))
            {
                Ext.DoScript("CloseWin();");
                return;
            }
            string table = "";
            Panel1.Html = table;

            Ext.DoScript("window.print();");
            Ext.DoScript("CloseWin();");
        }
    }
Пример #22
0
    protected void Cell_Click(object sender, AjaxEventArgs e)
    {
        CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;

        if (sm.SelectedCell.ColIndex == 0 || sm.SelectedCell.ColIndex == 1 || sm.SelectedCell.Value.Trim() == "0")
        {
            return;
        }
        Window1.Title = dc.Placeareas.First(p => p.Pareasid == int.Parse(sm.SelectedCell.RecordID)).Pareasname.Trim() + "---";
        string url = "";

        switch (sm.SelectedCell.Name.Trim())
        {
        case "YHALL":
            Window1.Title += "所有隐患";
            url            = string.Format("PlaceSummary.aspx?PAreasID={0}&begin={1}&end={2}&url=YHcondition.aspx", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            break;

        case "YHYZG":
            Window1.Title += "已闭合隐患";
            url            = string.Format("PlaceSummary.aspx?PAreasID={0}&begin={1}&end={2}&status={3}&url=YHcondition.aspx", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "1");
            break;

        case "YHWZG":
            Window1.Title += "未闭合隐患";
            url            = string.Format("PlaceSummary.aspx?PAreasID={0}&begin={1}&end={2}&status={3}&url=YHcondition.aspx", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "0");
            break;

        case "SWALL":
            Window1.Title += "‘三违’信息";
            url            = string.Format("PlaceSummary.aspx?PAreasID={0}&begin={1}&end={2}&url=SWcondition.aspx", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            break;

        case "YZD":
            Window1.Title += "已走动信息";
            url            = string.Format("PlaceSummary.aspx?PAreasID={0}&begin={1}&end={2}&status={3}&url=MPcondition.aspx", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "1");
            break;

        case "WZD":
            Window1.Title += "未走动信息";
            url            = string.Format("PlaceSummary.aspx?PAreasID={0}&begin={1}&end={2}&status={3}&url=MPcondition.aspx", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "0");
            break;
        }
        //url=Server.HtmlEncode(url);
        Ext.DoScript("#{Window1}.load('" + url + "');");
        Window1.Show();
    }
Пример #23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Ext.IsAjaxRequest)
        {
            //改变走动状态
            //AutoDoSth();
            //待办事宜
            string   text    = "<ul>";
            string[] countYH = MainData.getYHDSP_kld(SessionBox.GetUserSession().PersonNumber, SessionBox.GetUserSession().DeptNumber);
            text += string.Format("<span><font color=#cc0000><b>待办事宜:</b></font></span>您有待审批隐患:<a href={1}>{0}条</a>", countYH[0], "YSNewProcess/YHProcess.aspx?YHIDgroup=" + (countYH[1].Length == 0 ? "-1" : countYH[1]));
            //待督促隐患
            var sms = from s in dc.TblSmsendtask
                      from p in dc.Person
                      from yh in dc.Getyhinput
                      where s.Destaddr == p.Tel && s.Msgid == yh.Yhputinid.ToString() &&
                      p.Personnumber == SessionBox.GetUserSession().PersonNumber&& yh.Status == "隐患未整改"
                      group s by s.Msgid into g
                      select new
            {
                YHPutinID = g.Key
            };          //group by 不要重复数据
            string group = "";
            foreach (var r in sms)
            {
                group += r.YHPutinID.ToString() + ",";
            }
            if (group.Length > 0)
            {
                group = group.Substring(0, group.Length - 1);
            }
            else
            {
                group = "-1";
            }
            text += string.Format("&nbsp;&nbsp;&nbsp;&nbsp;<span>您有待督促隐患:<a href={1}>{0}条</a></span>", sms.Count(), "YSNewProcess/YHProcess.aspx?YHIDgroup=" + group);

            text += "</ul>";
            this.ScriptManager1.RegisterClientScriptBlock("part", string.Format("var part=\"{0}\";", text));
            lab.Html = "={part}";

            Ext.DoScript("Coolite.AjaxMethods.DayDataLoad();");
            Ext.DoScript("Coolite.AjaxMethods.WeekDataLoad();");
            Ext.DoScript("Coolite.AjaxMethods.MonthDataLoad();");
            Ext.DoScript("Coolite.AjaxMethods.YearDataLoad();");
        }
    }
Пример #24
0
    public void SuerDelete()
    {
        RowSelectionModel sm = this.GridPanel2.SelectionModel.Primary as RowSelectionModel;

        if (sm.SelectedRows.Count > 0)
        {
            List <int> ids = new List <int>();
            foreach (var item in sm.SelectedRows)
            {
                ids.Add(Convert.ToInt32(item.RecordID));
            }
            HBBLL hb = new HBBLL();
            hb.DeleteYPPTDetail(ids);
            hb.UpdateYPPTDetailOrder(int.Parse(TID.Value.ToString()));
            Ext.Msg.Alert("提示", "删除成功!").Show();
            Ext.DoScript("#{YPPTDetailStore}.reload();");
        }
    }
Пример #25
0
 public void SaveTName()
 {
     if (txtTName.Text.Trim() != "")
     {
         HBBLL hb = new HBBLL();
         if (TID.Value.ToString() == "")
         {
             hb.AddYPPT(txtTName.Text.Trim(), rKuangJi.Checked == true?rKuangJi.BoxLabel:rGeRen.BoxLabel, SessionBox.GetUserSession().PersonNumber, SessionBox.GetUserSession().DeptNumber);
             Ext.Msg.Alert("提示", "新增成功!").Show();
             Ext.DoScript("#{placeTemplateStore}.reload();");
         }
         else
         {
             hb.UpdateYPPT(txtTName.Text.Trim(), int.Parse(TID.Value.ToString()));
             Ext.Msg.Alert("提示", "修改成功!").Show();
             Ext.DoScript("#{placeTemplateStore}.reload();");
         }
     }
 }
Пример #26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Ext.IsAjaxRequest)
     {
         if (!SessionBox.CheckUserSession())
         {
             Response.Redirect("~/Login.aspx");
         }
         else
         {
             //this.ScriptManager1.RegisterClientScriptBlock("part", string.Format("var part=\"{0}\";", text));
             //this.ScriptManager1.RegisterClientScriptBlock("text", string.Format("var text=\"{0}\";", yhText));
             //Portlet2.Html = "={part}";
             //Portlet1.Html = "={text}";
             Ext.DoScript("Coolite.AjaxMethods.SetDBSY();");
             Ext.DoScript("Coolite.AjaxMethods.SetNewYH();");
         }
     }
 }
Пример #27
0
 public void InitMain()
 {
     try
     {
         cboRoleName.SelectedItem.Value = SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0];
     }
     catch
     {
         List <string> al = new List <string>();
         al.Add(cboRoleName.SelectedItem.Value + "," + cboRoleName.SelectedItem.Text);
         SessionBox.GetUserSession().CurrentRole = al;
     }
     //if (SessionBox.GetUserSession().CurrentRole == null)
     //{
     //    List<string> al = new List<string>();
     //    al.Add(cboRoleName.SelectedItem.Value + "," + cboRoleName.SelectedItem.Text);
     //    SessionBox.GetUserSession().CurrentRole = al;
     //}
     //else
     //{
     //    cboRoleName.SelectedItem.Value = SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0];
     //}
     if (Request.Params["txtUrl"] != null && Request.Params["txtUrl"] != "-1")
     {
         Ext.DoScript("#{pnlFrame}.load('" + Request.Params["txtUrl"].ToString().Trim() + "');");
     }
     else
     {
         if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "43")
         {
             Ext.DoScript("#{pnlFrame}.load('Main_Leader.aspx');");
         }
         else if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "46")
         {
             Ext.DoScript("#{pnlFrame}.load('Main_JTLeader.aspx');");
         }
         else
         {
             Ext.DoScript("#{pnlFrame}.load('Main.aspx');");
         }
     }
     InitMenu();
 }
Пример #28
0
 [AjaxMethod]//win 显示
 public void ItemInfo(string action)
 {
     if (action == "new")
     {
         Ext.DoScript("#{fpItem}.getForm().reset();");
         hdnItemid.SetValue("");
     }
     if (action == "edit")
     {
         RowSelectionModel sm = gpItem.SelectionModel.Primary as RowSelectionModel;
         if (sm.SelectedRows.Count > 0)
         {
             hdnItemid.SetValue(sm.SelectedRow.RecordID);
             var item = dc.ParItem.First(p => p.Itemid == decimal.Parse(sm.SelectedRow.RecordID));
             tfItemname.Text      = item.Itemname;
             nfitemFullscore.Text = item.Fullscore.ToString();
         }
     }
     ItemWindow.Show();
 }
Пример #29
0
    public void PageChange()
    {
        List <string> al = new List <string>();

        al.Add(cboRoleName.SelectedItem.Value + "," + cboRoleName.SelectedItem.Text);
        SessionBox.GetUserSession().CurrentRole = al;
        //Response.Redirect("MainFrame.aspx", true);
        if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "43")
        {
            Ext.DoScript("#{pnlFrame}.load('Main_Leader.aspx');");
        }
        else if (SessionBox.GetUserSession().CurrentRole[0].ToString().Split(',')[0] == "46")
        {
            Ext.DoScript("#{pnlFrame}.load('Main_JTLeader.aspx');");
        }
        else
        {
            Ext.DoScript("#{pnlFrame}.load('Main.aspx');");
        }
    }
Пример #30
0
    protected void Cell_Click(object sender, AjaxEventArgs e)
    {
        try//为null时出错
        {
            CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;
            if (sm.SelectedCell.ColIndex == 0 || sm.SelectedCell.Value.Trim() == "0")
            {
                return;
            }
            string url = "";
            switch (sm.SelectedCell.Name.Trim())
            {
            case "XJ":
                Window1.Width  = 840;
                Window1.Height = 422;
                Window1.Title  = "下井信息";
                Window1.Html   = GetXJDate(sm.SelectedCell.RecordID.Trim());
                //url = string.Format("YHcondition.aspx?MainDeptID={0}&begin={1}&end={2}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
                Window1.Show();
                break;

            case "YH":
                Window1.Width  = 840;
                Window1.Height = 422;
                Window1.Title += "隐患信息";
                url            = string.Format("YHcondition.aspx?PCperson={0}&begin={1}&end={2}&jctype={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "2");
                Window1.ClearContent();
                Ext.DoScript("#{Window1}.load('" + url + "');");
                Window1.Show();
                break;
            }
        }
        catch
        {
        }
        //if (url != "")
        //{
        //    Window1.ClearContent();
        //    Ext.DoScript("#{Window1}.load('" + url + "');");
        //}
    }