コード例 #1
0
    protected void listBoxLocation_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
    {
        //string pline = e.Parameter;
        string[]    param    = e.Parameter.Split(',');
        string      sss1     = param[0];
        string      sss2     = param[1];
        string      sss3     = param[2];
        ASPxListBox location = sender as ASPxListBox;

        //如果是装配工位排除已经对应过站点的工位
        string sql = "";

        if (sss2 == "A")
        {
            sql = "SELECT A.RMES_ID,A.LOCATION_CODE,A.LOCATION_CODE LOCATION_NAME FROM CODE_LOCATION A WHERE A.PLINE_CODE='"
                  + sss1 + "' AND NOT EXISTS(SELECT * FROM REL_STATION_LOCATION C WHERE C.LOCATION_CODE=A.RMES_ID  and c.LOCATION_FLAG='A' and PLINE_CODE='" + sss1 + "' ) "
                  + " AND NOT EXISTS(SELECT * FROM REL_STATION_LOCATION D WHERE D.LOCATION_CODE=A.RMES_ID   and D.station_code='" + sss3 + "' ) " //and c.LOCATION_FLAG='B'
                  + " ORDER BY A.LOCATION_CODE";                                                                                                  //
        }
        if (sss2 == "B")
        {
            sql = "SELECT A.RMES_ID,A.LOCATION_CODE,A.LOCATION_CODE LOCATION_NAME FROM CODE_LOCATION A WHERE A.PLINE_CODE='" + sss1 + "' "
                  + " AND NOT EXISTS(SELECT * FROM REL_STATION_LOCATION C WHERE C.LOCATION_CODE=A.RMES_ID   and c.station_code='" + sss3 + "' ) " //and c.LOCATION_FLAG='B'
                  + " ORDER BY A.LOCATION_CODE";
        }
        //如果是查看工位显示所有工位
        DataTable dt = dc.GetTable(sql);

        location.DataSource = dt;
        location.DataBind();
    }
コード例 #2
0
        protected void lbAvailable_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string      pline      = e.Parameter;
            ASPxListBox detectData = sender as ASPxListBox;

            initDetect(pline);
        }
コード例 #3
0
        public void ASPxListBoxPart1_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string dh     = txtDH.Text;
            string testdh = "";

            if (txtDH.Text.Trim() != "")
            {
                testdh = dh.Substring(0, 2);
            }
            if (testdh.ToUpper() == "MT")
            {
                ASPxListBoxPart1.JSProperties.Add("cpCallbackName", "Fail");
                ASPxListBoxPart1.JSProperties.Add("cpCallbackRet", "单号不能以“MT”开头!");

                return;
            }
            string    sql1 = "select ljdm1||','||gwmc||','||gxmc||','||ljsl1 as PT_PART from sjbomsothmuti where JHDM='" + txtPlanCode.Text.Trim() + "' and THGROUP='" + txtDH.Text.Trim() + "' and ljdm1 is not null";
            DataTable dt1  = dc.GetTable(sql1);

            ASPxListBoxPart1.DataSource = dt1;
            ASPxListBoxPart1.DataBind();
            //string sql2 = "select ljdm2||','||gwmc1||','||gxmc1||','||sl   as PT_PART from sjbomsothmuti where JHDM='" + txtPlanCode.Text.Trim() + "' and THGROUP='" + txtDH.Text.Trim() + "' and ljdm2 is not null";
            //DataTable dt2 = dc.GetTable(sql2);

            //ASPxListBoxPart2.DataSource = dt2;
            //ASPxListBoxPart2.DataBind();
        }
コード例 #4
0
 protected void ASPxComboBoxZJDH_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     //string project = e.Parameter;
     //List<PlanEntity> plans = PlanFactory.GetByProjectCode(project);
     //List<string> zjdh = (from s in plans where s.PROJECT_CODE == project select s.PRODUCT_MODEL).Distinct<string>().ToList<string>();
     //ASPxComboBoxZJDH.DataSource = zjdh;
     //ASPxComboBoxZJDH.DataBind();
 }
