protected void popup_WindowCallback(object source, PopupWindowCallbackArgs e)
    {
        string  rtfText = gv.GetRowValuesByKeyValue(e.Parameter, "RtfContent").ToString();
        Literal ltl     = e.Window.FindControl("ltl") as Literal;

        ltl.Text = GetHtmlTextFromDocumentServer(rtfText);
    }
Exemplo n.º 2
0
        protected void popCategories_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            Guid cdpId = Guid.Parse(e.Parameter.Split('|')[1]);

            Session["lastCdpId"] = cdpId;
            var cCat = (from cdp in db.categoriesDPs where cdp.cdpId == cdpId select cdp).FirstOrDefault();

            if (e.Parameter.Split('|')[0] == "Load")
            {
                txtCategories.Text    = cCat.cdpName;
                txtDescriptionDP.Text = cCat.cdpDescriptionDP;
                txtDescription.Text   = cCat.cdpDescription;

                Session["imgCategoriesURL"] = cCat.cdpImage;
                popCategories.JSProperties.Add("cpImage", cCat.cdpImage);
            }
            else if (e.Parameter.Split('|')[0] == "Copy")
            {
                txtDescription.Text = cCat.cdpDescriptionDP;
            }
            else if (e.Parameter.Split('|')[0] == "Save")
            {
                cCat.cdpName        = txtCategories.Text;
                cCat.cdpDescription = txtDescription.Text;
                cCat.cdpImage       = Session["imgCategoriesURL"].ToString();
                cCat.cdpEdited      = true;
                db.SubmitChanges();
            }
        }
 protected void popupControl_WindowCallback(object source, PopupWindowCallbackArgs e)
 {
     if (PopupCallback != null)
     {
         PopupCallback(source, e);
     }
 }
 protected void pcInteruptFault_WindowCallback(object source, PopupWindowCallbackArgs e)
 {
     // loadFaultDefault();
     GVDataAttachment.DataSource = Session["dtAttachment"];
     GVDataAttachment.DataBind();
     PopUpAttachMent.ShowOnPageLoad = false;
 }
Exemplo n.º 5
0
        protected void PcAktFaturali_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            string id = e.Parameter.ToString();

            //var list = db.S_Bayi(Convert.ToInt32(id)).ToList();
            //if (list.Count > 0)
            //{
            //    //BayiKoduTextBox.Text = list.First().BayiKodu;
            //    //BayiAdiTextBox.Text = list.First().BayiAdi;
            //    //BayiCariAdiTextBox.Text = list.First().BayiCariAdi;
            //    //YetkiliAdiSoyadiTextBox.Text = list.First().YetkiliAdiSoyadi;
            //    //AdresTextBox.Text = list.First().Adres;
            //    //CmbSehir.Text = list.First().SehirAdi;//cmbSehir.Value = list.First().SehirID;
            //    //CmbIlce.Text = list.First().IlceAdi;//cmbIlce.Value = list.First().IlceID;
            //    ////PostaKoduTextBox.Text =
            //    //EmailTextBox.Text = list.First().Mail;
            //    //CepTelTextBox.Text = list.First().Cep;
            //    //SabitTelTextBox.Text = list.First().Telefon;
            //    //FaksTelTextBox.Text = list.First().Faks;
            //    //cmbMusteriTemsilcisi.Value = list.First().MusteriTemsilcisiID.ToString();
            //    //cmbGrup.Text = list.First().GrupAdi;//cmbGrup.Value = list.First().Grup_TipID1;
            //    //cmbBolge.Text = list.First().BolgeAdi; //cmbBolge.Value = list.First().Bolge_TipID2;
            //    //cmbBayiTipi.Text = list.First().BayiTipiAdi; //cmbBayiTipi.Value = list.First().BayiTipi_TipID3;
            //    //BayiDurumCheckBox.Checked = Convert.ToBoolean(list.First().Aktif);
            //}
            PcAktFaturali.JSProperties["cpEmployeeID"] = id;// list.First().ID;
            PcAktFaturali.JSProperties["cpHeaderText"] = string.Format("Aktivasyon Şebeke İçi Geçiş ({0} {1})", "", "");
        }
