Exemple #1
0
 private void SearchClear()
 {
     ViewState["SortDirection"] = "ASC";
     MVAttribute.SetActiveView(VWSearch);
     txtSearch.Text = string.Empty;
     SearchGridFill();
 }
 public void SearchClear()
 {
     MVAttribute.SetActiveView(VWSearch);
     txtGroupName.Text    = string.Empty;
     chkbxStatus.Checked  = false;
     ViewState["GroupId"] = null;
     SearchGridFill();
 }
 public void Clear()
 {
     MVAttribute.SetActiveView(VWAdd);
     BindAttributes(-2);
     txtGroupName.Text    = string.Empty;
     chkbxStatus.Checked  = true;
     ViewState["GroupId"] = null;
     //  lblMsgGroupName.Visible = false;
     txtGroupName.Focus();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         MVAttribute.SetActiveView(VWSearch);
         if (!IsPostBack)
         {
             ViewState["SortDirection"] = "DESC";
             SearchGridFill();
         }
     }
 }
Exemple #5
0
        //public void GetAttributeList(int CurrentIndex)
        //{
        //    if (grdAttribute.Rows.Count > 0)
        //    {
        //        Clear();
        //        GridViewRow row = grdAttribute.Rows[0];
        //        Label txtAttributeIdItem = (Label)grdAttribute.Rows[CurrentIndex].FindControl("lblAttributeId");
        //        Label txtAttributeNameItem = (Label)grdAttribute.Rows[CurrentIndex].FindControl("lblAttributeName");
        //        Label lblAttributeTypeItem = (Label)grdAttribute.Rows[CurrentIndex].FindControl("lblAttributeType");
        //        CheckBox chkAttributeStatusItem = (CheckBox)grdAttribute.Rows[CurrentIndex].FindControl("chkAttributeStatus");
        //        Label lblDescription = (Label)grdAttribute.Rows[CurrentIndex].FindControl("lblDescription");
        //        HiddenField hfStyle = (HiddenField)grdAttribute.Rows[CurrentIndex].FindControl("hfStyle");
        //        HiddenField hfDefaultVal = (HiddenField)grdAttribute.Rows[CurrentIndex].FindControl("hfDefaultVal");
        //        HiddenField hfDefaultValFlag = (HiddenField)grdAttribute.Rows[CurrentIndex].FindControl("hfDefaultValFlag");
        //        HiddenField hfValueMan = (HiddenField)grdAttribute.Rows[CurrentIndex].FindControl("hfIsValueMandatory");
        //        HiddenField hfInhMan = (HiddenField)grdAttribute.Rows[CurrentIndex].FindControl("hfIsInhMandatory");
        //        ViewState["AttributeId"] = txtAttributeIdItem.Text;
        //        txtAttributeName.Text = txtAttributeNameItem.Text;
        //        ddlAttributeType.SelectedItem.Text = lblAttributeTypeItem.Text;
        //        chkAttributeStatus.Checked = chkAttributeStatusItem.Checked;
        //        txtDescription.Text = lblDescription.Text;
        //        ddlStyle.SelectedValue = hfStyle.Value;
        //        if (hfDefaultValFlag.Value == "True")
        //        {
        //            chkDefault.Checked = true;
        //            txtDefaultValue.Text = hfDefaultVal.Value;
        //        }
        //        else
        //        {
        //            chkDefault.Checked = false;
        //            defaultVal.Visible = false;
        //        }
        //        if (hfValueMan.Value == "True")
        //        {
        //            chkValMan.Checked = true;
        //        }
        //        if (hfInhMan.Value == "True")
        //        {
        //            chkInhMand.Checked = true;
        //        }
        //        string a = string.Empty;
        //        AttributeService.AttributeSettingsClient oClient = new AttributeService.AttributeSettingsClient(ServiceConfig.AttributeSettingsDataEndPoint(), ServiceConfig.AttributeSettingsDataUri());
        //        AttributeService.AttributeSettingsData oAttributeSettingsData = new AttributeSettingsData();
        //        List<AttributeSettingsData> AttributeSettingsDataTemp = new List<AttributeSettingsData>();
        //        AttributeSettingsDataTemp = oClient.GetAttributesListValues(ViewState["AttributeId"].ToString().ToInt());

        //        if (AttributeSettingsDataTemp.Count > 0)
        //        {
        //            string strText = string.Empty;
        //            for (int i = 0; i < AttributeSettingsDataTemp.Count; i++)
        //            {
        //                strText += AttributeSettingsDataTemp[i].ListVal + "\n";
        //            }
        //            txtListValues.Text = strText;
        //            listVal.Visible = true;
        //            txtListValues.Visible = true;
        //        }
        //    }
        //}
        private void FillDetails()
        {
            MVAttribute.SetActiveView(VWAdd);
            FillStyle();
            AttributeService.AttributeSettingsClient oClient = new AttributeService.AttributeSettingsClient(ServiceConfig.AttributeSettingsDataEndPoint(), ServiceConfig.AttributeSettingsDataUri());
            AttributeService.AttributeSettingsData   oAttributeSettingsData    = new AttributeSettingsData();
            List <AttributeSettingsData>             AttributeSettingsDataTemp = new List <AttributeSettingsData>();

            AttributeSettingsDataTemp = oClient.GetAttributeListById(ViewState["AttributeId"].ToString());
            if (AttributeSettingsDataTemp.Count > 0)
            {
                ViewState["LibraryId"]             = AttributeSettingsDataTemp[0].LibraryId;
                txtAttributeName.Text              = AttributeSettingsDataTemp[0].AttributeName;
                ddlAttributeType.SelectedItem.Text = AttributeSettingsDataTemp[0].AttributeType;
                chkAttributeStatus.Checked         = AttributeSettingsDataTemp[0].AttributeStatus;
                txtDescription.Text    = AttributeSettingsDataTemp[0].Description;
                ddlStyle.SelectedValue = AttributeSettingsDataTemp[0].StyleVal;
                if (AttributeSettingsDataTemp[0].DefaultValFlag)
                {
                    chkDefault.Checked   = true;
                    txtDefaultValue.Text = AttributeSettingsDataTemp[0].DefaultVal;
                }
                else
                {
                    chkDefault.Checked    = false;
                    DivdefaultVal.Visible = false;
                }
                if (AttributeSettingsDataTemp[0].IsValueMandatory)
                {
                    chkValMan.Checked = true;
                }
                if (AttributeSettingsDataTemp[0].IsInhMandatory)
                {
                    chkInhMand.Checked = true;
                }
                string a = string.Empty;
                AttributeService.AttributeSettingsClient oClientd = new AttributeService.AttributeSettingsClient(ServiceConfig.AttributeSettingsDataEndPoint(), ServiceConfig.AttributeSettingsDataUri());
                AttributeService.AttributeSettingsData   oAttributeSettingsDatad       = new AttributeSettingsData();
                List <AttributeSettingsData>             AttributeSettingsDataTempList = new List <AttributeSettingsData>();
                AttributeSettingsDataTempList = oClient.GetAttributesListValues(ViewState["AttributeId"].ToString().ToInt());
                if (AttributeSettingsDataTempList.Count > 0)
                {
                    string strText = string.Empty;
                    for (int i = 0; i < AttributeSettingsDataTempList.Count; i++)
                    {
                        strText += AttributeSettingsDataTempList[i].ListVal + "\n";
                    }
                    txtListValues.Text    = strText;
                    listVal.Visible       = true;
                    txtListValues.Visible = true;
                }
            }
        }
Exemple #6
0
 private void Clear()
 {
     MVAttribute.SetActiveView(VWAdd);
     txtAttributeName.Text          = string.Empty;
     txtDescription.Text            = string.Empty;
     ddlAttributeType.SelectedIndex = 0;
     chkAttributeStatus.Checked     = true;
     txtAttributeName.Focus();
     FillStyle();
     ddlStyle.SelectedIndex   = 0;
     txtListValues.Text       = string.Empty;
     txtDefaultValue.Text     = string.Empty;
     listVal.Visible          = false;
     chkInhMand.Checked       = false;
     chkValMan.Checked        = false;
     chkDefault.Checked       = false;
     ViewState["LibraryId"]   = 0;
     ViewState["AttributeId"] = null;
     chkDefault.Checked       = false;
     DivdefaultVal.Visible    = false;
 }