Exemple #1
0
 protected void btnXoaNgach_Click(object sender, DirectEventArgs e)
 {
     try
     {
         CellSelectionModel sm      = GridPanel1.SelectionModel.Primary as CellSelectionModel;
         string             maNgach = sm.SelectedCell.RecordID;
         string             tmpBac  = sm.SelectedCell.Name;
         int bac = 0;
         if (tmpBac.StartsWith("Bac"))
         {
             bac = int.Parse(tmpBac.Replace("Bac", "").Trim());
             DM_MUCLUONG_NGACHInfo ngach = new DM_MUCLUONG_NGACHController().GetByMaNgachAndBacLuong(maNgach, bac);
             if (ngach == null)
             {
                 X.Msg.Alert("Thông báo từ hệ thống", "Không tìm thấy dữ liệu").Show();
                 return;
             }
             new DM_MUCLUONG_NGACHController().Delete(ngach.PR_KEY);
             Dialog.ShowNotification("Đã xóa dữ liệu của ngạch: " + ngach.TenNgach + ", bậc : " + ngach.BacLuong);
             GridPanel1.Reload();
         }
         else
         {
             Dialog.ShowNotification("Dữ liệu này không thể xóa!");
         }
     }
     catch (Exception ex)
     {
         X.Msg.Alert("Thông báo từ hệ thống", "Có lỗi xảy ra: " + ex.Message).Show();
     }
 }
Exemple #2
0
 protected void mnuXoaLuongKhoan_Click(object sender, DirectEventArgs e)
 {
     try
     {
         int year  = int.Parse(spnYear.Value.ToString());
         int month = int.Parse(cbxMonth.SelectedItem.Value);
         TinhLuongKhoanController controller = new TinhLuongKhoanController();
         CellSelectionModel       sm         = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;
         string maCB = sm.SelectedCell.RecordID;
         // xóa ngày
         if (e.ExtraParams["Delete"] == "day")
         {
             if (!sm.SelectedCell.Name.StartsWith("Ngay"))
             {
                 Dialog.ShowError("Không thể xóa ô này");
                 return;
             }
             int ngay = int.Parse(sm.SelectedCell.Name.Replace("Ngay", ""));
             controller.DeleteByDay(maCB, year, month, ngay);
         }
         // xóa nhân viên
         if (e.ExtraParams["Delete"] == "employee")
         {
             controller.DeleteByEmployeeCode(maCB);
         }
         GridPanel1.Reload();
     }
     catch (Exception ex)
     {
         Dialog.ShowError(ex.Message);
     }
 }
    protected void Cell_Click(object sender, AjaxEventArgs e)
    {
        if (dfBegin.SelectedDate > dfEnd.SelectedDate)
        {
            Ext.Msg.Alert("提示", "日期选择有误!").Show();
            return;
        }
        CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;

        if (sm.SelectedCell.Value.Trim() == "0")
        {
            return;
        }
        if (sm.SelectedCell.Name.Trim() == "SMScount")
        {
            var data = from t in dc.TblSmsendtask
                       from p in dc.Person
                       where t.Destaddr == p.Tel &&
                       t.Subtime >= dfBegin.SelectedDate && t.Subtime <= dfEnd.SelectedDate &&
                       p.Maindeptid == sm.SelectedCell.RecordID.Trim()
                       select new
            {
                t.Smsid,
                t.SmContent,
                t.Sendtime,
                p.Name
            };
            DetailStore.DataSource = data.OrderByDescending(p => p.Sendtime);
            DetailStore.DataBind();

            DetailWindow.Show();
        }
    }
    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();
    }
Exemple #5
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();
    }