Exemplo n.º 6
0
        protected void PopUpAddFMEA_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            int key = e.Parameter.ToInt32(0);

            if (key == 0)
            {
                return;
            }

            Session["FMEANo"] = key;

            //get data from db
            using (AppDb fmeas = new AppDb())
            {
                FMEAs fmea = new FMEAs();

                //populate controls
                fmea.Id                       = Convert.ToInt32(hddId.Value);
                fmea.FMEANo                   = txtFMEANo.Text;
                fmea.CatalogModelId           = Convert.ToInt32(ddlType.SelectedValue);
                fmea.AssemblyModelId          = Convert.ToInt32(ddlAssemblyModel.SelectedValue);
                fmea.AssemblySectionId        = Convert.ToInt32(ddlArea.SelectedValue);
                fmea.StationId                = Convert.ToInt32(ddlStation.SelectedValue);
                fmea.ProcessId                = Convert.ToInt32(ddlProcessNo.SelectedValue);
                fmea.PartId                   = Convert.ToInt32(ddlPartNo.SelectedValue);
                fmea.Potential_Failure_Effect = txtPotentialFailureEffect.Text;
                fmea.Potential_Failure_Mode   = txtPotentialFailureMode.Text;
                fmea.Potential_Causes         = txtPotentialCauses.Text;
                fmea.Controls_Prevention      = txtControlsPrevention.Text;
                fmea.Controls_Detection       = txtControlsDetection.Text;
                fmea.ValidFrom                = Convert.ToDateTime(txtValfrom.Text);
                fmea.ValidTo                  = Convert.ToDateTime(txtValto.Text);
            }
        }
        protected void popupHistory_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            int key = 0;

            string[] arr = e.Parameter.Split(GridViewHelper.SEPARATOR_VALUES);
            if (arr.Length > 1)
                key = arr[1].ToInt32(0);

            if (key == 0)
                return;

            ////get tool information
            //ToolInventory ti = null;
            //using (AppDb ctx = new AppDb())
            //{
            //    ti = ctx.ToolInventories.Where(x => x.Id == key).FirstOrDefault();
            //}

            //if (ti == null)
            //    return;

            ////set chart title
            //if (chartHistory.Titles.Count > 0)
            //    chartHistory.Titles[0].Text = ti.Number;

            //load verification history
            SqlDataSource ds = chartHistory.DataSource as SqlDataSource;
            if (ds != null)
            {
                ds.SelectParameters["ToolInventoryId"].DefaultValue = key.ToString();
                //ds.DataBind();
                chartHistory.DataSource = ds;
                chartHistory.DataBind();
            }
        }
Exemplo n.º 8
0
 protected void PopupControlIssueDocumentPos_WindowCallback(object source, PopupWindowCallbackArgs e)
 {
     RemoveSession(Enums.IssueDocumentSession.IssueDocumentID);
     RemoveSession(Enums.IssueDocumentSession.IssueDocumentPositionID);
     RemoveSession(Enums.CommonSession.UserActionPopUp);
     RemoveSession(Enums.CommonSession.UserActionPopUpInPopUp);
 }
    protected void popDetail_WindowCallback(object source, PopupWindowCallbackArgs e)
    {
        string idVehiculo = e.Parameter.ToString();

        Session[hfId["sessionId"] + "dxAsignacionConsumo.ReporteDetalle"] = _oConsumoCombustibleDAL.ObtenerDetalleSaldo(idVehiculo, (DateTime)Session[hfId["sessionId"] + "dxAsignacionConsumo.Periodo"]);
        gvDetalleSaldo.DataSource = Session[hfId["sessionId"] + "dxAsignacionConsumo.ReporteDetalle"];
        gvDetalleSaldo.DataBind();
    }
Exemplo n.º 10
0
 protected void ASPxPopupControl1_WindowCallback(object source, PopupWindowCallbackArgs e)
 {
     if (ASPxFileManager1.SelectedFile != null)
     {
         Session["lastOpenedFilePath"] = ASPxFileManager1.SelectedFile.FullName;
         OpenFile();
     }
 }
