private void BindDropDown()
    {
        #region 绑定用户可管辖的管理片区
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        #endregion

        ddl_Month.DataSource = AC_AccountMonthBLL.GetModelList("");
        ddl_Month.DataBind();
        ddl_Month.SelectedValue = AC_AccountMonthBLL.GetMonthByDate(DateTime.Now).ToString();

        ddl_State.DataSource = DictionaryBLL.GetDicCollections("ORD_OrderDeliveryState");
        ddl_State.DataBind();
        ddl_State.Items.Insert(0, new ListItem("全部", "0"));
    }
예제 #2
0
 private void BindDropDown()
 {
     ddl_CityAttributeFlag.DataSource = DictionaryBLL.GetDicCollections("Addr_OfficialCityAtrribute");
     ddl_CityAttributeFlag.DataBind();
     ddl_CityAttributeFlag.Items.Insert(0, new ListItem("所有", "0"));
     ddl_CityAttributeFlag.SelectedValue = "0";
 }
예제 #3
0
    private void BindDropDown()
    {
        //所属流程
        EWF_Flow_AppBLL app = new EWF_Flow_AppBLL((Guid)ViewState["AppID"]);

        lb_AppName.Text = app.Model.Name;

        // 默认下一环节
        ddl_DefaultNextProcess.DataSource = app.GetProcessList();
        ddl_DefaultNextProcess.DataBind();
        ddl_DefaultNextProcess.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));


        ddl_Type.DataSource = DictionaryBLL.GetDicCollections("EWF_Flow_ProcessType");
        ddl_Type.DataBind();
        ddl_Type.SelectedValue = "6";

        ddl_DataObject_Mail.DataSource = app.GetDataObjectList();
        ddl_DataObject_Mail.DataBind();
        ddl_DataObject_Mail.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_RecipientRole_Mail.DataSource = EWF_RoleBLL.GetModelList("");
        ddl_RecipientRole_Mail.DataBind();
        ddl_RecipientRole_Mail.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));
        ddl_RecipientRole_Mail_SelectedIndexChanged(null, null);
    }
예제 #4
0
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);

        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }

        ddl_CityLevel.DataSource = DictionaryBLL.GetDicCollections("Addr_OrganizeCityLevel");
        ddl_CityLevel.DataBind();
        ddl_CityLevel.Items.Insert(0, new ListItem("请选择", "0"));
        ddl_CityLevel.SelectedValue = "4";

        tr_Position.DataSource  = Org_PositionBLL.GetAllPostion();
        tr_Position.SelectValue = staff.Model.Position.ToString();
    }
예제 #5
0
 public frmReports(int report)
 {
     InitializeComponent();
     _userBLL       = new UserBLL();
     _roleBLL       = new UserRoleBLL();
     _dictionaryBLL = new DictionaryBLL();
     _paymentBLL    = new PaymentBLL();
     _poolBLL       = new PoolBLL();
     if (report == 1)
     {
         lastDate  = DateTime.Now.ToString("yyyy-MM-dd");
         firstDate = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd");
     }
     else if (report == 2)
     {
         lastDate  = DateTime.Now.ToString("yyyy-MM-dd");
         firstDate = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd");
     }
     else
     {
         firstDate         = dtpStartDate.Value.ToShortDateString();
         lastDate          = dtpEndDate.Value.ToShortDateString();
         groupDate.Visible = true;
     }
 }
    private void BindDropDown()
    {
        #region 绑定用户可管辖的管理片区
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        tr_OrganizeCity_Selected(null, null);
        #endregion

        ddl_Month.DataSource = AC_AccountMonthBLL.GetModelList("BeginDate<=GETDATE() AND Year>=" + (DateTime.Today.Year - 1).ToString());
        ddl_Month.DataBind();
        ddl_Month.SelectedValue = AC_AccountMonthBLL.GetMonthByDate(DateTime.Now).ToString();

        ddl_FeeType.DataSource = DictionaryBLL.GetDicCollections("FNA_FeeType").OrderBy(p => p.Value.Name);
        ddl_FeeType.DataBind();
        ddl_FeeType.Items.Insert(0, new ListItem("全部", "0"));

        tr_AccountTitle.SelectValue = "1";
    }
    protected void gv_List_ValueGroup_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            Guid id = (Guid)gv_List_ValueGroup.DataKeys[e.Row.RowIndex][0];

            Rpt_ReportValueGroups c = new Rpt_ReportValueGroupsBLL(id).Model;

            if (c != null)
            {
                DropDownList ddl_StatisticMode = (DropDownList)e.Row.FindControl("ddl_StatisticMode");
                ddl_StatisticMode.DataSource = DictionaryBLL.GetDicCollections("RPT_ValueStatisticMode");
                ddl_StatisticMode.DataBind();
                ddl_StatisticMode.SelectedValue = c.StatisticMode.ToString();
            }

            if (e.Row.RowIndex == 0)
            {
                e.Row.FindControl("bt_Decrease_ValueGroup").Visible = false;
            }

            if (e.Row.RowIndex == new Rpt_ReportBLL((Guid)ViewState["ID"]).GetValueGroups().Count - 1)
            {
                e.Row.FindControl("bt_Increase_ValueGroup").Visible = false;
            }
        }
    }