コード例 #5
0
        public void ComboProcess_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            ASPxComboBox asp = (ASPxComboBox)sender;
            string       StationCode = "", sql = "", item = "", location = "";
            string       Chsql3 = "SELECT  STATION_CODE FROM CODE_STATION WHERE STATION_NAME='" + ASPxTextSation.Text.ToUpper().Trim() + "'";
            DataTable    Chdt3  = dc.GetTable(Chsql3);

            if (Chdt3.Rows.Count <= 0)
            {
                return;
            }
            else
            {
                StationCode = Chdt3.Rows[0][0].ToString();
            }
            string[] param = e.Parameter.Split(',');
            item = param[0];

            location = param[1];
            //location = txtLocation.Text.Trim();
            if (item != "null" && location == "###")
            {
                sql = "SELECT distinct GXMC FROM rstbomqd_xc where zddm='" + StationCode + "' and comp='" + item + "' ";
            }
            else if (item != "null" && location != "###")
            {
                sql = "SELECT distinct GXMC FROM rstbomqd_xc where zddm='" + StationCode + "' and comp='" + item + "' and gwmc='" + location + "' ";
            }

            else
            {
                string    sql2 = "SELECT distinct COMP FROM rstbomqd_xc where zddm='" + StationCode + "'order by comp ";
                DataTable dt2  = dc.GetTable(sql2);
                string    comp = "";
                try
                {
                    comp = dt2.Rows[0][0].ToString();
                }
                catch { }
                string    sql3 = "SELECT distinct GWMC  FROM rstbomqd_xc where zddm='" + StationCode + "' and comp='" + comp + "'order by gwmc";
                DataTable dt3  = dc.GetTable(sql3);
                string    gwmc = "";
                try
                {
                    gwmc = dt3.Rows[0][0].ToString();
                }
                catch
                { }
                sql = "SELECT distinct GXMC FROM rstbomqd_xc where zddm='" + StationCode + "' and comp='" + comp + "' and gwmc='" + gwmc + "'";
            }
            //else
            //{
            //    sql = "SELECT distinct GXMC FROM rstbomqd_xc where zddm='" + StationCode + "'  ";
            //}
            sqlItem3.SelectCommand = sql;
            sqlItem3.DataBind();
            asp.DataBind();
        }
コード例 #6
0
    protected void cmbScode_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
    {
        //
        //string pline = txtPCode.Value.ToString();
        string sql2 = "select a.STATION_CODE,a.STATION_NAME from CODE_STATION a where a.pline_code=(select t.rmes_id from Code_Product_Line t WHERE t.pline_code='" + e.Parameter + "') order by a.STATION_NAME";

        StationCode.SelectCommand = sql2;
        StationCode.DataBind();
        txtSCode.DataBind();
    }
コード例 #7
0
        //初始化站点
        //private void init_CmbZddm()
        //{
        //    string sql = "select STATION_CODE,STATION_NAME from VW_CODE_STATION where PLINE_CODE = rh_get_data('G','" + txtPCode.Text.Trim() + "','','','') "
        //        + " order by STATION_NAME";

        //    DataTable dt = dc.GetTable(sql);
        //    listZD.DataSource = dt;
        //    listZD.DataBind();
        //}
        //用callback初始化站点
        protected void listZD_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string sql = "select STATION_CODE,STATION_NAME from VW_CODE_STATION where PLINE_CODE = rh_get_data('G','" + txtPCode.Text.Trim() + "','','','') "
                         + " order by STATION_NAME";

            DataTable dt = dc.GetTable(sql);

            listZD.DataSource = dt;
            listZD.DataBind();
        }
コード例 #8
0
ファイル: DaoTao.ascx.cs プロジェクト: khanhbiacnpm/DOANVIEN
        protected void lbAvailable_callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            ASPxListBox          lstBox  = sender as ASPxListBox;
            string               idDonVi = e.Parameter.ToString();
            List <EmployeesInfo> list    = objEmployees.GetEmployeesByUnit(Convert.ToInt32(idDonVi));

            foreach (EmployeesInfo emp in list)
            {
                lstBox.Items.Add(new ListEditItem(emp.fullname.ToString(), emp.id.ToString()));
            }
        }
コード例 #9
0
        protected void callbackPanel_Callback(object source, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string id = e.Parameter.ToString();

            if (id.Contains("e"))
            {
                int ItemId = Int32.Parse(id.Substring(1));
                // this.employees = objEmployees.GetEmployees(ItemId);
                this.soluoclilich.Attributes["src"] = DotNetNuke.Common.Globals.ApplicationPath + "/Default.aspx?tabid=328&Id=" + ItemId;
            }
        }
