Exemplo n.º 1
0
        public void newFieldsMembers()
        {
            ViewModel.Search searchCompanyFormember = new ViewModel.Search();
            searchCompanyFormember.Filter = " and tblLegalUser.IDUser = '******'";
            DataSet ds = BisLegalUser.GetSupplierData(searchCompanyFormember);

            CasscadDropDownCountryPersonelSupplier.CleanDropDowns();
            txtFName.Text = "";
            txtLName.Text = "";
            txtDescriptionRealUser.Text    = "";
            txtDescription_EnRealUser.Text = "";

            txtMemberMeliCode.Text       = "";
            txtMemberIdentifyNumber.Text = "";
            txtMemberWebsite.Text        = "";
            lblOrganizationPost.Text     = "";
            if (tvOrganizationPost.SelectedNode != null)
            {
                tvOrganizationPost.SelectedNode.Selected = false;
            }
            chkMemberActive.Checked = true;
            rbSex.SelectedValue     = "0";//مرد
            divMembers.Visible      = true;
            divTableMembers.Visible = false;
        }
Exemplo n.º 2
0
        protected void grdMember_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            Guid IDRealUser = e.CommandArgument.ToString().StringToGuid();

            switch (e.CommandName)
            {
            case "Edit":
                try
                {
                    divMembers.Visible      = true;
                    divTableMembers.Visible = false;

                    hfIDRealUser.Value = IDRealUser.ToString();
                    ViewModel.Search RealUserSearch = new ViewModel.Search();
                    RealUserSearch.Filter = " and tblRealUser.IDUser ='******'";

                    DataSet ds = BisRealUser.GetRealUserSupplierData(RealUserSearch);
                    if (!ds.Null_Ds())
                    {
                        CasscadDropDownCountryPersonelSupplier.SetDropDownsFromEdit(ds.ReturnDataSetField("IDCity"));

                        txtFName.Text                  = ds.ReturnDataSetField("FName");
                        txtLName.Text                  = ds.ReturnDataSetField("LName");
                        chkMemberActive.Checked        = ds.ReturnDataSetField("Active").StringToBool();
                        txtDescriptionRealUser.Text    = ds.ReturnDataSetField("Description_Fa");
                        txtDescription_EnRealUser.Text = ds.ReturnDataSetField("Description_En");
                        txtMemberWebsite.Text          = ds.ReturnDataSetField("WebSite");
                        txtMemberIdentifyNumber.Text   = ds.ReturnDataSetField("IdentifyNumber");
                        txtMemberMeliCode.Text         = ds.ReturnDataSetField("NationalCode");
                        lblOrganizationPost.Text       = GenerateOrganizationalPosition(ds.ReturnDataSetField("IDOrganizationPosition"));
                        tvOrganizationPost.SelectedNodeExtension(ds.ReturnDataSetField("IDOrganizationPosition"));

                        if (ds.ReturnDataSetField("Sex") == "True")
                        {
                            rbSex.SelectedValue = "1";    //زن
                        }
                        else
                        {
                            rbSex.SelectedValue = "0";     //مرد
                        }
                        hfModeRealUser.Value    = "Edit";
                        divMembers.Visible      = true;
                        divTableMembers.Visible = false;
                    }
                    else
                    {
                        ScriptManager.RegisterStartupScript(this, GetType(), "ErrorMessage", "alert('اشکال در واکشی اطلاعات!');", true);
                    }
                }
                catch
                {
                    ScriptManager.RegisterStartupScript(this, GetType(), "ErrorMessage", "alert('اشکال در برقراری ارتباط با دیتابیس!');", true);
                }
                break;
            }
        }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Form.Attributes.Add("enctype", "multiPart/form-data");
     if (!Page.IsPostBack)
     {
         //btnAddMember.Attributes.Add("OnClientClick", "javascript:return validateMember()");
         btnAdd.Attributes.Add("onclick", "javascript:return validateCompany()");
         //setConfigCkEditor();
         hfMode.Value = "New";
         fillGrdLegalUser();
         divMembers.Visible      = false;
         divTableMembers.Visible = false;
         divInfo.Visible         = false;
         filltvOrganizationalPosition();
         CasscadDropDownCountryLegalSupplier.fillCountry();
         CasscadDropDownCountryPersonelSupplier.fillCountry();
     }
 }