Exemplo n.º 11
0
 private void Master_PopupCallback(object source, PopupWindowCallbackArgs e)
 {
     if (e.Parameter == "tree")
     {
         RenderTree((ASPxPopupControl)source);
         Session["isRendered"] = true;
     }
 }
Exemplo n.º 12
0
        protected void popupCalibration_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            string key = e.Parameter;

            //get tool information

            //load calibration history
        }
Exemplo n.º 13
0
        protected void popWorkshop_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            int workshopId = int.Parse(e.Parameter.Split('|')[1]);

            Session["lastWorkshopId"] = workshopId;
            var wWorkshop = new DekkOnline.Workshop();

            if (workshopId > 0)
            {
                wWorkshop = (from w in db.Workshop where w.IdWorkshop == workshopId select w).FirstOrDefault();
            }

            if (e.Parameter.Split('|')[0] == "Load")
            {
                if (workshopId == 0)
                {
                    txtName.Text    = "";
                    txtAddress.Text = "";
                    txtPhone.Text   = "";
                    txtEmail.Text   = "";
                    Session["imgOurWorkshopURL"] = "";
                    popWorkshop.JSProperties.Add("cpImage", "");
                }
                else
                {
                    txtName.Text    = wWorkshop.Name;
                    txtAddress.Text = wWorkshop.Address;
                    txtPhone.Text   = wWorkshop.Phone;
                    txtEmail.Text   = wWorkshop.Email;
                    Session["imgOurWorkshopURL"] = wWorkshop.WorkImage == null || wWorkshop.WorkImage == "" ? "" : wWorkshop.WorkImage;

                    if (wWorkshop.WorkImage != null && wWorkshop.WorkImage.IndexOf("/photos/ourCategories/") == 0)
                    {
                        popWorkshop.JSProperties.Add("cpImage", wWorkshop.WorkImage);
                    }
                    else
                    {
                        popWorkshop.JSProperties.Add("cpImage", wWorkshop.WorkImage == null || wWorkshop.WorkImage == "" ? "" : ConfigurationManager.AppSettings["URLSTORE"] + wWorkshop.WorkImage);
                    }
                }
            }
            else if (e.Parameter.Split('|')[0] == "Save")
            {
                wWorkshop.Name      = txtName.Text;
                wWorkshop.Address   = txtAddress.Text;
                wWorkshop.Phone     = txtPhone.Text;
                wWorkshop.Email     = txtEmail.Text;
                wWorkshop.WorkImage = Session["imgOurWorkshopURL"].ToString();

                if (workshopId == 0)
                {
                    wWorkshop.Status = true;
                    db.Workshop.InsertOnSubmit(wWorkshop);
                }

                db.SubmitChanges();
            }
        }
        protected void PopUpAttachMent_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            pcInteruptFault.ShowOnPageLoad = false;

            PopUpAttachMent.ShowOnPageLoad = false;
            pcInteruptFault.ShowOnPageLoad = true;
            GVDataAttachment.DataSource    = Session["dtAttachment"];
            GVDataAttachment.DataBind();
        }
Exemplo n.º 15
0
        protected void popOrder_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            int orderId = int.Parse(e.Parameter.Split('|')[1]);

            loadOrderDetails(orderId);

            xgvOrderDetails.DataSource = Session["dsOrderDetails"];
            xgvOrderDetails.DataBind();
        }