コード例 #10
0
        protected void lbAvailable_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string      pline      = e.Parameter;
            ASPxListBox detectData = sender as ASPxListBox;

            string sql = "SELECT A.RMES_ID,A.DETECT_CODE,A.DETECT_CODE||';'||A.DETECT_NAME DETECT_NAME FROM CODE_DETECT A WHERE A.PLINE_CODE='"
                         + pline + "' AND NOT EXISTS(SELECT * FROM REL_STATION_DETECT C WHERE C.DETECT_CODE=A.DETECT_CODE )  ORDER BY A.DETECT_CODE";//
            DataTable dt = dc.GetTable(sql);

            detectData.DataSource = dt;
            detectData.DataBind();
        }
        protected void cbb_car_type_Callback(object source, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            if (string.IsNullOrEmpty(e.Parameter))
            {
                return;
            }
            var list = _carType.GetList(new QueryInfo <T_Vip_CarType>().SetQuery("brand", e.Parameter));

            cbb_car_type.DataSource = list;
            cbb_car_type.DataBind();
            cbb_car_type.JSProperties.Add("cp_car_type", list.Select(p => p.car_price).ToArray());
        }
コード例 #12
0
    protected void listBoxPreStation_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
    {
        string pline = e.Parameter;

        ASPxListBox preStation = sender as ASPxListBox;

        string sql = "SELECT A.RMES_ID,A.STATION_CODE,A.STATION_NAME STATION_NAME FROM CODE_STATION A WHERE A.PLINE_CODE='" + pline + "'  "
                     + " ORDER BY A.STATION_NAME";

        DataTable dt = dc.GetTable(sql);

        preStation.DataSource = dt;
        preStation.DataBind();
    }
コード例 #13
0
        public void ComboLocation_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            ASPxComboBox asp = (ASPxComboBox)sender;

            string    StationCode = "", sql = "";
            string    Chsql3 = "SELECT STATION_CODE FROM CODE_STATION WHERE STATION_NAME='" + ASPxTextSation.Text.ToUpper().Trim() + "'";
            DataTable Chdt3  = dc.GetTable(Chsql3);

            if (Chdt3.Rows.Count <= 0)
            {
                return;
            }
            else
            {
                StationCode = Chdt3.Rows[0][0].ToString();
            }
            string item = e.Parameter;


            if (item != "")
            {
                sql = "SELECT distinct GWMC  FROM rstbomqd_xc where zddm='" + StationCode + "' and comp='" + item + "' ";
            }


            //else if (ComboItem.SelectedItem.Text != "")
            //{
            //    string sql2 = "SELECT distinct COMP FROM rstbomqd_xc where zddm='" + StationCode + "'oder by comp ";
            //    DataTable dt2 = dc.GetTable(sql2);
            //    string comp = dt2.Rows[0][0].ToString();
            //    sql = "SELECT distinct GWMC  FROM rstbomqd_xc where zddm='" + StationCode + "' and comp='" + ComboItem.SelectedItem.Value.ToString() + "' ";
            //}
            else
            {
                string    sql2 = "SELECT distinct COMP FROM rstbomqd_xc where zddm='" + StationCode + "'order by comp ";
                DataTable dt2  = dc.GetTable(sql2);
                //string comp = dt2.Rows[0][0].ToString();
                string comp = "";
                try
                {
                    comp = dt2.Rows[0][0].ToString();
                }
                catch { }

                sql = "SELECT distinct GWMC  FROM rstbomqd_xc where zddm='" + StationCode + "' and comp='" + comp + "'order by gwmc ";
            }
            sqlItem2.SelectCommand = sql;
            sqlItem2.DataBind();
            asp.DataBind();
        }
コード例 #14
0
        protected void listBoxLSH1_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string[] param = e.Parameter.Split(',');
            //string pline1 = param[0];
            string pline1 = ASPxComboBoxPline.SelectedItem.Value.ToString();
            //string begindate1 = param[1] ;
            string      begindate1 = ASPxDateEdit1.Date.ToString("yyyy-MM-dd");
            string      sql        = "select rmes_id,plan_code,plan_so,plan_qty,pline_code from data_plan where pline_code='" + pline1 + "' and begin_date=to_date('" + begindate1 + "','yyyy-mm-dd') and (plan_type='C' or plan_type='D') and confirm_flag='Y' and bom_flag='N' and item_flag='N' and third_flag='N' and run_flag='N' order by plan_code";
            ASPxListBox location   = sender as ASPxListBox;
            DataTable   dt         = dc.GetTable(sql);

            location.DataSource = dt;
            location.DataBind();
        }