예제 #8
0
        public JsonResult GetContentJsonResult(string contentUrl)
        {
            IDictionaryBLL iDictionaryBll = new DictionaryBLL();
            string         morningReadingContentJsonString = iDictionaryBll.GetMorningReaderContentJsonString(contentUrl);

            return(Json(morningReadingContentJsonString));
        }
 private void BindDropDown()
 {
     ddl_SalesState.DataSource = DictionaryBLL.GetDicCollections("PDT_SalesState");
     ddl_SalesState.DataBind();
     ddl_SalesState.Items.Insert(0, new ListItem("全部", "0"));
     ddl_SalesState.SelectedValue = "1";
 }
예제 #10
0
 private void BindDropDown()
 {
     rbl_AdjustMode.DataSource = DictionaryBLL.GetDicCollections("FNA_FeeWriteOffAdjustMode");
     rbl_AdjustMode.DataBind();
     ddl_DeductReason.DataSource = DictionaryBLL.GetDicCollections("FNA_DeductReason");
     ddl_DeductReason.DataBind();
 }
예제 #11
0
        public ActionResult MorningReadingParticalView()
        {
            IDictionaryBLL iDictionaryBll = new DictionaryBLL();
            MorningReading morningReading = iDictionaryBll.GetMorningReader();

            return(PartialView("_MorningReading", morningReading));
        }