Exemplo n.º 16
0
        protected void popupAddPart_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            if (e.Parameter == "save")
            {
                int processId     = Session["GWISProcessId"].ToInt32(0);
                int assyCatalogId = txtEditorId.Text.ToInt32(0);

                if (processId == 0 || assyCatalogId == 0)
                {
                    popupAddPart.JSProperties["cpResult"] = "Invalid GWISProcessId or AssyCatalogId";
                    return;
                }

                using (AppDb ctx = new AppDb())
                {
                    AssyCatalog cat = ctx.AssyCatalogs.Where(x => x.Id == assyCatalogId).FirstOrDefault();
                    if (cat == null)
                    {
                        return;
                    }

                    GWISPart part = new GWISPart();
                    part.ProcessId = processId;
                    //part.AssyCatalogId = assyCatalogId;
                    part.CatalogPage     = txtEditorPage.Text;
                    part.PartNo          = txtEditorPartNo.Text;
                    part.PartDescription = txtEditorDescription.Text;
                    part.Qty_Actual      = txtEditorQtyActual.Text.ToInt32(0);
                    part.Pos_Actual      = txtEditorPosActual.Text.ToInt32(0);
                    part.Pos2_Actual     = txtEditorPos2Actual.Text.ToInt32(0);

                    part.SA = cat.SA;

                    part.CatalogModelId = cmbCatalogModel.Value.ToInt32(0);

                    part.CreatedDate = DateTime.Now;
                    part.CreatedBy   = PermissionHelper.GetAuthenticatedUserName();

                    ctx.GWISParts.Add(part);

                    try
                    {
                        ctx.SaveChanges();

                        popupAddPart.JSProperties["cpResult"] = "OK";
                    }
                    catch (Exception ex)
                    {
                        LoggerHelper.LogError(ex);

                        popupAddPart.JSProperties["cpResult"] = ex.Message;
                    }
                }
            }
        }
Exemplo n.º 17
0
        protected void camp_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            string           str              = e.Parameter.ToString();
            string           str1             = string.Concat("SELECT id, days, titulo, texto, CONCAT('../img/camps/',imagen) AS imagen, CONCAT('../img/camps/',imagencamp) AS imagencamp FROM schoolcamps WHERE id =", str);
            MySqlConnection  mySqlConnection  = new MySqlConnection(ConfigurationManager.ConnectionStrings["mySql"].ConnectionString);
            MySqlDataAdapter mySqlDataAdapter = new MySqlDataAdapter(str1, mySqlConnection);
            DataTable        dataTable        = new DataTable();

            mySqlDataAdapter.Fill(dataTable);
            this.Repeater2.DataSource = dataTable;
            this.Repeater2.DataBind();
        }
 protected void popConfirm_WindowCallback(object source, PopupWindowCallbackArgs e)
 {
     litCrop.Text = "<iframe id=\"IframeCrop\" width=\"100%\" height=\"450px\" src=\"../../ImageCropPage.aspx?key=" + FileKey;
     if (wid != null)
     {
         litCrop.Text = litCrop.Text + "&wid=" + wid;
     }
     if (hgt != null)
     {
         litCrop.Text = litCrop.Text + "&hgt=" + hgt;
     }
     litCrop.Text = litCrop.Text + "\" scrolling=\"no\" ></iframe>";
 }
    protected void ASPxPopupControl1_WindowCallback(object source, PopupWindowCallbackArgs e)
    {
        string[] parts = e.Parameter.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
        int      key   = Convert.ToInt32(parts[1]);

        if (parts[0].Equals("APPLY"))
        {
            CommentsStorage.Set(key, parts[2], parts[3]);
        }
        else if (parts[0].Equals("DELETE"))
        {
            CommentsStorage.Delete(key, parts[2]);
        }
    }
Exemplo n.º 20
0
        protected void popupComparePL_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            if (e.Parameter == "compare")
            {
                int modelId          = Session["ModelId"].ToInt32(0);
                int packingMonth     = txtActPM.ToInt32(0);
                int prevPackingMonth = cmbPrevPM.Value.ToInt32(0);
                int ricType          = cmbRicType.Value.ToInt32(0);

                bool status = RicRepository.ComparePackingList(modelId, ricType, packingMonth, prevPackingMonth);

                if (status)
                {
                    lblSuccess_Compare.Text = "Successfully compare packing month " + packingMonth + " with packing month " + prevPackingMonth;
                }
            }
            else
            {
                string[] arr = e.Parameter.Split(GridViewHelper.SEPARATOR_VALUES);
                if (arr.Length < 1)
                {
                    return;
                }

                int instanceStepId = arr[0].ToInt32(0);

                ChecklistInstanceStep step = ChecklistHelper.GetChecklistStep(instanceStepId);
                if (step == null || step.ChecklistInstance == null)
                {
                    return;
                }

                // get parameter
                DateTime dt           = DateTime.Parse(ChecklistHelper.GetChecklistParameterValue(step.ChecklistInstanceId, "PackingMonth"));
                int      packingMonth = dt.ToString("yyyyMM").ToInt32(0);
                int      modelId      = ChecklistHelper.GetChecklistParameterValue(step.ChecklistInstanceId, "CatalogModelId").ToInt32(0);

                txtActPM.Value = packingMonth.ToString();
                //txtModelId_Compare.Value = modelId.ToString();

                Session["ModelId"] = modelId;

                SqlDataSource sds = cmbPrevPM.DataSource as SqlDataSource;
                sds.SelectParameters["ModelId"].DefaultValue      = modelId.ToString();
                sds.SelectParameters["PackingMonth"].DefaultValue = packingMonth.ToString();
                cmbPrevPM.DataBind();

                cmbPrevPM.SelectedIndex = 0;
            }
        }