コード例 #15
0
 protected void clbCheckIfReady_Callback(object source, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     if (String.Equals(e.Parameter, "CheckActualization", StringComparison.CurrentCultureIgnoreCase))
     {
         UpdateActualizationStatus();
     }
     else if (String.Equals(e.Parameter, "GoToFinished", StringComparison.CurrentCultureIgnoreCase))
     {
         ManualImportQueue miq = CanonManualImport.GetCompleteChannelByUser(SessionManager.LoggedUser.UserId);
         if (miq != null)
         {
             ASPxWebControl.RedirectOnCallback(string.Format("~/ChannelMapping.aspx?channel={0}&miq={1}",
                                                             miq.ChannelId, miq.RecordId));
         }
     }
 }
コード例 #16
0
ファイル: BillItemEditForm.ascx.cs プロジェクト: ewin66/dev
        protected void panelItemVAT_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            ASPxCallbackPanel panel   = sender as ASPxCallbackPanel;
            ASPxSpinEdit      spin    = panel.FindControl("spinItemTax") as ASPxSpinEdit;
            ItemBO            itemBO  = new ItemBO();
            ItemTax           itemTax = itemBO.GetCurrentVATOfItem(session, Guid.Parse(e.Parameter));

            if (itemTax != null)
            {
                spin.Number = (decimal)itemTax.TaxId.Percentage;
            }
            else
            {
                spin.Number = 0;
            }
        }
コード例 #17
0
 /// <summary>
 /// Handler for general callback event (filtering, bulk deleting)
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 protected void clbPanelChannels_Callback(object source, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     try
     {
         if (string.IsNullOrEmpty(e.Parameter))
         {
             List <object> keyValues = gridChannels.GetSelectedFieldValues("ChannelId");
             foreach (object key in keyValues)
             {
                 CanonChannel.DeleteChannelById(int.Parse(key.ToString()));
             }
         }
         else if (e.Parameter == "Search")
         {
             if (!string.IsNullOrEmpty(txtSearchParam.Text.Trim()))
             {
                 this.FilterText = txtSearchParam.Text;
             }
             this.IsFilterMode = true;
         }
         else if (e.Parameter == "ShowAll")
         {
             this.IsFilterMode = false;
             this.FilterText   = string.Empty;
         }
         else if (e.Parameter.StartsWith("ChannelHistory"))
         {
             string  idValue   = e.Parameter.Replace("ChannelHistory", "");
             int     channelId = int.Parse(idValue);
             Channel channel   = Cdb.Instance.Channels.FirstOrDefault(p => p.ChannelId == channelId);
             if (channel != null)
             {
                 string channelName = channel.ChannelName;
                 popupChannelHistory.HeaderText =
                     string.Format(Utilities.GetResourceString("Headers", "ChannelsHistoryPopupForm"), channelName);
             }
             ChannelHistoryCtrl.Parameters      = new int[] { channelId };
             SessionManager.PopupGridCurrentIds = ChannelHistoryCtrl.Parameters;
             ChannelHistoryCtrl.Bind();
         }
         this.BindData();
     }
     catch (Exception ex)
     {
         Logger.Log(string.Format("exception {0}", ex.ToString()), LogLevel.Error);
     }
 }
コード例 #18
0
        //查询
        //protected void query_Click(object sender, EventArgs e)
        //{
        //    init_listLSH();
        //}
        //初始化流水号列表
        protected void ASPxListBoxUnused_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string sql = "select ghtm from zzplshb where 1 = 1 ";

            if (txtPCode1.Text.Trim() != "")
            {
                sql += " AND gzdd = rh_get_data('G','" + txtPCode1.Text.Trim() + "','','','') ";
            }
            else
            {
                sql += " AND GZDD = '' ";
            }

            DataTable dt = dc.GetTable(sql);

            ASPxListBoxUnused.DataSource = dt;
            ASPxListBoxUnused.DataBind();
        }
コード例 #19
0
        protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            if (this.txtNewPass.Text.Trim() == this.txtConfirm.Text.Trim())
            {
                MembershipUser user = Membership.GetUser(this.UserInfo.Username.Trim());

                string newpass = Server.HtmlEncode(this.txtNewPass.Text);
                string oldpass = user.GetPassword();
                if (user.ChangePassword(user.GetPassword(), newpass))
                {
                    // Page.ClientScript.RegisterStartupScript(typeof(Page), "alert", "<script language=JavaScript>alert('Đổi password thành công !');</script>");
                    this.ASPxCallbackPanel1.JSProperties["cpResult"] = true;
                }
            }
            else
            {
                this.ASPxCallbackPanel1.JSProperties["cpResult1"] = true;
            }
        }