예제 #12
0
    private void BindDropDown()
    {
        #region 绑定用户可管辖的管理片区
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        #endregion

        int forwarddays = ConfigHelper.GetConfigInt("GiftApplyForwardDays");
        ddl_AccountMonth.DataSource = AC_AccountMonthBLL.GetModelList("EndDate>=GETDATE() AND BeginDate<='" + DateTime.Today.AddDays(forwarddays).ToString("yyyy-MM-dd") +
                                                                      "' AND Year>=" + (DateTime.Today.Year - 1).ToString());
        ddl_AccountMonth.DataBind();
        ddl_AccountMonth.SelectedValue = AC_AccountMonthBLL.GetMonthByDate(DateTime.Now.AddDays(forwarddays)).ToString();


        rbl_Type.DataSource = DictionaryBLL.GetDicCollections("ORD_OrderType");
        rbl_Type.DataBind();
        rbl_Type.SelectedValue = "2";

        ddl_Publish.Items.Insert(0, new ListItem("请选择...", "0"));
        //ddl_Address.Items.Insert(0, new ListItem("请选择...", "0"));
        select_Client.PageUrl = "~/SubModule/CM/PopSearch/Search_SelectClient.aspx?ClientType=2&ExtCondition=\"MCS_SYS.dbo.UF_Spilt(CM_Client.ExtPropertys,~|~,7)=1\"";
    }
    private void BindDropdown()
    {
        #region 绑定用户可管辖的片区
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        #endregion

        ddl_CityLevel.DataSource = DictionaryBLL.GetDicCollections("Addr_OrganizeCityLevel");
        ddl_CityLevel.DataBind();
        ddl_CityLevel.Items.Insert(0, new ListItem("请选择", "0"));
        ddl_CityLevel.SelectedValue = "4";

        ddl_Classify.DataSource = DictionaryBLL.GetDicCollections("PM_PromotorClassify");
        ddl_Classify.DataBind();
        ddl_Classify.Items.Insert(0, new ListItem("不限制类别", "0"));
    }
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);

        tr_Position.DataSource = Org_PositionBLL.GetAllPostion();

        #region 如果非总部职位,其只能选择自己职位及以下职位
        Org_Position p = new Org_PositionBLL(staff.Model.Position).Model;
        if (p != null && p.IsHeadOffice != "Y" && p.Remark != "OfficeHR")
        {
            //tr_Position.RootValue = staff.Model.Position.ToString();// p.SuperID.ToString();
            tr_Position.RootValue   = p.SuperID.ToString();
            tr_Position.SelectValue = staff.Model.Position.ToString();
        }
        else
        {
            tr_Position.RootValue = "1";
            //tr_Position.SelectValue = "1";
        }
        tr_Position.SelectValue = tr_Position.RootValue;
        #endregion
        ddl_ApproveFlag.DataSource = DictionaryBLL.GetDicCollections("PUB_ApproveFlag");
        ddl_ApproveFlag.DataBind();
        ddl_ApproveFlag.Items.Insert(0, new ListItem("请选择", "0"));
    }
    private void BindDropDown()
    {
        // 默认下一环节
        EWF_Flow_AppBLL app = new EWF_Flow_AppBLL((Guid)ViewState["AppID"]);

        lb_AppName.Text = app.Model.Name;

        ddl_DefaultNextProcess.DataSource = app.GetProcessList();
        ddl_DefaultNextProcess.DataBind();
        ddl_DefaultNextProcess.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_Type.DataSource = DictionaryBLL.GetDicCollections("EWF_Flow_ProcessType");
        ddl_Type.DataBind();
        ddl_Type.SelectedValue = "8";

        ddl_OrganizeCityLevel.DataSource = DictionaryBLL.GetDicCollections("Addr_OrganizeCityLevel");
        ddl_OrganizeCityLevel.DataBind();
        ddl_OrganizeCityLevel.Items.Insert(0, new ListItem("发起人所在级别", "0"));

        ddl_DataObject_OrganizeCityID.DataSource = app.GetDataObjectList();
        ddl_DataObject_OrganizeCityID.DataBind();
        ddl_DataObject_OrganizeCityID.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_DataObject_OrganizeCityName.DataSource = app.GetDataObjectList();
        ddl_DataObject_OrganizeCityName.DataBind();
        ddl_DataObject_OrganizeCityName.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));
    }
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);

        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        tr_OrganizeCity_Selected(null, null);

        ddl_BeginMonth.DataSource = AC_AccountMonthBLL.GetModelList("BeginDate<DateAdd(month,1,GetDate()) AND Year>=" + (DateTime.Today.Year - 1).ToString());
        ddl_BeginMonth.DataBind();
        ddl_BeginMonth.SelectedValue = AC_AccountMonthBLL.GetMonthByDate(DateTime.Now.AddMonths(-3)).ToString();

        ddl_EndMonth.DataSource = AC_AccountMonthBLL.GetModelList("BeginDate<DateAdd(month,1,GetDate()) AND Year>=" + (DateTime.Today.Year - 1).ToString());
        ddl_EndMonth.DataBind();
        ddl_EndMonth.SelectedValue = AC_AccountMonthBLL.GetMonthByDate(DateTime.Now.AddMonths(1)).ToString();

        rbl_ApproveFlag.DataSource = DictionaryBLL.GetDicCollections("PUB_ApproveFlag");
        rbl_ApproveFlag.DataBind();
        rbl_ApproveFlag.Items.Insert(0, new ListItem("所有", "0"));
        rbl_ApproveFlag.SelectedValue = "0";
    }
예제 #17
0
    private void BindDropdown()
    {
        #region 绑定用户可管辖的片区
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();


        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        #endregion


        ddl_AccountMonth.DataSource = AC_AccountMonthBLL.GetModelList("");
        ddl_AccountMonth.DataBind();
        ddl_AccountMonth.SelectedValue = (AC_AccountMonthBLL.GetCurrentMonth() - 1).ToString();

        ddl_ApproveFlag.DataSource = DictionaryBLL.GetDicCollections("PUB_ApproveFlag");
        ddl_ApproveFlag.DataBind();
        ddl_ApproveFlag.Items.Insert(0, new ListItem("所有", "0"));
    }
