Пример #1
0
        private void InitOrderStatuList()
        {
            DataTable dt = order_lv1_bll.GetOrderStatu();
            DataRow   dr = dt.NewRow();

            dr["DICT_ID"]      = "00";
            dr["DICT_NAME_CN"] = "无";
            dt.Rows.InsertAt(dr, 0);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (dt.Rows[i]["DICT_NAME_CN"].ToString() == "下达")
                {
                    dt.Rows.Remove(dt.Rows[i]);
                }
            }
            DropDownListState.DataSource    = dt;
            DropDownListState.DataTextField = "DICT_NAME_CN";
            if (CurrentLanguage != "2052")
            {
                DropDownListState.DataTextField = "DICT_NAME_EN";
            }
            DropDownListState.DataValueField = "DICT_ID";
            DropDownListState.DataBind();
            DropDownListState.SelectedValue = "01";
        }
        //清除条件
        private void clearCondition()
        {
            //审核状态
            DropDownListState.ClearSelection();
            DropDownListState.Items[0].Selected = true;

            DropDownListFatherLogic.ClearSelection();
            DropDownListFatherLogic.Items[0].Selected = true;

            DropDownListColour.ClearSelection();
            DropDownListColour.Items[0].Selected = true;
            //入库单编号
            TextBoxCodeWG.Text          = string.Empty;
            TextBoxMCodeWG.Text         = string.Empty;
            TextBoxMNameWG.Text         = string.Empty;
            TextBoxMStandardWG.Text     = string.Empty;
            TextBoxDateWG.Text          = string.Empty;
            TextBoxZDR.Text             = string.Empty;
            TextBoxCAIZHI.Text          = string.Empty;
            TextBoxSum.Text             = string.Empty;
            TextBoxSHnum.Text           = string.Empty;
            TextBoxUprice.Text          = string.Empty;
            drp_xposition.SelectedIndex = 0;
            drp_Warhouse.SelectedIndex  = 0;
            TextBoxVerifier.Text        = string.Empty;
            TextBoxPTC.Text             = string.Empty;
            TextBoxNote.Text            = string.Empty;
            TextBoxStartDate.Text       = string.Empty;
            TextBoxEndDate.Text         = string.Empty;
            TextBoxLotNum.Text          = string.Empty;
        }
        public void BindStates()
        {
            DropDownListState.Items.Clear();

            StateCache           cache     = new StateCache(this.Context);
            int                  countryId = Convert.ToInt32(DropDownListCountry.SelectedValue);
            List <StateProvince> list      = ((List <StateProvince>)cache.Value).FindAll(x => x.CountryId == countryId);

            DropDownListState.DataSource     = list;
            DropDownListState.DataValueField = "StateProvinceId";
            DropDownListState.DataBind();
            DropDownListState.Items.Insert(0, new ListItem("Select State", ""));
        }
Пример #4
0
        //清除条件
        private void clearCondition()
        {
            //审核状态
            DropDownListState.ClearSelection();
            DropDownListState.Items[0].Selected = true;

            //超额数量
            DropDownListcesl.ClearSelection();
            DropDownListcesl.Items[0].Selected = true;

            //红蓝字
            DropDownListColour.ClearSelection();
            DropDownListColour.Items[0].Selected = true;

            DropDownListGJ.ClearSelection();
            DropDownListGJ.Items[0].Selected = true;

            DropDownListHX.ClearSelection();
            DropDownListHX.Items[0].Selected = true;

            DropDownListFatherLogic.ClearSelection();
            DropDownListFatherLogic.Items[0].Selected = true;

            //入库单编号
            TextBoxCodeWG.Text = string.Empty;
            //供应商
            TextBoxSupplierWG.Text = string.Empty;

            TextBoxDateWG.Text    = string.Empty;
            TextBoxStartDate.Text = string.Empty;
            //

            TextBoxMCodeWG.Text     = string.Empty;
            TextBoxMNameWG.Text     = string.Empty;
            TextBoxMStandardWG.Text = string.Empty;
            TextBoxCZ.Text          = string.Empty;
            TextBoxTH.Text          = string.Empty;


            TextBoxMPTCWG.Text = string.Empty;
            TextBoxPH.Text     = string.Empty;
            TextBoxMType.Text  = string.Empty;

            TextBoxZDR.Text       = string.Empty;
            TextBoxClerkWG.Text   = string.Empty;
            TextBoxHDBH.Text      = string.Empty;
            CheckBoxPrint.Checked = false;
        }
Пример #5
0
        public void fillData()
        {
            DropDownListState.DataTextField = objBusinessLayer.BusinessFillState().Columns[0].ToString();
            objDataTableState            = objBusinessLayer.BusinessFillState();
            DropDownListState.DataSource = objDataTableState;
            DropDownListState.DataBind();

            DropDownListPlan.DataTextField = objBusinessLayer.BusinessFillPlan().Columns[0].ToString();
            objDataTablePlan            = objBusinessLayer.BusinessFillPlan();
            DropDownListPlan.DataSource = objDataTablePlan;
            DropDownListPlan.DataBind();

            string lid = objBusinessLayer.BusinessGetLastRe().Rows[0]["PatientId"].ToString();
            long   id  = Convert.ToInt64(lid) + 1;

            lblPatientID.Text = Convert.ToString(id);
        }