Exemplo n.º 21
0
        protected void popupDocUpload_OnWindowCallback(object source, PopupWindowCallbackArgs e)
        {
            if (e.Parameter == "upload")
            {
                string filePath = Session["pl_uploaded_file"] as string;

                PackingListUploader uploader = new PackingListUploader();

                //set username for column createdby and modifiedby
                uploader.Username = PermissionHelper.GetAuthenticatedUserName();

                //parameter
                DateTime value        = (DateTime)dtPM.Value;
                int      packingMonth = value.ToString("yyyyMM", System.Globalization.CultureInfo.InvariantCulture).ToInt32(0);
                int      modelId      = cmbModels.Value.ToInt32(0);
                int      ricType      = cmbRicType.Value.ToInt32(0);

                //make sure RIC is not released yet. If it is already released, can not upload packing list
                RIC ric = RicRepository.GetRIC(modelId, packingMonth, ricType);
                if (ric != null && ric.StatusId == EStatus.Released)
                {
                    lblSuccess.Text = "RIC is already released. Upload file " + Path.GetFileName(filePath) + " failed!";
                    return;
                }

                //parse the file
                string message  = "";
                int    rowCount = uploader.Parse(filePath, packingMonth, modelId, ricType);
                if (rowCount > 0)
                {
                    lblSuccess.Text = "Successfully upload and process data " + Path.GetFileName(filePath) + ", " + rowCount + " rows inserted, " + message;

                    this.masterGrid.DataBindSafe();
                }
                else
                {
                    if (uploader.ErrorMessage.Length > 0)
                    {
                        lblSuccess.Text = uploader.ErrorMessage;
                    }
                    else
                    {
                        lblSuccess.Text = "Upload file " + Path.GetFileName(filePath) + " failed!";
                    }
                    //delete the file
                    File.Delete(filePath);
                }
            }
        }
Exemplo n.º 22
0
        protected void popSection_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            var lstProIds = xgvProducts.GetSelectedFieldValues("Id");

            foreach (int proId in lstProIds)
            {
                try
                {
                    var cProd = (from pro in db.products where pro.proId == proId select pro).FirstOrDefault();


                    cProd.catId = int.Parse(cmbSection.Value.ToString());
                }
                catch { }
            }

            db.SubmitChanges();
        }
Exemplo n.º 23
0
        protected void popupLinkToProcess_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            string[] parameters = e.Parameter.Split(';');
            int      line       = 1; //cmbProductionLines.SelectedItem.Value.ToInt32(0);
            int      ProcessId  = Convert.ToInt32(parameters[0]);
            int      stationid  = Convert.ToInt32(parameters[1]);
            int      PartId     = Convert.ToInt32(parameters[2]);

            if (ProcessId != null && stationid != null)
            {
                GetGVToolInventories1(ProcessId, line, stationid, PartId);
                Session["ProcessId"] = ProcessId;
                Session["StationId"] = stationid;
                Session["PartId"]    = PartId;
                Session["ProdLine"]  = line;
                int assemblyTypeId = HttpContext.Current.Session["assemblyType"].ToInt32(0);
            }
        }