예제 #18
0
    private void BindDropDown()
    {
        ddl_JournalType.DataSource = DictionaryBLL.GetDicCollections("OA_JournalType");
        ddl_JournalType.DataBind();

        ddl_WorkingClassify.DataSource = DictionaryBLL.GetDicCollections("OA_WorkingClassify");
        ddl_WorkingClassify.DataBind();
        ddl_WorkingClassify.Items.Insert(0, new ListItem("请选择...", "0"));

        for (int i = 0; i < 24; i++)
        {
            ddl_BeginHour.Items.Add(new ListItem(i.ToString("d2"), i.ToString("d2")));
            ddl_EndHour.Items.Add(new ListItem(i.ToString("d2"), i.ToString("d2")));
        }
        ddl_BeginHour.SelectedValue = "08";
        ddl_EndHour.SelectedValue   = "17";

        DropDownList ddl_OpponentBrand1 = (DropDownList)pl_detail.FindControl("JN_Journal_OpponentBrand1");

        ddl_OpponentBrand1.DataTextField  = "Name";
        ddl_OpponentBrand1.DataValueField = "ID";
        ddl_OpponentBrand1.DataSource     = PDT_BrandBLL.GetModelList("IsOpponent=2");
        ddl_OpponentBrand1.DataBind();
        ddl_OpponentBrand1.Items.Insert(0, new ListItem("请选择...", "0"));

        DropDownList ddl_OpponentBrand2 = (DropDownList)pl_detail.FindControl("JN_Journal_OpponentBrand2");

        ddl_OpponentBrand2.DataTextField  = "Name";
        ddl_OpponentBrand2.DataValueField = "ID";
        ddl_OpponentBrand2.DataSource     = PDT_BrandBLL.GetModelList("IsOpponent=2");
        ddl_OpponentBrand2.DataBind();
        ddl_OpponentBrand2.Items.Insert(0, new ListItem("请选择...", "0"));
    }
    protected string GetJXCQuantityString(int product, string FieldName)
    {
        int       quantity = 0;
        DataTable dt       = ViewState["Limit"] as DataTable;

        if (dt.Select("Product=" + product.ToString()).Count() > 0)
        {
            quantity = Convert.ToInt32(dt.Select("Product=" + product.ToString())[0][FieldName]);
        }
        PDT_Product p        = new PDT_ProductBLL(product).Model;
        string      packing1 = DictionaryBLL.GetDicCollections("PDT_Packaging")[p.TrafficPackaging.ToString()].ToString();
        string      packing2 = DictionaryBLL.GetDicCollections("PDT_Packaging")[p.Packaging.ToString()].ToString();

        string ret = "";

        if (quantity / p.ConvertFactor != 0)
        {
            ret += (quantity / p.ConvertFactor).ToString() + packing1 + " ";
        }
        if (quantity % p.ConvertFactor != 0)
        {
            ret += (quantity % p.ConvertFactor).ToString() + packing2 + " ";
        }
        return(ret);
    }
예제 #20
0
    private void BindDropDown()
    {
        IList <EWF_Flow_App> apps = EWF_Flow_AppBLL.GetModelList(" EnableFlag='Y' ");

        ddl_App.DataSource = apps;
        ddl_App.DataBind();
        ddl_App.Items.Insert(0, new ListItem("请选择...", "0"));

        #region 绑定当前操作员所能查看的管理片区
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"], true);
        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        #endregion

        ddl_FinishStatus.DataSource = DictionaryBLL.GetDicCollections("EWF_Flow_FinishStatus");
        ddl_FinishStatus.DataBind();
        ddl_FinishStatus.Items.Insert(0, new ListItem("全部", "0"));
    }