Exemple #6
0
    protected void btnSuaNgach_Click(object sender, DirectEventArgs e)
    {
        try
        {
            CellSelectionModel sm      = GridPanel1.SelectionModel.Primary as CellSelectionModel;
            string             maNgach = sm.SelectedCell.RecordID;
            string             tmpBac  = sm.SelectedCell.Name;
            int bac = 0;
            if (tmpBac.StartsWith("Bac"))
            {
                bac = int.Parse(tmpBac.Replace("Bac", "").Trim());
                DM_MUCLUONG_NGACHInfo ngach = new DM_MUCLUONG_NGACHController().GetByMaNgachAndBacLuong(maNgach, bac);
                if (ngach == null)
                {
                    X.Msg.Alert("Thông báo từ hệ thống", "Không tìm thấy dữ liệu").Show();
                    return;
                }
                hdfRecordID.Text = ngach.PR_KEY.ToString();

                hdfMaNhomNgach.Text = ngach.MaNhomNgach;
                cbxNhomNgach.Text   = ngach.TenNhomNgach;
                hdfMaNgach.Text     = ngach.MaNgach;
                cbxNgach.Text       = ngach.TenNgach;
                hdfBac.Text         = ngach.BacLuong.ToString();
                cbxBac.Text         = "Bậc " + ngach.BacLuong.ToString();
                //txtCap.SetValue(ngach.Cap);
                txtHeSoLuong.SetValue(ngach.HeSoLuong);
                txtMucLuong.SetValue(ngach.MucLuong);
                txtGhiChu.Text = ngach.GhiChu;

                wdThemMoiMucLuongNgach.Title = "Sửa thông tin lương của ngạch";
                wdThemMoiMucLuongNgach.Icon  = Icon.Pencil;
                wdThemMoiMucLuongNgach.Show();
            }
            else
            {
                Dialog.ShowNotification("Thông tin này không được phép thay đổi");
            }
        }
        catch (Exception ex)
        {
            X.Msg.Alert("Thông báo từ hệ thống", "Có lỗi xảy ra: " + ex.Message).Show();
        }
    }
    protected void Cell_Click(object sender, AjaxEventArgs e)
    {
        CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;
        string             mm = string.Format("{0}-{1}", cboYear.SelectedItem.Value, cboMonth.SelectedItem.Value.PadLeft(2, '0'));

        if (sm.SelectedCell.ColIndex <= 5 || sm.SelectedCell.Value.Trim() == "0")
        {
            return;
        }

        switch (sm.SelectedCell.Name.Trim())
        {
        case "DownMineTotal":

            BindDownDetail(mm, sm.SelectedCell.RecordID.Trim());
            winDown.Show();
            break;

        case "DaiBanTotal":

            BindDBDetail(mm, sm.SelectedCell.RecordID.Trim(), "");
            winDaiBan.Show();
            break;

        case "DaiBanZhong":

            BindDBDetail(mm, sm.SelectedCell.RecordID.Trim(), "中班");
            winDaiBan.Show();
            break;

        case "DaiBanZao":

            BindDBDetail(mm, sm.SelectedCell.RecordID.Trim(), "早班");
            winDaiBan.Show();
            break;

        case "DaiBanYe":

            BindDBDetail(mm, sm.SelectedCell.RecordID.Trim(), "夜班");
            winDaiBan.Show();
            break;
        }
    }
    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 + "');");
        //}
    }
Exemple #9
0
    protected void mnuThemMoi_Click(object sender, DirectEventArgs e)
    {
        try
        {
            CellSelectionModel sm      = GridPanel1.SelectionModel.Primary as CellSelectionModel;
            string             maNgach = sm.SelectedCell.RecordID;
            string             tmpBac  = sm.SelectedCell.Name;
            int bac = 0;
            if (tmpBac.StartsWith("Bac"))
            {
                bac = int.Parse(tmpBac.Replace("Bac", "").Trim());
                DM_MUCLUONG_NGACHInfo ngach = new DM_MUCLUONG_NGACHController().GetByMaNgachAndBacLuong(maNgach, bac);
                if (ngach != null)
                {
                    X.Msg.Alert("Thông báo từ hệ thống", "Ngạch: " + ngach.TenNgach + ", bậc " + ngach.BacLuong + " đã có giá trị").Show();
                    return;
                }
                DM_NGACHInfo ng = new DM_NGACHController().GetByMaNgach(maNgach);
                if (ng == null)
                {
                    return;
                }
                hdfMaNhomNgach.Text = ng.MA_NHOM_NGACH;
                cbxNhomNgach.Text   = ng.TEN_NHOM_NGACH;
                hdfMaNgach.Text     = ng.MA_NGACH;
                cbxNgach.Text       = ng.TEN_NGACH;
                hdfBac.Text         = bac.ToString();
                cbxBac.Text         = "Bậc " + bac;

                wdThemMoiMucLuongNgach.Show();
            }
        }
        catch (Exception ex)
        {
            X.Msg.Alert("Thông báo từ hệ thống", "Có lỗi xảy ra: " + ex.Message).Show();
        }
    }
