Exemplo n.º 1
0
 public ctrlRetailCluster(int pstateid, string pusercode)
 {
     loginstateid = pstateid;
     loginuser    = pusercode;
     rs           = new RetailClusterSource(loginstateid, pusercode);
     InitializeComponent();
     this.DataContext = rs;
 }
Exemplo n.º 2
0
 public ctrlGroupList(int pstateid, string pusercode)
 {
     loginstateid = pstateid;
     loginuser    = pusercode;
     rs           = new RetailClusterSource(loginstateid, pusercode);
     InitializeComponent();
     this.DataContext = rs;
     btnSearch_Click(null, null);
 }
 public ctrlConfigureQAToCluster(int pstateid, string pusercode, string configuretype)
 {
     loginstateid = pstateid;
     loginuser    = pusercode;
     configType   = configuretype;
     rs           = new RetailClusterSource(loginstateid, pusercode);
     InitializeComponent();
     this.DataContext = rs;
     rs.LoadSuppliers(loginstateid);
     rs.LoadQuestions(loginstateid);
 }
        public frmConfigureSupplierQAToCluster(int pstateid, object source, string pusercode, string configuretype)
        {
            loginstateid = pstateid;
            configType   = configuretype;
            if (configuretype.ToUpper() == "RETAILCLUSTER")
            {
                rcluster  = (RetailClusterSource.RetailCluster)source;
                clusterid = rcluster.RetailClusterID;
                id        = clusterid.ToString();
            }
            else if (configuretype.ToUpper() == "GROUP")
            {
                group   = (RetailClusterSource.Group)source;
                groupid = group.GroupID;
                id      = groupid.ToString();
            }

            rs = new RetailClusterSource(loginstateid, pusercode);
            InitializeComponent();
            if (configuretype.ToUpper() == "RETAILCLUSTER")
            {
                txtclustername.Text = txtclustername.Text + "Retail Clusters -  " + rcluster.RetailClusterName;
                btnConfig.Content   = "Save Template To Cluster";
            }
            else
            {
                txtclustername.Text = txtclustername.Text + "Group -  " + group.GroupName;
                btnConfig.Content   = "Save Template To Groups";
            }
            this.DataContext = rs;
            rs.LoadSuppliers(loginstateid);
            rs.LoadQuestions(loginstateid);
            rs.LoadQAndA(id, configType);

            this.Title = this.Title + " - " + CommonVariables.WindowTitleInfo;
        }