예제 #21
0
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"], true);

        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        ddl_FLType.DataSource = DictionaryBLL.GetDicCollections("RT_FLType");
        ddl_FLType.DataBind();
        ddl_FLType.Items.Insert(0, new ListItem("全部", "0"));

        ddl_FLTypeDetail.DataSource = DictionaryBLL.GetDicCollections("RT_FLType");
        ddl_FLTypeDetail.DataBind();

        ddl_Month.DataSource = AC_AccountMonthBLL.GetModelList("Year>=" + (DateTime.Now.Year - 1).ToString());
        ddl_Month.DataBind();
        ddl_Month.SelectedValue = "0";
        if (ViewState["AccountMonth"] != null)
        {
            ddl_Month.SelectedValue = ViewState["AccountMonth"].ToString();
        }
    }
    private void BindDropDown()
    {
        #region 绑定用户可管辖的管理片区
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        #endregion

        select_Staff.SelectText  = staff.Model.RealName;
        select_Staff.SelectValue = staff.Model.ID.ToString();

        ddl_Transport.DataSource = DictionaryBLL.GetDicCollections("FNA_EvectionTransport");
        ddl_Transport.DataBind();
        ddl_Transport.Items.Insert(0, new ListItem("请选择...", "0"));

        ddl_Car.DataSource = Car_CarListBLL.GetCarListByOrganizeCity(staff.Model.OrganizeCity);
        ddl_Car.DataBind();
        ddl_Car.Items.Insert(0, new ListItem("请选择", "0"));
    }
예제 #23
0
    private void BindDropDown()
    {
        #region 绑定用户可管辖的管理片区
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        #endregion

        ddl_BeginMonth.DataSource = AC_AccountMonthBLL.GetModelList("BeginDate<GETDATE() AND Year>=" + (DateTime.Today.Year - 1).ToString());
        ddl_BeginMonth.DataBind();
        ddl_BeginMonth.SelectedValue = AC_AccountMonthBLL.GetMonthByDate(DateTime.Now.AddMonths(-3)).ToString();

        ddl_EndMonth.DataSource = AC_AccountMonthBLL.GetModelList("BeginDate<GETDATE() AND Year>=" + (DateTime.Today.Year - 1).ToString());
        ddl_EndMonth.DataBind();
        ddl_EndMonth.SelectedValue = AC_AccountMonthBLL.GetMonthByDate(DateTime.Now).ToString();

        ddl_State.DataSource = DictionaryBLL.GetDicCollections("ORD_OrderDeliveryState");
        ddl_State.DataBind();
        ddl_State.Items.Insert(0, new ListItem("全部", "0"));

        rbl_ApproveFlag.DataSource = DictionaryBLL.GetDicCollections("PUB_ApproveFlag");
        rbl_ApproveFlag.DataBind();
        rbl_ApproveFlag.Items.Insert(0, new ListItem("所有", "0"));
        rbl_ApproveFlag.SelectedValue = "0";
    }
    private void BindDropDown()
    {
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"], true);

        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }

        ddl_Month.DataSource = AC_AccountMonthBLL.GetModelList("BeginDate<GETDATE() AND Year>=" + (DateTime.Today.Year - 1).ToString());
        ddl_Month.DataBind();
        ddl_Month.SelectedValue = AC_AccountMonthBLL.GetCurrentMonth().ToString();

        ddl_FeeType.DataSource = DictionaryBLL.GetDicCollections("FNA_FeeType").OrderBy(p => p.Value.Name);
        ddl_FeeType.DataBind();
        ddl_FeeType.Items.Insert(0, new ListItem("全部", "0"));

        ddl_ExtraType.DataSource = DictionaryBLL.GetDicCollections("FNA_BudgetExtraType").OrderBy(p => p.Value.Name);
        ddl_ExtraType.DataBind();
        ddl_ExtraType.Items.Insert(0, new ListItem("全部", "0"));
    }
    private void BindDropDown()
    {
        EWF_Flow_AppBLL app = new EWF_Flow_AppBLL((Guid)ViewState["AppID"]);

        lb_AppName.Text = app.Model.Name;

        // 默认下一环节
        ddl_DefaultNextProcess.DataSource = app.GetProcessList();
        ddl_DefaultNextProcess.DataBind();
        ddl_DefaultNextProcess.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        //环节类型
        ddl_Type.DataSource = DictionaryBLL.GetDicCollections("EWF_Flow_ProcessType");
        ddl_Type.DataBind();
        this.ddl_Type.SelectedValue = "3";

        ddl_RecipientRole_Decision.DataSource = EWF_RoleBLL.GetModelList("");
        ddl_RecipientRole_Decision.DataBind();
        ddl_RecipientRole_Decision.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_DataObject_Decision.DataSource = app.GetDataObjectList();
        ddl_DataObject_Decision.DataBind();
        ddl_DataObject_Decision.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_PositiveNextProcess.DataSource = app.GetProcessList();
        ddl_PositiveNextProcess.DataBind();
        ddl_PositiveNextProcess.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));

        ddl_NegativeNextProcess.DataSource = app.GetProcessList();
        ddl_NegativeNextProcess.DataBind();
        ddl_NegativeNextProcess.Items.Insert(0, new ListItem("请选择...", Guid.Empty.ToString()));
    }
    private void BindDropDown()
    {
        #region 绑定用户可管辖的管理片区
        Org_StaffBLL staff = new Org_StaffBLL((int)Session["UserID"]);
        tr_OrganizeCity.DataSource = staff.GetStaffOrganizeCity();

        if (tr_OrganizeCity.DataSource.Select("ID = 1").Length > 0)
        {
            tr_OrganizeCity.RootValue   = "0";
            tr_OrganizeCity.SelectValue = "1";
        }
        else
        {
            tr_OrganizeCity.RootValue   = new Addr_OrganizeCityBLL(staff.Model.OrganizeCity).Model.SuperID.ToString();
            tr_OrganizeCity.SelectValue = staff.Model.OrganizeCity.ToString();
        }
        #endregion

        rbl_Type.DataSource = DictionaryBLL.GetDicCollections("ORD_OrderType");
        rbl_Type.DataBind();
        rbl_Type.SelectedValue = "2";

        double DelayDays = Convert.ToDouble(System.Configuration.ConfigurationManager.AppSettings["OrderDelayDays"]);
        ddl_AccountMonth.DataSource = AC_AccountMonthBLL.GetModelList("");
        ddl_AccountMonth.DataBind();
        ddl_AccountMonth.SelectedValue = AC_AccountMonthBLL.GetMonthByDate(DateTime.Now.AddDays(-DelayDays)).ToString();

        ddl_Publish.Items.Insert(0, new ListItem("请选择...", "0"));
    }