Exemple #10
0
    protected void mnuAddOne_Click(object sender, DirectEventArgs e)
    {
        try
        {
            CellSelectionModel sm    = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;
            DataTable          table = DataController.DataHandler.GetInstance().ExecuteDataTable("TienLuong_LuongKhoan_GetInfoEmployeeByMaCB", "@MaCB", sm.SelectedCell.RecordID);
            if (table.Rows.Count > 0)
            {
                DataRow item = table.Rows[0];
                hdfCanBo.SetValue(item["MA_CB"]);
                cbCanBo.Text = item["HO_TEN"].ToString();
                hdfMaBoPhan.SetValue(item["MA_DONVI"].ToString());
                cbxNgay.SetValue(int.Parse(sm.SelectedCell.Name.Replace("Ngay", "")));
                hdfNgay.SetValue(int.Parse(sm.SelectedCell.Name.Replace("Ngay", "")));
                hdfQDLuong.SetValue(item["LuongCung"]);//LuongDongBH

                // lấy lương cơ bản (lương đóng BH)
                int    thang   = int.Parse(cbxMonth.SelectedItem.Value);
                int    nam     = int.Parse("0" + spnYear.Text);
                double luongcb = new TinhLuongKhoanController().GetLuongDongBH(decimal.Parse(item["PR_KEY"].ToString()), new DateTime(nam, thang, 1));
                if (luongcb == 0)
                {
                    Dialog.ShowNotification("Cán bộ " + item["HO_TEN"].ToString() + " chưa có lương cơ bản");
                }
                // lấy công chuẩn
                double congchuan = new ThietLapCaTheoBoPhanController().GetCongChuan(item["MA_DONVI"].ToString());
                txtLuongCongNhat.SetValue(Math.Round(luongcb / congchuan, 0, MidpointRounding.AwayFromZero));
            }
        }
        catch (Exception ex)
        { }
        finally
        {
            wdLuongKhoanSanXuat.Show();
        }
    }