Exemplo n.º 24
0
        protected void popCategories_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            int catId = int.Parse(e.Parameter.Split('|')[1]);

            Session["lastCatId"] = catId;
            var cCat = new category();

            if (catId > 0)
            {
                cCat = (from cdp in db.categories where cdp.catId == catId select cdp).FirstOrDefault();
            }

            if (e.Parameter.Split('|')[0] == "Load")
            {
                if (catId == 0)
                {
                    txtCategories.Text             = "";
                    txtDescription.Text            = "";
                    Session["imgOurCategoriesURL"] = "";
                    popCategories.JSProperties.Add("cpImage", "");
                }
                else
                {
                    txtCategories.Text             = cCat.catName;
                    txtDescription.Text            = cCat.catDescription;
                    Session["imgOurCategoriesURL"] = cCat.catImage;
                    popCategories.JSProperties.Add("cpImage", cCat.catImage);
                }
            }
            else if (e.Parameter.Split('|')[0] == "Save")
            {
                cCat.catName        = txtCategories.Text;
                cCat.catDescription = txtDescription.Text;
                cCat.catImage       = Session["imgOurCategoriesURL"].ToString();

                if (catId == 0)
                {
                    cCat.catStatus = true;
                    db.categories.InsertOnSubmit(cCat);
                }

                db.SubmitChanges();
            }
        }
Exemplo n.º 25
0
        protected void popBrands_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            Guid braId = Guid.Parse(e.Parameter.Split('|')[1]);

            Session["lastBraId"] = braId;
            var cBra = (from bra in db.brands where bra.braId == braId select bra).FirstOrDefault();

            if (e.Parameter.Split('|')[0] == "Load")
            {
                txtBrands.Text        = cBra.braName;
                txtDescriptionDP.Text = "";
                txtDescription.Text   = cBra.braDescription;
                txtCodeDP.Text        = cBra.braCodeDP;
                txtCode.Text          = cBra.braCode;
                spPriceP.Text         = cBra.braPercent.HasValue == true?cBra.braPercent.Value.ToString() : "";

                Session["imgBrandsURL"] = cBra.braImage;
                popBrands.JSProperties.Add("cpImage", cBra.braImage);
            }
            else if (e.Parameter.Split('|')[0] == "Copy")
            {
                txtDescription.Text = txtCodeDP.Text;
                txtCode.Text        = cBra.braCodeDP;
            }
            else if (e.Parameter.Split('|')[0] == "Save")
            {
                cBra.braName        = txtBrands.Text;
                cBra.braDescription = txtDescription.Text;
                cBra.braCode        = txtCode.Text;
                cBra.braImage       = Session["imgBrandsURL"].ToString();
                cBra.braEdited      = true;

                if (spPriceP.Text != "")
                {
                    cBra.braPercent = int.Parse(spPriceP.Text);
                }
                else
                {
                    cBra.braPercent = 0;
                }

                db.SubmitChanges();
            }
        }
Exemplo n.º 26
0
        protected void popupDocUpload_OnWindowCallback(object source, PopupWindowCallbackArgs e)
        {
            if (e.Parameter == "upload")
            {
                string filePath = Session["pl_uploaded_file"] as string;

                AssyCatalogsUploader uploader = new AssyCatalogsUploader();

                //set username for column createdby and modifiedby
                uploader.Username = PermissionHelper.GetAuthenticatedUserName();

                //parameter
                DateTime value        = DateTime.Now;
                int      packingMonth = value.ToString("yyyyMM", System.Globalization.CultureInfo.InvariantCulture).ToInt32(0);
                int      modelId      = cmbModels.Value.ToInt32(0);

                //parse the file
                string message  = "";
                int    rowCount = uploader.Parse(filePath, packingMonth, modelId);
                if (rowCount > 0)
                {
                    lblSuccess.Text = "Successfully upload and process data " + Path.GetFileName(filePath) + ", " + rowCount + " rows inserted, " + message;
                    this.masterGrid.DataBindSafe();
                }
                else
                {
                    if (uploader.ErrorMessage.Length > 0)
                    {
                        lblSuccess.Text = uploader.ErrorMessage;
                    }
                    else
                    {
                        lblSuccess.Text = "Upload file " + Path.GetFileName(filePath) + " failed!";
                    }
                    //delete the file
                    File.Delete(filePath);
                }
            }
        }