예제 #27
0
        private void btnXoa_Click(object sender, EventArgs e)
        {
            string Key         = "";
            string Meaning     = "";
            string Explanation = "";

            if (cbWord.Text.ToString() != "")
            {
                Key = cbWord.Text;
            }
            if (tbMeanning.Text.ToString() != "")
            {
                Meaning = tbMeanning.Text;
            }
            if (tbExplanation.Text.ToString() != "")
            {
                Explanation = tbExplanation.Text;
            }
            dicData = new DictionaryData();
            dicData.setUp(Key, Meaning, Explanation);

            dicBLL = new DictionaryBLL();
            dicBLL.Xoa(dicData);

            dictionary = new DictionaryManager();
            dictionary.LoadDataToCombobox(cbWord);
        }
예제 #28
0
    private void LoadFromUsableBudget()
    {
        int city  = int.Parse(tr_FromOrganizeCity.SelectValue);
        int month = int.Parse(ddl_FromMonth.SelectedValue);

        if (city > 0)
        {
            IList <FNA_BudgetBalance> balances = FNA_BudgetBalanceBLL.GetModelList("OrganizeCity=" + city.ToString() +
                                                                                   " AND AccountMonth=" + month.ToString() + " ORDER BY FeeType");

            #region 根据费用类型加上余额中没有的类型,以便支持从下级向上调回该费用类型的预算额度
            Dictionary <string, Dictionary_Data> dicFeetype = DictionaryBLL.GetDicCollections("FNA_FeeType");
            foreach (Dictionary_Data dic in dicFeetype.Values)
            {
                if (balances.FirstOrDefault(p => p.FeeType == int.Parse(dic.Code)) == null)
                {
                    FNA_BudgetBalance balance = new FNA_BudgetBalance();
                    balance.AccountMonth      = month;
                    balance.OrganizeCity      = city;
                    balance.FeeType           = int.Parse(dic.Code);
                    balance.CostBalance       = 0;
                    balance.DDFInitialBalance = 0;
                    balances.Add(balance);
                }
            }
            #endregion

            gv_FromBalance.BindGrid(balances);
        }
    }
    protected void rbl_RelationType_SelectedIndexChanged(object sender, EventArgs e)
    {
        switch (rbl_RelationType.SelectedValue)
        {
        case "1":
            tr_1.Visible = true;
            tr_2.Visible = false;
            ddl_RelationTableName.DataTextField  = "Name";
            ddl_RelationTableName.DataValueField = "TableName";
            ddl_RelationTableName.DataSource     = DictionaryBLL.Dictionary_Type_GetAllList();
            ddl_RelationTableName.DataBind();
            break;

        case "2":
            tr_1.Visible = true;
            tr_2.Visible = true;
            ddl_RelationTableName.DataTextField  = "DisplayName";
            ddl_RelationTableName.DataValueField = "Name";
            ddl_RelationTableName.DataSource     = new UD_TableListBLL()._GetModelList("");
            ddl_RelationTableName.DataBind();
            ddl_RelationTableName_SelectedIndexChanged(null, null);
            break;

        case "3":
            tr_1.Visible = false;
            tr_2.Visible = false;
            break;
        }
    }
    private void BindGrid()
    {
        //try
        {
            Dictionary <string, MCSFramework.Model.Dictionary_Data> li = DictionaryBLL.GetDicCollections(int.Parse(ddl_DicType.SelectedValue), false);

            if (ViewState["Page"] != null)
            {
                gv_List.PageIndex = (int)ViewState["Page"];
            }

            gv_List.DataSource = li.Values;
            gv_List.DataBind();

            lb_rowcount.Text = li.Count.ToString();
            tbx_PageGo.Text  = (gv_List.PageIndex + 1).ToString();

            tbx_name.Text           = "";
            tbx_SelfNo.Text         = "";
            bt_Save.Text            = "添 加";
            bt_Save.ForeColor       = System.Drawing.Color.Black;
            ViewState["SelectedID"] = Guid.Empty;
        }
        //catch { }
    }
    protected void bt_Save_Click(object sender, System.EventArgs e)
    {
        DictionaryBLL dbl;
        Guid selectedid = (Guid)ViewState["SelectedID"];

        if (selectedid == Guid.Empty)
            dbl = new DictionaryBLL();
        else
            dbl = new DictionaryBLL(selectedid);

        dbl.Model.Type = int.Parse(this.ddl_DicType.SelectedValue);
        dbl.Model.Name = tbx_name.Text;
        dbl.Model.Code = this.tbx_SelfNo.Text;
        dbl.Model.Enabled = cb_Enabled.Checked ? "Y" : "N";
        dbl.Model.Description = tbx_Description.Text;

        if (selectedid == Guid.Empty)//添加
        {
            try
            {
                dbl.Model.InsertUser = Session["UserName"].ToString();
                if (dbl.Add() < 0)
                    MessageBox.Show(this, "您使用的自定义编号已被使用,请更改!");
            }
            catch
            {
                MessageBox.Show(this, "数据库执行出错!");
                return;
            }
        }
        else//修改
        {
            try
            {
                dbl.Model.UpdateUser = Session["UserName"].ToString();
                if (dbl.Update() < 0)
                    MessageBox.Show(this, "您使用的自定义编号已被使用或该信息正在业务中使用!");
            }
            catch
            {
                MessageBox.Show(this, "数据库执行出错!");
                return;
            }
        }

        DataCache.RemoveCache("Cache-Dictionary_Data-Enabled-" + true.ToString());
        DataCache.RemoveCache("Cache-Dictionary_Data-Enabled-" + false.ToString());
        BindGrid();
    }
    protected void gv_List_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
    {
        Guid id = (Guid)gv_List.DataKeys[e.NewSelectedIndex]["ID"];

        DictionaryBLL bll = new DictionaryBLL(id);

        if (bll.Model.ID != Guid.Empty)
        {
            bt_Save.Text = "修改";
            bt_Save.ForeColor = System.Drawing.Color.Red;

            tbx_SelfNo.Text = bll.Model.Code;
            tbx_name.Text = bll.Model.Name;
            cb_Enabled.Checked = (bll.Model.Enabled == "Y");
            tbx_Description.Text = bll.Model.Description;

            ViewState["SelectedID"] = id;
        }
    }