Пример #6
0
    public void statedd_bind()
    {
        con.Open();
        SqlDataAdapter adp = new SqlDataAdapter("select Distinct region , regid   from tbcty", con);
        DataSet        ds  = new DataSet();

        adp.Fill(ds);
        DropDownListState.DataSource = ds;

        con.Close();
        ds.Dispose();
        adp.Dispose();
        DropDownListState.DataTextField  = "region";
        DropDownListState.DataValueField = "regid";
        DropDownListState.DataSource     = ds.Tables[0];
        DropDownListState.DataBind();
        DropDownListState.Items.Insert(0, new ListItem("Select Your state", ""));
    }
        /// <summary>
        /// Gets the list of States
        /// </summary>
        private void GetStates()
        {
            string        countryId = DropDownListCountry.SelectedValue;
            SqlDataReader drStates  = DataProvider.GetStates(countryId);

            if (drStates != null && drStates.HasRows)
            {
                DropDownListState.Visible        = true;
                TextBoxState.Visible             = false;
                DropDownListState.DataValueField = "STATE_ID";
                DropDownListState.DataTextField  = "STATE_NAME";
                DropDownListState.DataSource     = drStates;
                DropDownListState.DataBind();
            }
            else
            {
                DropDownListState.Visible = false;
                TextBoxState.Visible      = true;
            }
            drStates.Close();
        }
Пример #8
0
        private void FillStates()
        {
            DataView _dataViewStates = null;

            try
            {
                _dataViewStates                  = Streamline.UserBusinessServices.SharedTables.DataSetStates.Tables[0].DefaultView;
                _dataViewStates.Sort             = "StateName";
                DropDownListState.DataSource     = _dataViewStates;
                DropDownListState.DataTextField  = "StateName";
                DropDownListState.DataValueField = "StateAbbreviation";
                DropDownListState.DataBind();

                DropDownListState.Items.Insert(0, new ListItem("........Select State........", "0"));
                DropDownListState.SelectedIndex = 0;
            }
            catch (Exception ex)
            {
                if (ex.Data["CustomExceptionInformation"] == null)
                {
                    ex.Data["CustomExceptionInformation"] = "";
                }
                else
                {
                    ex.Data["CustomExceptionInformation"] = "";
                }
                if (ex.Data["DatasetInfo"] == null)
                {
                    ex.Data["DatasetInfo"] = null;
                }
                Streamline.BaseLayer.LogManager.LogException(ex, LogManager.LoggingCategory.General, LogManager.LoggingLevel.Error, this);
            }
            finally
            {
                _dataViewStates = null;
            }
        }
Пример #9
0
 //重置
 protected void Reset_Click(object sender, EventArgs e)
 {
     try
     {
         ProjectName2.Reset();
         ProjectName2.Reset();
         DropDownListAgencyP.Reset();
         AcceptUnit2.Reset();
         SourceUnit2.Reset();
         DropDownListProjectSort.Reset();
         DropDownListProjectSortName.Reset();
         DropDownListState.Reset();
         ApprovedMoney2.Reset();
         GetMoney2.Reset();
         DropDownListExpecteResults.Reset();//CooperationForms2.Reset();
         DropDownListProjectLevel.Reset();
         ProjectHeads2.Reset();
         DatePickerStartTime.Reset();
         DatePickerEndTime.Reset();
         DatePickerExpectEndTime.Reset();
         DropDownListExpecteResults.Reset();//ExpecteResults2.Reset();
         GivenMoneyUnits2.Reset();
         DropDownListNature.Reset();
         Remark2.Reset();
         DropDownListSecrecyLevel.Reset();
         ManageMoney.Reset();
         PactNum2.Reset();
         TaskNum2.Reset();
         ProjectManager.Reset();//项目负责人(前三)
         PageContext.RegisterStartupScript("clearFile();");
         PageContext.RegisterStartupScript("clearFiles();");
     }
     catch (Exception ex)
     {
         publicmethod.SaveError(ex, this.Request);
     }
 }
        protected void DropDownListCountry_SelectedIndexChanged(object sender, EventArgs e) //Select all States corresponding to the selected Country
        {
            try
            {
                int CountryId = Convert.ToInt32(DropDownListCountry.SelectedValue);

                using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings[1].ToString()))
                {
                    cn.Open();
                    using (SqlDataAdapter adp = new SqlDataAdapter("Select * from TblState where CountryId=" + CountryId, cn))
                    {
                        DataSet ds = new DataSet();
                        adp.Fill(ds);

                        DropDownListState.DataSource     = ds;
                        DropDownListState.DataValueField = "CountryId";
                        DropDownListState.DataValueField = "StateId";
                        DropDownListState.DataTextField  = "StateName";
                        DropDownListState.DataBind();

                        DropDownListState.Items.Insert(0, new ListItem("------------Select State------------", "0"));

                        if (DropDownListState.SelectedValue == "0")  //If State is not selected then clear City DropDownList and hide the label
                        {
                            lblDisplay.Visible = false;
                            DropDownListCity.Items.Clear();
                            DropDownListCity.Items.Insert(0, new ListItem("-------------Select City-------------", "0"));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Response.Write(ex.Message);
            }
        }
        protected void States()
        {
            StatesCities GetStates = new StatesCities();

            DropDownListState.DataSource     = GetStates.Get_States();
            DropDownListState.DataTextField  = "StateName";
            DropDownListState.DataValueField = "StateID";
            DropDownListState.DataBind();

            ListItem listatesState = new ListItem("Select State", "");

            DropDownListState.Items.Insert(0, listatesState);

            ListItem listatesCity = new ListItem("Select City", "");

            DropDownListCity.Items.Insert(0, listatesCity);

            ListItem listatesBranch = new ListItem("Select Branch", "");

            DropDownListBranch.Items.Insert(0, listatesBranch);

            DropDownListCity.Enabled   = false;
            DropDownListBranch.Enabled = false;
        }