Exemplo n.º 27
0
        protected void popSection_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            var lstBraIds = xgvBrands.GetSelectedFieldValues("braId");

            foreach (Guid braId in lstBraIds)
            {
                try
                {
                    var cBra = (from bra in db.brands where bra.braId == braId select bra).FirstOrDefault();
                    if (spPricePM.Text != "")
                    {
                        cBra.braPercent = int.Parse(spPricePM.Text);
                    }
                    else
                    {
                        cBra.braPercent = 0;
                    }
                }
                catch { }
            }

            db.SubmitChanges();
        }
Exemplo n.º 28
0
        protected void BayiEditPopup_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            string id = e.Parameter.ToString();

            if (id != "")
            {
                var list = db.S_Bayi(Convert.ToInt32(id)).ToList();
                if (list.Count > 0)
                {
                    BayiKoduTextBox.Text         = list.First().BayiKodu;
                    BayiAdiTextBox.Text          = list.First().BayiAdi;
                    BayiCariAdiTextBox.Text      = list.First().BayiCariAdi;
                    YetkiliAdiSoyadiTextBox.Text = list.First().YetkiliAdiSoyadi;
                    AdresTextBox.Text            = list.First().Adres;
                    CmbSehir.Text = list.First().SehirAdi; //cmbSehir.Value = list.First().SehirID;
                    CmbIlce.Text  = list.First().IlceAdi;  //cmbIlce.Value = list.First().IlceID;
                                                           //PostaKoduTextBox.Text =
                    EmailTextBox.Text          = list.First().Mail;
                    CepTelTextBox.Text         = list.First().Cep;
                    SabitTelTextBox.Text       = list.First().Telefon;
                    FaksTelTextBox.Text        = list.First().Faks;
                    cmbMusteriTemsilcisi.Value = list.First().MusteriTemsilcisiID.ToString();
                    cmbGrup.Text              = list.First().GrupAdi;     //cmbGrup.Value = list.First().Grup_TipID1;
                    cmbBolge.Text             = list.First().BolgeAdi;    //cmbBolge.Value = list.First().Bolge_TipID2;
                    cmbBayiTipi.Text          = list.First().BayiTipiAdi; //cmbBayiTipi.Value = list.First().BayiTipi_TipID3;
                    BayiDurumCheckBox.Checked = Convert.ToBoolean(list.First().Aktif);
                    BayiEditPopup.JSProperties["cpEmployeeID"] = list.First().ID;
                    BayiEditPopup.JSProperties["cpHeaderText"] = string.Format("Yeni Bayi Oluştur ({0} {1})", list.First().YetkiliAdiSoyadi, "");
                }
            }
            else
            {
                BayiEditPopup.JSProperties["cpEmployeeID"] = null;
                BayiEditPopup.JSProperties["cpHeaderText"] = string.Format("Yeni Bayi Oluştur ({0} {1})", "", "");
            }
        }
Exemplo n.º 29
0
        protected void popupPartSelection_WindowCallback(object source, PopupWindowCallbackArgs e)
        {
            int processId = e.Parameter.ToInt32(0);

            if (processId == 0)
            {
                return;
            }

            //store in session for further use
            Session["GWISProcessId"] = processId;

            int catModelId = Session["GWISCatalogModelId"].ToInt32(0);

            if (catModelId > 0)
            {
                ListEditItem item = cmbCatalogModel.Items.FindByValue(catModelId.ToString());
                if (item != null)
                {
                    cmbCatalogModel.SelectedItem  = item;
                    cmbCatalogModel.ClientEnabled = false;
                }
            }
            else
            {
                cmbCatalogModel.ClientEnabled = true;
            }

            if (cmbCatalogModel.Value != null)
            {
                sdsPageLookup.SelectParameters["CatalogModelId"].DefaultValue = cmbCatalogModel.Value.ToString();
                cmbPage.DataSourceID = "";
                cmbPage.DataSource   = sdsPageLookup;
                cmbPage.DataBind();
            }
        }
Exemplo n.º 30
0
 protected void PopupControlUser_WindowCallback(object source, PopupWindowCallbackArgs e)
 {
     RemoveSession(Enums.CommonSession.UserActionPopUp);
     RemoveSession(Enums.EmployeeSession.UserID);
     RemoveSession(Enums.EmployeeSession.UserModel);
 }