Exemple #11
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")
        {
            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?MainDeptID={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?MainDeptID={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?MainDeptID={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 "A":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "A级隐患";
            url            = string.Format("YHcondition.aspx?MainDeptID={0}&begin={1}&end={2}&YHLevel={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "A");
            break;

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

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

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

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

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

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

        case "QW":
            Window1.Width  = 890;
            Window1.Height = 400;
            Window1.Title += "轻微三违信息";
            url            = string.Format("SWcondition.aspx?MainDeptID={0}&begin={1}&end={2}&SWLevel={3}", 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?MainDeptID={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?MainDeptID={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 "FXCZG":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "非现场整改隐患";
            url            = string.Format("YHcondition.aspx?MainDeptID={0}&begin={1}&end={2}&status={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "2");
            break;

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

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

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

        case "SJPC":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "上级排查隐患";
            url            = string.Format("YHcondition.aspx?MainDeptID={0}&begin={1}&end={2}&status={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "6");
            break;

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

        case "BGFXW":
            Window1.Width  = 890;
            Window1.Height = 400;
            Window1.Title += "不规范行为三违信息";
            url            = string.Format("SWcondition.aspx?MainDeptID={0}&begin={1}&end={2}&SWLevel={3}", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"), "不规范行为");
            break;
        }
        //url=Server.HtmlEncode(url);
        Ext.DoScript("#{Window1}.load('" + url + "');");
        Window1.Show();
    }
Exemple #12
0
    protected void Cell_Click(object sender, AjaxEventArgs e)
    {
        CellSelectionModel sm = this.GridPanel1.SelectionModel.Primary as CellSelectionModel;

        if (sm.SelectedCell.ColIndex < 5 || 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());
            Window1.Show();
            //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"));
            break;

        case "YH":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "隐患信息";
            url            = string.Format("YHcondition.aspx?PCperson={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 "YXC":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "现场整改隐患信息";
            url            = string.Format("YHcondition.aspx?PCperson={0}&begin={1}&end={2}&status=3", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            Window1.Show();
            break;

        case "FXC":
            Window1.Width  = 840;
            Window1.Height = 422;
            Window1.Title += "非现场整改隐患信息";
            url            = string.Format("YHcondition.aspx?PCperson={0}&begin={1}&end={2}&status=2", sm.SelectedCell.RecordID.Trim(), dfBegin.SelectedDate.ToString("yyyy-MM-dd"), dfEnd.SelectedDate.ToString("yyyy-MM-dd"));
            Window1.Show();
            break;

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

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

        case "SW":
            Window1.Width  = 890;
            Window1.Height = 400;
            Window1.Title += "三违信息";
            url            = string.Format("SWcondition.aspx?PCperson={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 "LOGINCOUNT":
            return;
        }
        if (url != "")
        {
            Window1.ClearContent();
            Ext.DoScript("#{Window1}.load('" + url + "');");
        }
        // Window1.Show();
    }
Exemple #13
0
    protected void btnSua_Click(object sender, DirectEventArgs e)
    {
        try
        {
            int oldRow, oldColumn;
            int month             = int.Parse(cbxMonth.SelectedItem.Value);
            int year              = int.Parse(spnYear.Text);
            CellSelectionModel sm = GridPanel1.SelectionModel.Primary as CellSelectionModel;
            oldRow    = sm.SelectedCell.RowIndex;
            oldColumn = sm.SelectedCell.ColIndex;
            string maCanBo = sm.SelectedCell.RecordID;
            string tmpNgay = sm.SelectedCell.Name;
            int    ngay    = 0;
            if (tmpNgay.StartsWith("Ngay"))
            {
                ngay = int.Parse(tmpNgay.Replace("Ngay", "").Trim());
                DAL.ChamCongKhoanAustfeed vaoRa = new TinhLuongKhoanController().GetByMaCanBoAndDay(maCanBo, ngay, month, year);
                if (vaoRa == null)
                {
                    X.Msg.Alert("Thông báo từ hệ thống", "Không tìm thấy dữ liệu").Show();
                    return;
                }

                hdfCanBo.SetValue(vaoRa.MaCB);
                cbCanBo.SetValue(vaoRa.MaCB);
                hdfNgay.SetValue(ngay);
                cbxNgay.SetValue(ngay);
                txtSoGioDangKy.SetValue(vaoRa.SoGioDangKy);
                txtSoGioLamViec.SetValue(vaoRa.SoGioLamViec);
                txtSoGioCaTo.SetValue(vaoRa.SoGioCaTo);
                txtSanPhamChinh.SetValue(vaoRa.SanPhamChinh);
                txtSanPhamPhu.SetValue(vaoRa.SanPhamPhu);
                txtLuongSanPham.SetValue(vaoRa.LuongSanPham);
                txtLuongCongNhat.SetValue(vaoRa.LuongCongNhat);
                txtLuongHoTro.SetValue(vaoRa.LuongHoTro);
                txtLuongKhac.SetValue(vaoRa.LuongKhac);
                // lấy thông tin lương, mã ca
                try
                {
                    string[] value = sm.SelectedCell.Value.Replace("##", "#").Split('#');
                    hdfQDLuong.Text  = value[5];
                    hdfMaBoPhan.Text = value[6];
                }
                catch (Exception ex)
                {
                }


                cbCanBo.Disabled = true;
                cbxNgay.Disabled = true;
                wdLuongKhoanSanXuat.Show();
                txtSoGioDangKy.Focus();
            }
            else
            {
                Dialog.ShowNotification("Thông tin này không được phép thay đổi");
            }
        }
        catch (Exception ex)
        {
            X.Msg.Alert("Thông báo từ hệ thống", "Có lỗi xảy ra: " + ex.Message).Show();
        }
    }
Exemple #14
0
        /// <summary>
        /// 列表单击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <returns></returns>
        protected void Cell_Click(object sender, DirectEventArgs e)
        {
            CellSelectionModel sm = this.GridRoadManager.SelectionModel.Primary as CellSelectionModel;
            //this.Label1.Html = string.Format("RecordID: {0}<br />Name: {1}<br />Value: {2}<br />Row: {3}<br />Column: {4}", sm.SelectedCell.RecordID, sm.SelectedCell.Name, sm.SelectedCell.Value, sm.SelectedCell.RowIndex.ToString(), sm.SelectedCell.ColIndex.ToString());
            string HTML = "<div class=\"car-location OverCar-Location\" style=\"top:150px; left:400px;\"> " +
                          "<div class=\"items w-220px\">" +
                          "<b class=\"tips-arrow\"></b>" +
                          "<span class=\"car-brand text-center\">106国道400米卡口(疑似)</span>" +
                          "<section class=\"car-img write-bg\">" +
                          " <div class=\"CarIllegal-list\">" +
                          "<ul class=\"data-list-h clearfix \">" +
                          "<li class=\"w-1 font-10 fb\">违法行为</li>" +
                          "<li class=\"w-2 font-10 fb\">数量</li>" +
                          "<li class=\"w-2 font-10 fb\">正常</li>" +
                          "<li class=\"w-2 font-10 fb\">比率</li>" +
                          "</ul>" +
                          "<ul class=\"OverCar-data-list clearfix\">" +
                          "  <li>" +
                          "      <span class=\"w-1 text-center font-10\">超车</span>" +
                          "     <span class=\"w-2 font-10\">1000</span>" +
                          "    <span class=\"w-2 font-10\">400</span>" +
                          "   <span class=\"w-2 font-10\">220%</span>" +
                          "</li>" +
                          "<li>" +
                          " <span class=\"w-1 text-center font-10\">超车</span>" +
                          "  <span class=\"w-2 font-10\">1000</span>" +
                          "   <span class=\"w-2 font-10\">400</span>" +
                          "    <span class=\"w-2 font-10\">220%</span>" +
                          "</li>" +
                          "<li>" +
                          " <span class=\"w-1 text-center font-10\">超车</span>" +
                          "  <span class=\"w-2 font-10\">1000</span>" +
                          "   <span class=\"w-2 font-10\">400</span>" +
                          "    <span class=\"w-2 font-10\">220%</span>" +
                          "</li>" +
                          "<li>" +
                          " <span class=\"w-1 text-center font-10\">超车</span>" +
                          "  <span class=\"w-2 font-10\">1000</span>" +
                          "   <span class=\"w-2 font-10\">400</span>" +
                          "    <span class=\"w-2 font-10\">220%</span>" +
                          "</li>" +
                          "<li>" +
                          " <span class=\"w-1 text-center font-10\">超车</span>" +
                          "  <span class=\"w-2 font-10\">1000</span>" +
                          "   <span class=\"w-2 font-10\">400</span>" +
                          "    <span class=\"w-2 font-10\">220%</span>" +
                          "</li>" +
                          "<li>" +
                          "      <span class=\"w-1 text-center font-10\">超车</span>" +
                          "       <span class=\"w-2 font-10\">1000</span>" +
                          "        <span class=\"w-2 font-10\">400</span>" +
                          "         <span class=\"w-2 font-10\">220%</span>" +
                          "     </li>" +
                          "      <li>" +
                          "            <span class=\"w-1 text-center font-10\">超车</span>" +
                          "             <span class=\"w-2 font-10\">1000</span>" +
                          "              <span class=\"w-2 font-10\">400</span>" +
                          "               <span class=\"w-2 font-10\">220%</span>" +
                          "           </li>" +

                          "          </ul>" +

                          "    </div>" +
                          "   </section>" +
                          " </div>" +
                          "</div>";

            Notice("", HTML);
        }