コード例 #20
0
        public void ComboItem_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            ASPxComboBox asp         = (ASPxComboBox)sender;
            string       StationCode = "";
            string       Chsql3      = "SELECT STATION_CODE FROM CODE_STATION WHERE STATION_NAME='" + ASPxTextSation.Text.ToUpper().Trim() + "'";
            DataTable    Chdt3       = dc.GetTable(Chsql3);

            if (Chdt3.Rows.Count <= 0)
            {
                return;
            }
            else
            {
                StationCode = Chdt3.Rows[0][0].ToString();
            }
            string sql = "SELECT distinct COMP FROM rstbomqd_xc where zddm='" + StationCode + "' order by comp ";

            sqlItem.SelectCommand = sql;
            sqlItem.DataBind();
            asp.DataBind();
        }
コード例 #21
0
 /// <summary>
 /// Handler for general callback event (filtering, bulk deleting)
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 protected void clbPanelProducts_Callback(object source, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     try
     {
         if (e.Parameter == "Search")
         {
             if (!string.IsNullOrEmpty(txtSearchParam.Text.Trim()))
             {
                 this.FilterText = txtSearchParam.Text;
             }
             this.IsFilterMode = true;
         }
         else if (e.Parameter == "ShowAll")
         {
             this.IsFilterMode = false;
             this.FilterText   = string.Empty;
         }
         this.BindData();
     }
     catch (Exception ex)
     {
         Logger.Log(string.Format("exception {0}", ex.ToString()), LogLevel.Error);
     }
 }
コード例 #22
0
        protected void listbox_quyen_OnCallback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            string[] keys     = e.Parameter.Split(';');
            string   dieukien = keys[0];
            string   username = keys[1];

            if (dieukien == "hienthi")
            {
                hienthi_quyen();
                DataTable tb     = LoadAllUserRoleList(username);
                object[]  roleid = new object[listbox_quyen.Items.Count];
                for (int i = 0; i < tb.Rows.Count; i++)
                {
                    roleid[i] = tb.Rows[i]["roleid"];
                }
                listbox_quyen.JSProperties["cpDataRole"] = roleid;
                listbox_quyen.JSProperties["cpOp"]       = 0;
            }
            else if (e.Parameter.StartsWith("capquyen"))
            {
                int userid = GetUserByUserName(username);

                var data = (object[])hdf_data.Get("data");
                foreach (Dictionary <string, object> item in data)
                {
                    int roleid = Convert.ToInt32(item["id"]);
                    RemoveRole(roleid, userid);

                    if (Convert.ToBoolean(item["chon"]))
                    {
                        InsertRole(userid, roleid);
                    }
                }
                listbox_quyen.JSProperties["cpOp"] = 1;
            }
        }
コード例 #23
0
ファイル: DaoTao.ascx.cs プロジェクト: khanhbiacnpm/DOANVIEN
        protected void cmbQuyetDinh_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            ASPxComboBox cmbQD = sender as ASPxComboBox;

            cmbQuyetDinh.Items.Clear();
            DataTable dt     = new DataTable();
            string    strSQL = "SELECT distinct decision FROM hrm.dbo.Training order by decision desc";

            dt.Clear();
            dt = VNPT.Modules.Notices.DataProvider.Select(strSQL);
            foreach (DataRow row in dt.Rows)
            {
                cmbQD.Items.Add(new ListEditItem(row["decision"].ToString(), row["decision"].ToString()));
            }
            cmbQD.SelectedIndex = 0;
            if (Session["Decision"] != null)
            {
                ListEditItem item = cmbQD.Items.FindByValue(Session["Decision"].ToString());
                if (item != null)
                {
                    item.Selected = true;
                }
            }
        }
コード例 #24
0
ファイル: BillItemEditForm.ascx.cs プロジェクト: ewin66/dev
 protected void comboUnit_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     FillUnitCombo(sender as ASPxComboBox, Guid.Parse(e.Parameter));
 }
コード例 #25
0
 /// <summary>
 /// Handler for general callback event (filtering, bulk mapping)
 /// </summary>
 /// <param name="source"></param>
 /// <param name="e"></param>
 protected void clbPanelMapping_Callback(object source, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     try
     {
         if (e.Parameter == "UnMapSelected")
         {
             List <object> keyValues = gridMapping.GetSelectedFieldValues("ProductId");
             foreach (object key in keyValues)
             {
                 CanonMapping.DeleteMapping((int)this.CurrentChannel, int.Parse(key.ToString()));
             }
         }
         else if (e.Parameter == "MapSelected")
         {
             List <object> keyValues = gridMapping.GetSelectedFieldValues("ProductId");
             foreach (object key in keyValues)
             {
                 CanonMapping.AddRecommendedMapping((int)this.CurrentChannel, int.Parse(key.ToString()));
             }
         }
         else if (e.Parameter == "Search")
         {
             if (!string.IsNullOrEmpty(txtSearchParam.Text.Trim()))
             {
                 this.FilterText = txtSearchParam.Text;
             }
             this.IsFilterMode = true;
         }
         else if (e.Parameter == "ShowAll")
         {
             this.IsFilterMode = false;
             this.FilterText   = string.Empty;
         }
         else if (e.Parameter == "StateChanged")
         {
         }
         else if (e.Parameter == "DoActualization")
         {
             //Actualize button click
             btnActualize.Enabled = false;
             ManualImportStatusEnum status = CanonManualImport.GetChannelImportStatus((int)this.CurrentChannel);
             if ((status == ManualImportStatusEnum.NotInQueue) ||
                 (status == ManualImportStatusEnum.ImportComplete))
             {
                 CanonManualImport.AddChannelToQueue(SessionManager.LoggedUser.UserId,
                                                     (int)this.CurrentChannel);
                 lblActualizeMessage.Text = Utilities.GetResourceString("Common", "ActualizeMessagePostedIntoQueue");
             }
             else
             {
                 ManualImportQueue elem = CanonManualImport.GetLatestQueueElement((int)this.CurrentChannel);
                 int queueElemId        = elem.RecordId;
                 CanonManualImport.AddNewSubscriber(SessionManager.LoggedUser.UserId, queueElemId);
                 lblActualizeMessage.Text = string.Format(Utilities.GetResourceString("Common", "ActualizeMessageAlreadyInQueue"),
                                                          elem.User.FullName,
                                                          (SessionManager.CurrentShortLanguage == "En") ? elem.Enum.NameEn : elem.Enum.NameCz);
             }
             clbPanelMapping.JSProperties["cpResult"] = "OK";
         }
         else if (e.Parameter == "ExcludeSelected")
         {
             List <object> keyValues = gridMapping.GetSelectedFieldValues("ProductId");
             foreach (object key in keyValues)
             {
                 CanonMapping.AddToExceptions((int)this.CurrentChannel, int.Parse(key.ToString()));
             }
         }
         else if (e.Parameter == "IncludeSelected")
         {
             List <object> keyValues = gridMapping.GetSelectedFieldValues("ProductId");
             foreach (object key in keyValues)
             {
                 CanonMapping.RemoveFromExceptions((int)this.CurrentChannel, int.Parse(key.ToString()));
             }
         }
         else if (e.Parameter.StartsWith("LogHistory"))
         {
             string  idValue   = e.Parameter.Replace("LogHistory", "");
             int     productId = int.Parse(idValue);
             Product product   = Cdb.Instance.Products.FirstOrDefault(p => p.ProductId == productId);
             if (product != null)
             {
                 string productName = product.ProductName;
                 popupImport.HeaderText =
                     string.Format(Utilities.GetResourceString("Headers", "MappingHistoryPopupForm"), productName);
             }
             MapHistoryCtrl.Parameters = new int[] { (int)this.CurrentChannel, productId };
             MapHistoryCtrl.Bind();
         }
         this.BindData();
     }
     catch (Exception ex)
     {
         Logger.Log(string.Format("exception {0}", ex.ToString()), LogLevel.Error);
     }
 }
コード例 #26
0
ファイル: Register.aspx.cs プロジェクト: ewin66/dev
 protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
 }
コード例 #27
0
ファイル: DaoTao.ascx.cs プロジェクト: khanhbiacnpm/DOANVIEN
        protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
        {
            ASPxTextBox     txtTrainingEmpId     = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("txtTrainingEmpId") as ASPxTextBox;
            ASPxTextBox     txtTrainingId        = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("txtTrainingId") as ASPxTextBox;
            ASPxTextBox     txtSkill             = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("txtSkill") as ASPxTextBox;
            ASPxTextBox     txtDecision          = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("txtTrainingDecision") as ASPxTextBox;
            ASPxTextBox     txtCoSoDaoTao        = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("txtCoSoDaoTao") as ASPxTextBox;
            ASPxTextBox     txtTrainingDecision  = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("txtTrainingDecision") as ASPxTextBox;
            ASPxDateEdit    calDateEnd           = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("calDateEnd") as ASPxDateEdit;
            ASPxDateEdit    calStartDateTraining = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("calStartDateTraining") as ASPxDateEdit;
            ASPxListBox     lstBoxChon           = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao1").FindControl("lbChoosen") as ASPxListBox;
            ASPxTextBox     txtFee           = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("txtFee") as ASPxTextBox;
            ASPxComboBox    cboQualification = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("cboQualification") as ASPxComboBox;
            ASPxComboBox    cboTrainingForm  = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("cboTrainingForm") as ASPxComboBox;
            ASPxComboBox    cmbDonViToChuc   = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("cmbDonViToChuc") as ASPxComboBox;
            ASPxComboBox    cmbDiaDiemDaoTao = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("cmbDiaDiemDaoTao") as ASPxComboBox;
            ASPxDateEdit    tuNgay           = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("calStartDateTraining") as ASPxDateEdit;
            ASPxDateEdit    denNgay          = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("calDateEnd") as ASPxDateEdit;
            ASPxComboBox    cboResult        = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("cboResult") as ASPxComboBox;
            ASPxHiddenField HiddentfileKem   = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("HiddentfileKem") as ASPxHiddenField;
            ASPxCheckBox    checkCamKet      = ASPxCallbackPanel1.FindControl("RoundPanelDaoTao2").FindControl("checkCamKet") as ASPxCheckBox;


            if (e.Parameter.ToString().Equals("1"))
            {
                txtCoSoDaoTao.Text = "";
                txtDecision.Text   = "";
                txtFee.Text        = "";
                txtSkill.Text      = "";
                LoadcboQualification();
                LoadcboTrainingForm();
                LoadcmbDiaDiemDaoTao();
                lbChoosen.Items.Clear();
                lstBoxChon.EnableViewState = false;
                Session["Add"]             = 1;
                lbChoosen.EnableViewState  = false;
            }
            else if (e.Parameter.ToString().Equals(""))
            {
                txtDecision.ReadOnly = false;
                List <Training.TrainingInfo> emps = objTraining.GetTrainingByDecision(txtDecision.Text.ToString());

                if (emps.Count > 0)
                {
                    foreach (Training.TrainingInfo item in emps)
                    {
                        this.training = objTraining.GetTraining(Int32.Parse(item.id.ToString()));
                        if (this.training != null)
                        {
                            this.objTraining.DeleteTraining(training);
                        }
                    }
                }

                if (Session["Add"] != null)
                {
                    if (Session["Decision"] != null)
                    {
                        List <Training.TrainingInfo> list = objTraining.GetTrainingByDecision(Session["Decision"].ToString());
                        foreach (Training.TrainingInfo obj in list)
                        {
                            ListEditItem item = lbChoosen.Items.FindByValue(obj.employeeid.ToString());
                            if (item != null)
                            {
                                lbChoosen.Items.Remove(item);
                            }
                        }
                    }
                    foreach (ListEditItem item in lbChoosen.Items)
                    {
                        this.training.id              = -1;
                        this.training.donvitochucId   = Convert.ToInt32(cmbDonViToChuc.SelectedItem.Value.ToString());
                        this.training.diadiemtochucId = Convert.ToInt32(cmbDiaDiemDaoTao.SelectedItem.Value.ToString());
                        this.training.decision        = txtDecision.Text;
                        this.training.schoolname      = txtCoSoDaoTao.Text.Trim();
                        this.training.skill           = txtSkill.Text;
                        this.training.fee             = txtFee.Text;
                        this.training.fromdate        = Convert.ToDateTime(calStartDateTraining.Value);
                        this.training.todate          = Convert.ToDateTime(calDateEnd.Value);
                        this.training.editor          = this.UserId;
                        this.training.result          = cboResult.SelectedItem.Text;
                        this.training.modifieddate    = DateTime.Now;
                        this.training.ip              = HttpContext.Current.Request.UserHostAddress;
                        this.training.employeeid      = Int32.Parse(item.Value.ToString());
                        this.training.qualificationid = Int32.Parse(cboQualification.SelectedItem.Value.ToString());
                        this.training.trainingformid  = Int32.Parse(cboTrainingForm.SelectedItem.Value.ToString());
                        this.training.camket          = checkCamKet.Checked == true ? checkCamKet.Checked : false;
                        if (Session["img"] != null)
                        {
                            this.training.fileKem = Session["img"].ToString();
                        }
                        Session.Remove("img");
                        objTraining.AddTraining(this.training);
                    }
                }
                else
                {
                    foreach (ListEditItem item in lbChoosen.Items)
                    {
                        this.training.id              = -1;
                        this.training.donvitochucId   = Convert.ToInt32(cmbDonViToChuc.SelectedItem.Value.ToString());
                        this.training.diadiemtochucId = Convert.ToInt32(cmbDiaDiemDaoTao.SelectedItem.Value.ToString());
                        this.training.decision        = txtDecision.Text;
                        this.training.schoolname      = txtCoSoDaoTao.Text.Trim();
                        this.training.skill           = txtSkill.Text;
                        this.training.fee             = txtFee.Text;
                        this.training.fromdate        = Convert.ToDateTime(calStartDateTraining.Value);
                        this.training.todate          = Convert.ToDateTime(calDateEnd.Value);
                        this.training.result          = cboResult.SelectedItem.Text;
                        this.training.editor          = this.UserId;
                        this.training.modifieddate    = DateTime.Now;
                        this.training.ip              = HttpContext.Current.Request.UserHostAddress;
                        this.training.employeeid      = Int32.Parse(item.Value.ToString());
                        this.training.qualificationid = Int32.Parse(cboQualification.SelectedItem.Value.ToString());
                        this.training.trainingformid  = Int32.Parse(cboTrainingForm.SelectedItem.Value.ToString());
                        this.training.camket          = checkCamKet.Checked == true ? checkCamKet.Checked : false;
                        if (Session["img"] != null)
                        {
                            this.training.fileKem = Session["img"].ToString();
                        }
                        Session.Remove("img");
                        objTraining.AddTraining(this.training);
                    }
                }
                Session["Decision"] = txtDecision.Text.Trim();
                Session.Remove("Add");
                ASPxWebControl.RedirectOnCallback(DotNetNuke.Common.Globals.ApplicationPath + "/Default.aspx?tabid=232");
            }
            else if (e.Parameter.ToString().Equals("2"))
            {
                Session.Remove("Add");
                List <Training.TrainingInfo> list = objTraining.GetTrainingByDecision(cmbQuyetDinh.SelectedItem.Value.ToString());
                foreach (Training.TrainingInfo obj in list)
                {
                    this.training = obj;
                }
                if (this.training != null)
                {
                    if (training.schoolname != null)
                    {
                        txtCoSoDaoTao.Text = training.schoolname.ToString();
                    }
                    if (training.decision != null)
                    {
                        txtDecision.Text = training.decision.ToString();
                    }
                    if (training.fee != null)
                    {
                        txtFee.Text = training.fee.ToString();
                    }
                    if (training.skill != null)
                    {
                        txtSkill.Text = training.skill.ToString();
                    }

                    //txtDecision.ReadOnly = true;
                    ListEditItem item1 = cboQualification.Items.FindByValue(training.qualificationid.ToString());
                    if (item1 != null)
                    {
                        item1.Selected = true;
                    }
                    ListEditItem item7 = cboResult.Items.FindByText(training.result.ToString());
                    if (item7 != null)
                    {
                        item7.Selected = true;
                    }
                    ListEditItem item2 = cboTrainingForm.Items.FindByValue(training.trainingformid.ToString());
                    if (item2 != null)
                    {
                        item2.Selected = true;
                    }
                    ListEditItem item3 = cmbDonViToChuc.Items.FindByValue(training.donvitochucId.ToString());
                    if (item3 != null)
                    {
                        item3.Selected = true;
                    }
                    ListEditItem item4 = cmbDiaDiemDaoTao.Items.FindByValue(training.diadiemtochucId.ToString());
                    if (item4 != null)
                    {
                        item4.Selected = true;
                    }
                    tuNgay.Date  = training.fromdate;
                    denNgay.Date = training.todate;
                }
            }
        }
コード例 #28
0
 protected void cbEmpresa_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     Session["IDEmpresa"] = e.Parameter.ToString();
 }
コード例 #29
0
ファイル: ProductPrices.ascx.cs プロジェクト: radtek/canon
 protected void CallbackHistoryPanel_Callback(object source, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e)
 {
     RecommendedHistoryCtrl.Bind();
 }