//For getting Denom Value
        public List <DenomValueResult> GetDenomValue(string Stock_No)
        {
            ISingleResult <DenomValueResult> result = linqDB.GetDenomValue(Stock_No);


            return(result.ToList <DenomValueResult>());
        }
Exemple #2
0
       public Hashtable GetSiteDetails()
       {
           Hashtable _SiteDetails = new Hashtable();
           try
           {
               Logger.Debug("Refreshing Site details:GetSiteDetails");
               ISingleResult<rsp_EventTransmitter_GetSiteDetailsResult> ResultSet = _ExchangeContext.rsp_EventTransmitter_GetSiteDetails();
              
               foreach (rsp_EventTransmitter_GetSiteDetailsResult oInst in ResultSet)
               {
                   _SiteDetails.Add("Area", oInst.sub_company_area_name);
                   _SiteDetails.Add("Company", oInst.Company_name);
                   _SiteDetails.Add("District", oInst.sub_company_District_Name);
                   _SiteDetails.Add("Region", oInst.Sub_Company_Region_Name);
                   _SiteDetails.Add("Sub_Company", oInst.sub_company_Name);
               }

           }
           catch (Exception Ex)
           {
               Logger.Error("DataAdapter", "GetSiteDetails()", Ex);
               _SiteDetails.Clear();
               _SiteDetails.Add("Area", string.Empty);
               _SiteDetails.Add("Company", string.Empty);
               _SiteDetails.Add("District", string.Empty);
               _SiteDetails.Add("Region", string.Empty);
               _SiteDetails.Add("Sub_Company", string.Empty);
           }
           return _SiteDetails;
       }
        private void SetMedications(RichTextBoxEx report)
        {
            ISingleResult <selectPrescriptionforPrintResult> result = doAction.selectPrescriptionforPrint("Ongoing", thisPatientID, dateTimePicker1.Value);

            foreach (selectPrescriptionforPrintResult r in result)
            {
                Console.WriteLine("0");
                report.SelectionBullet = false;
                report.SelectionIndent = 60;
                Console.WriteLine(r.MedicationName);
                report.SelectionFont = new Font("Bahnschrift Bold", 14);
                report.SelectedText  = r.MedicationName + "\n";

                report.SelectionBullet = true;
                report.SelectionIndent = 90;
                report.SelectionFont   = new Font("Bahnschrift Light", 14);
                report.SelectedText    = "     Strength: " + r.Strength + "\n";
                report.SelectionFont   = new Font("Bahnschrift Light", 14);
                report.SelectedText    = "     Frequency: " + r.Frequency + "\n";
                report.SelectionFont   = new Font("Bahnschrift Light", 14);
                report.SelectedText    = "     Route: " + r.Route + "\n";
                report.SelectionFont   = new Font("Bahnschrift Light", 14);
                report.SelectedText    = "     Refills: " + r.Refills + "\n";
                report.SelectionFont   = new Font("Bahnschrift Light", 14);


                report.SelectionBullet = false;
                report.SelectedText    = "\n\n";
            }
        }
        private void calendar1_ItemDoubleClick(object sender, CalendarItemEventArgs e)
        {
            selectedAppointmentID = e.Item.AppointmentID;
            for (int i = Application.OpenForms.Count - 1; i >= 0; i--)
            {
                if (Application.OpenForms[i].Name != "ProviderMain" && Application.OpenForms[i].Name != "WelcomeHomePage")
                {
                    Application.OpenForms[i].Close();
                }
            }

            if (Application.OpenForms["PatientHomePage"] as PatientHomePage == null)
            {
                ISingleResult <getPatientByIDResult> result = doAction.getPatientByID(e.Item.PatientID);
                foreach (getPatientByIDResult r in result)
                {
                    string          name            = r.FirstName + " " + r.LastName;
                    PatientHomePage patientHomePage = new PatientHomePage(name, r.PhoneNumber, r.Gender,
                                                                          r.MaritalStatus, r.Age, r.DOB, e.Item.PatientID, this.providerMain, this, e.Item)
                    {
                        MdiParent = providerMain
                    };
                    patientHomePage.Show();
                }
            }
        }
        public GameCapResult UpdateGameCapDetails(int GameCappingID, string UserName)
        {
            GameCapResult rsltGameCapResult = null;
            ISingleResult <usp_UpdateGameCapDetailsResult> result = null;

            try
            {
                result = _DAGameCapping.UpdateGameCapDetails(0, GameCappingID, "", UserName);

                rsltGameCapResult = (from o in result
                                     select new GameCapResult()
                {
                    Message = o.Message,
                    ReserveGameAsset = o.ReserveGameAsset,
                    MaxCapNotExceeded = o.MaxCapNotExceeded,
                    SelfReserve = o.SelfReserve,
                    AllowReserve = o.AllowReserve,
                    TimeOption = o.TimeOption,
                    AutoRelease = o.AutoRelease,
                    ExpireMinstoAlert = o.ExpireMinstoAlert
                }).First();
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(rsltGameCapResult);
        }
Exemple #6
0
        //=====================================

        // PerformanceIndicatorForm: unassigned Performance Indicator select
        public static List <PerformanceIndicator.Extend> UnassignedPerformanceIndicatorList(Guid PIFID, Guid GCAItemID)
        {
            LinqMicajahDataContext dc = new LinqMicajahDataContext();
            Guid?refGCAId             = null;

            if (GCAItemID != Guid.Empty)
            {
                refGCAId = GCAItemID;
            }
            ISingleResult <Sp_SelectUnassignedPerformanceIndicatorResult> result = dc.Sp_SelectUnassignedPerformanceIndicator(LinqMicajahDataContext.InstanceId, PIFID, refGCAId);
            List <PerformanceIndicator.Extend> lPI = new List <PerformanceIndicator.Extend>();

            foreach (Sp_SelectUnassignedPerformanceIndicatorResult i in result)
            {
                PerformanceIndicator.Extend pi = new PerformanceIndicator.Extend();
                pi.InstanceId             = i.InstanceId == null ? Guid.Empty : (Guid)i.InstanceId;
                pi.PerformanceIndicatorID = i.PerformanceIndicatorID == null ? Guid.Empty : (Guid)i.PerformanceIndicatorID;
                pi.Name                  = i.Name.TrimEnd();
                pi.Description           = i.Description;
                pi.Code                  = i.Code;
                pi.GroupCategoryAspectID = i.GroupCategoryAspectID;
                pi.Status                = i.Status;
                pi.Created               = (DateTime)i.Created;
                pi.Updated               = i.Updated;
                pi.SectorID              = i.SectorID;
                pi.Help                  = i.Help;
                pi.RequirementID         = i.RequirementID;
                pi.SectorName            = i.Sector;
                pi.RequirementName       = i.Requirement;
                pi.GCAName               = i.GCA;
                lPI.Add(pi);
            }
            return(lPI);
        }
Exemple #7
0
    public ISingleResult <res> CursorProc()
    {
        IExecuteResult      objresult  = this.ExecuteMethodCall(this, ((MethodInfo)(MethodBase.GetCurrentMethod())));
        ISingleResult <res> objresults = (ISingleResult <res>)objresult.ReturnValue;

        return(objresults);
    }
Exemple #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.IsAuthenticated)
            {
                int opponentId = Convert.ToInt32(Request.QueryString["opponentId"]);
                RadDatePicker1.MinDate = DateTime.Now.AddDays(1);

                if (!IsPostBack)
                {
                    if (!StoredData.User.TempDivision.Value || !StoredData.User.AccessExpired.Value)
                    {
                        using (FlexibleTennisLeagueDataContext dataContext = new FlexibleTennisLeagueDataContext())
                        {
                            ISingleResult <SelectUserPublicProfileResult> users = dataContext.SelectUserPublicProfile(opponentId);
                            SelectUserPublicProfileResult user = users.First();
                            opponentLabel.Text = user.FirstName + " " + user.LastName;

                            List <TennisCourt> tennisCourts = dataContext.SelectTennisCourtsByEmailId(StoredData.User.EmailId).ToList();
                            locationDropDownList.DataSource     = tennisCourts;
                            locationDropDownList.DataTextField  = "CourtName";
                            locationDropDownList.DataValueField = "CourtId";
                            locationDropDownList.DataBind();

                            locationDropDownList.SelectedValue = StoredData.User.HomeCourt.ToString();
                            ViewState["UserCourtName"]         = locationDropDownList.SelectedItem.Text;
                        }
                    }
                }
            }
        }
Exemple #9
0
        public static void GetService(Request request, ReplyNode result, ErrorNode error)
        {
            if (request.ParameterSet.ContainsKey("serviceid"))
            {
                int    serviceid  = request.ParameterSet.GetInt("serviceid");
                string resultcode = null;

                using (LegionLinqDataContext db = new LegionLinqDataContext(request.Service.Settings["LegionConnectionString"])) {
                    ISingleResult <xspGetServiceResult> results = db.xspGetService(serviceid, ref resultcode);

                    foreach (xspGetServiceResult service in results)
                    {
                        result.AddElement("assemblyname", service.AssemblyName);
                        result.AddElement("classname", service.ClassName);
                        result.AddElement("consumeriprange", service.ConsumerIPRange);
                        result.AddElement("description", service.Description);
                        result.AddElement("servicekey", service.ServiceKey);
                        result.AddElement("logged", (service.IsLogged ? "true" : "false"));
                        result.AddElement("public", (service.IsPublic ? "true" : "false"));
                        result.AddElement("restricted", (service.IsRestricted ? "true" : "false"));
                    }

                    result.AddElement("resultcode", resultcode);
                }
            }
            else
            {
                error.Text = "No service specified.";
            }
        }
Exemple #10
0
        private void Form5_Load(object sender, EventArgs e)
        {
            dc = new CompanyDBDataContext();
            ISingleResult <Employee_SelectResult> tab = dc.Employee_Select("Department Of IT"); // u will automaqtically get the results into the tab

            dataGridView1.DataSource = tab;
        }
Exemple #11
0
        public List <HeroesGuildMemberInfo> GetMembers(int guildSN)
        {
            List <HeroesGuildMemberInfo> list = new List <HeroesGuildMemberInfo>();

            try
            {
                HeroesGuildDBDataContext heroesGuildDBDataContext = new HeroesGuildDBDataContext();
                int num = 0;
                for (int i = 1; i <= 10; i++)
                {
                    int?num2 = new int?(0);
                    int?num3 = new int?(0);
                    ISingleResult <GuildAllMemberGetListResult> singleResult = heroesGuildDBDataContext.GuildAllMemberGetList(new int?(GuildAPI.ServerCode), new int?(guildSN), new int?(i), new byte?(byte.MaxValue), new byte?(1), ref num2, ref num3);
                    foreach (GuildAllMemberGetListResult guildAllMemberGetListResult in singleResult)
                    {
                        list.Add(new HeroesGuildMemberInfo(guildAllMemberGetListResult.CharacterName, (long)guildAllMemberGetListResult.CharacterSN, (HeroesGuildUserType)guildAllMemberGetListResult.emGroupUserType, guildAllMemberGetListResult.GuildSN, guildAllMemberGetListResult.Intro, guildAllMemberGetListResult.NameInGroup, guildAllMemberGetListResult.NexonSN));
                    }
                    if (list.Count >= num3 || num == list.Count)
                    {
                        break;
                    }
                    num = list.Count;
                }
            }
            catch (Exception ex)
            {
                Log <HeroesGuildAPI> .Logger.Error("Error in GetMembers(int guildSN)", ex);
            }
            return(list);
        }
Exemple #12
0
        /// <summary>
        /// Контроль создания платежа
        /// </summary>
        public void Read()
        {
            WriteLog("Read", true);

            using (Gorod db = new Gorod(Properties.Settings.Default.GorodConnectionString))
            {
                ISingleResult <ReadResult> result = db.Read(Template_tid.ToString(), Session["vru_session_id"].ToInt(), Tid, ref ErrCode, ref ErrDesc);

                if (ErrCode != 0)
                {
                    Status = 1;
                }
                else
                {
                    Status = 0;
                }
                if (Status == 0)
                {
                    foreach (ReadResult para in result)
                    {
                        GorodFields.Add(para.Name, para.Value);
                    }
                }
            }

            WriteLog("Read", false);
        }
    /// <summary>
    /// Загрузка дочерних узлов дерева групп изделий
    /// </summary>
    /// <param name="parentID">Идентификатор родительского узла</param>
    /// <param name="productType">Тип изделий (1 - Продукция ,2 - Внутреннее изделие ,3 - Покупное изделие)</param>
    private void LoadChildrenTreeNodes(TreeNode tnParent, int parentID, int productType)
    {
        MainDataClassesDataContext dataContext          = new MainDataClassesDataContext();
        ISingleResult <ogk_SelectArticleGroupsResult> a = dataContext.ogk_SelectArticleGroups(parentID, productType);
        List <ogk_SelectArticleGroupsResult>          b = a.ToList();
        string productTypeName = "";

        switch (productType)
        {
        case 1:
            productTypeName = "SELL";
            break;

        case 2:
            productTypeName = "MAKE";
            break;

        case 3:
            productTypeName = "BUY";
            break;
        }
        for (int i = 0; i < b.Count; i++)
        {
            TreeNode tn = new TreeNode();
            tn.NavigateUrl = "javascript:AddNodeContent('" + productTypeName + "','" + b.ElementAt(i).ID.ToString() + "')";
            tn.Value       = b.ElementAt(i).ID.ToString();
            tn.Text        = b.ElementAt(i).NAME;
            tn.ToolTip     = b.ElementAt(i).NAME;
            tnParent.ChildNodes.Add(tn);
            LoadChildrenTreeNodes(tn, Convert.ToInt32(tn.Value), productType);
        }
    }
        private void Login_Click(object sender, EventArgs e)
        {
            if (doAction.authenticateProvider(UsernameBox.Text, PassCodeBox.Text) == 0)
            {
                this.Hide();

                ISingleResult <getProviderInfoResult> result = doAction.getProviderInfo(UsernameBox.Text);

                foreach (getProviderInfoResult r in result)
                {
                    thisProviderFirstName = r.FirstName;
                    thisProviderLastName  = r.LastName;
                    thisProviderID        = r.USERNAME;
                    thisProviderTitle     = r.Title;
                }

                string ProviderFullName = thisProviderFirstName + " " + thisProviderLastName + " " + thisProviderTitle;

                ProviderMain providerName = new ProviderMain(ProviderFullName, thisProviderID);

                providerName.Show();
            }
            else
            {
                MessageBox.Show("Please Check Your Username and Password");
            }
        }
Exemple #15
0
        private void Form5_Load(object sender, EventArgs e)
        {
            TestDBDataContext dc = new TestDBDataContext();
            ISingleResult <GetEmployeesResult> tab = dc.GetEmployees("Godzilla");

            dataGridView1.DataSource = tab;
        }
        private void SetMedications(RichTextBoxEx report)
        {
            ISingleResult <selectMedicationForReportResult> result = doAction.selectMedicationForReport("Ongoing", thisPatientID);

            foreach (selectMedicationForReportResult r in result)
            {
                report.SelectionBullet = false;
                report.SelectionIndent = 60;
                Console.WriteLine(r.MedicationName);
                report.SelectionFont = new Font("Bahnschrift Bold", 12);
                report.SelectedText  = r.MedicationName + "\n";

                report.SelectionBullet = true;
                report.SelectionIndent = 90;
                report.SelectionFont   = new Font("Bahnschrift Light", 12);
                report.SelectedText    = "     Strength: " + r.Strength + "\n";
                report.SelectionFont   = new Font("Bahnschrift Light", 12);
                report.SelectedText    = "     Frequency: " + r.Frequency + "\n";
                report.SelectionFont   = new Font("Bahnschrift Light", 12);
                report.SelectedText    = "     Route: " + r.Route + "\n";
                report.SelectionFont   = new Font("Bahnschrift Light", 12);
                report.SelectedText    = "     Refills: " + r.Refills.ToString() + "\n";
                report.SelectionFont   = new Font("Bahnschrift Light", 12);


                report.SelectionBullet = false;
                report.SelectedText    = "\n\n";


                //report.SelectionIndent = 5;
            }
        }
        public GameCapResult ValidateGameCapDetails(int InstallationNo)
        {
            GameCapResult rsltGameCapResult = null;
            ISingleResult <rsp_ValidateGameCapInformationResult> result = null;

            try
            {
                result = _DAGameCapping.ValidateGameCapInformation(InstallationNo, String.Empty, true);

                rsltGameCapResult = (from o in result
                                     select new GameCapResult()
                {
                    Message = o.Message,
                    ReserveGameAsset = o.ReserveGameAsset,
                    MaxCapNotExceeded = o.MaxCapNotExceeded,
                    SelfReserve = o.SelfReserve,
                    AllowReserve = o.AllowReserve,
                    TimeOption = o.TimeOption,
                    AutoRelease = o.AutoRelease,
                    ExpireMinstoAlert = o.ExpireMinstoAlert
                }).First();
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(rsltGameCapResult);
        }
Exemple #18
0
    /// <summary>
    /// Проверяет существует ли изделие с указанным чертежом/ГОСТ
    /// </summary>
    /// <param name="drawing">Искомый чертеж/ГОСТ</param>
    private bool drawingIsNotExist(string IDparameter, string drawing, string productName)
    {
        //Если название чертежа пустое - конец проверки
        if (drawing == "")
        {
            return(true);
        }
        MainDataClassesDataContext context = new MainDataClassesDataContext();
        ISingleResult <ogk_DrawingAndNameCheckUpEditResult> a = context.ogk_DrawingAndNameCheckUpEdit(drawing, Convert.ToInt32(IDparameter), productName);
        List <ogk_DrawingAndNameCheckUpEditResult>          b = a.ToList();
        //Количество изделий с таким же именем и чертежом
        int numberOfProducts = b.Count();

        if (numberOfProducts > 0)
        {
            //Изделие с таким же чертежом/ГОСТ уже существует - ошибка
            productNameMessage.Visible = true;
            drawingMessage.Visible     = true;
            ShowErrorMessage("*,** Изделие с заданными именем и чертежом(ГОСТ) уже существует");
            return(false);
        }
        else
        {
            //Изделие с таким же чертежом/ГОСТ не существует - все ОК
            return(true);
        }
    }
Exemple #19
0
        private void Form5_Load(object sender, EventArgs e)
        {
            CompanyDBDataContext dc = new LinqToSqlProject.CompanyDBDataContext();
            ISingleResult <Employee_SelectResult> tab = dc.Employee_Select("Sales"); //tab is a table returns ISingleResult.  In paramemter, specify department name

            dataGridView1.DataSource = tab;                                          //
        }
Exemple #20
0
        public List <EnableDisableMachine> GetActiveMachine()
        {
            List <EnableDisableMachine> lstReturnValue         = null;
            ISingleResult <rsp_GetActiveMachinesResult> result = null;

            try
            {
                result = _oEnableDisableDA.GetActiveMachines();

                lstReturnValue = (from obj in result
                                  select new EnableDisableMachine
                {
                    StockNo = obj.StockNo,
                    BarPosNumber = obj.BarPosNumber,
                    IsSelected = true
                }
                                  ).ToList();
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(lstReturnValue);
        }
        public List <AGSdetails> GetAGSDetails()
        {
            List <AGSdetails> lstAGSDetails            = null;
            ISingleResult <GetAGSdetailsResult> result = null;

            try
            {
                result = _UpdateGMUNo.GetAGSdetails();

                lstAGSDetails = (from obj in result
                                 select new AGSdetails()
                {
                    AssetNo = obj.AssetNo,
                    BarPositionNo = obj.BarPositionNo,
                    ActualAssetNo = obj.ActualAssetNo,
                    GMUNo = obj.GMUNo,
                    Installation_No = obj.Installation_No,
                    SerialNo = obj.SerialNo,
                    MachineID = obj.MachineID.Value,
                    EditSave = "Edit",
                    IsEnabled = false,
                    IsFilterEnabled = false
                }).ToList();
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(lstAGSDetails);
        }
Exemple #22
0
        public void GetIndividual(string username, out string FirstName, out string MiddleName, out string LastName, out DateTime DOB, out bool Gender, out string ProfilePic, out string CoverPic)
        {
            ISingleResult <getIndividualResult> result1 = Data.getIndividual(username);
            ISingleResult <getUserResult>       result2 = Data.getUser(username);

            if (result1 != null && result2 != null)
            {
                getIndividualResult i = result1.First();
                getUserResult       u = result2.First();
                FirstName  = i.firstName;
                MiddleName = i.midName;
                LastName   = i.lastName;
                DOB        = i.DOB;
                Gender     = i.gender;
                ProfilePic = u.profilePicture;
                CoverPic   = u.coverPicture;
            }
            else
            {
                FirstName  = "";
                MiddleName = "";
                LastName   = "";
                DOB        = DateTime.MinValue;
                Gender     = false;
                ProfilePic = "";
                CoverPic   = "";
            }
        }
Exemple #23
0
        public static void GetServiceMethods(Request request, ReplyNode result, ErrorNode error)
        {
            int serviceId;

            if (Int32.TryParse(request.ParameterSet["serviceId"], out serviceId))
            {
                using (LegionLinqDataContext db = new LegionLinqDataContext(request.Service.Settings["LegionConnectionString"])) {
                    ISingleResult <xspGetServiceMethodsResult> results = db.xspGetServiceMethods(serviceId);
                    XmlElement methods = result.AddElement("methods");

                    XmlElement method;
                    foreach (xspGetServiceMethodsResult r in results)
                    {
                        method = result.AddElement(methods, "method");
                        result.AddElement(method, "id", r.MethodId.ToString());
                        result.AddElement(method, "serviceid", r.ServiceId.ToString());
                        result.AddElement(method, "key", r.MethodKey);
                        result.AddElement(method, "name", r.MethodName);
                        result.AddElement(method, "cachedresultlifetime", r.CachedResultLifetime.ToString());
                        result.AddElement(method, "cacheresult", (r.IsResultCacheable ? "true" : "false"));
                        result.AddElement(method, "restricted", (r.IsRestricted ? "true" : "false"));
                        result.AddElement(method, "public", (r.IsPublic ? "true" : "false"));
                        result.AddElement(method, "logged", (r.IsLogged ? "true" : "false"));
                    }
                }
            }
        }
Exemple #24
0
        public void GetOrganization(string username, out string Name, out string Description, out string Type, out string Phone, out string Website, out string ProfilePic, out string CoverPic)
        {
            ISingleResult <getOrganizationResult> result1 = Data.getOrganization(username);
            ISingleResult <getUserResult>         result2 = Data.getUser(username);

            if (result1 != null && result2 != null)
            {
                getOrganizationResult o = result1.First();
                getUserResult         u = result2.First();
                Name        = o.name;
                Description = o.description;
                Type        = o.type;
                Phone       = o.phone;
                Website     = o.website;
                ProfilePic  = u.profilePicture;
                CoverPic    = u.coverPicture;
            }
            else
            {
                Name        = "";
                Description = "";
                Type        = "";
                Phone       = "";
                Website     = "";
                ProfilePic  = "";
                CoverPic    = "";
            }
        }
Exemple #25
0
    /// <summary>
    /// Проверяет существует ли изделие с указанным чертежом/ГОСТ
    /// </summary>
    /// <param name="drawing">Искомый чертеж/ГОСТ</param>
    private bool productIsNotExist(string drawing, string productName)
    {
        //Если название чертежа пустое - конец проверки
        if (drawing == "")
        {
            return(true);
        }
        MainDataClassesDataContext context = new MainDataClassesDataContext();
        ISingleResult <ogk_DrawingAndNameCheckUpCreateResult> a = context.ogk_DrawingAndNameCheckUpCreate(drawing, productName);
        List <ogk_DrawingAndNameCheckUpCreateResult>          b = a.ToList();
        int articlesWithThisDrawing = b.Count;

        if (articlesWithThisDrawing > 0)
        {
            //Изделие с таким же чертежом/ГОСТ уже существует - ошибка
            productNameMessage.Visible = true;
            drawingMessage.Visible     = true;
            ShowErrorMessage("*,** Изделие с заданными именем и чертежом(ГОСТ) уже существует");
            return(false);
        }
        else
        {
            //Изделие с таким же чертежом/ГОСТ не существует - все ОК
            return(true);
        }
    }
        //function to view menu items from databse for cake --> Sania Jain
        public void CookieSelected(object sender, RoutedEventArgs e)
        {
            ofosDataContext dc     = new ofosDataContext();
            CheckBox        chkBox = (CheckBox)sender;

            if (chkBox.IsChecked == true)
            {
                cookieListBox.IsEnabled = true;
                selectedCategory.Add(chkBox);

                var Cookies = new List <ItemPriceClass>();

                ISingleResult <FoodItem_FetchResult> Cookieresults = dc.FoodItem_Fetch(chkBox.Content.ToString());
                foreach (FoodItem_FetchResult res in Cookieresults)
                {
                    Console.WriteLine(res);
                    Cookies.Add(new ItemPriceClass {
                        ItemName = res.FoodItemName, ItemPrice = (decimal)res.FoodItemPrice
                    });
                    cookieListBox.ItemsSource = Cookies;
                }
            }
            else
            {
                selectedCategory.Remove(chkBox);
                cookieListBox.IsEnabled = false;
            }
            enableCart();
        }
Exemple #27
0
        public List <UnExportedData> ReadUnExportedData(string sExport_Type)
        {
            List <UnExportedData> rsltUnExportedData            = null;
            ISingleResult <rsp_ReadUnExportedDataResult> result = null;

            try
            {
                result = _ExportDetailDataAccess.ReadUnExportedData(sExport_Type);

                rsltUnExportedData = (from o in result
                                      select new UnExportedData()
                {
                    ID = o.ID,
                    Date = o.Date,
                    ExportType = o.ExportType,
                    Reference = o.Reference,
                    Status = o.Status,
                    IsSelected = false
                }).ToList();
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(rsltUnExportedData);
        }
        public List <AssetNumberResult> GetAssetNumber(int installation_No)
        {
            ISingleResult <AssetNumberResult> result = linqDB.GetAssetNumber(installation_No);


            return(result.ToList <AssetNumberResult>());
        }
        public List <GameCapDetails> GetGameCapDetails()
        {
            List <GameCapDetails> rsltGameCapDetails           = null;
            ISingleResult <rsp_GetGameCapDetailsResult> result = null;

            try
            {
                result = _DAGameCapping.GetGameCapDetails();

                rsltGameCapDetails = (from o in result
                                      select new GameCapDetails()
                {
                    GameCappingID = o.GameCappingID,
                    InstallationNo = o.InstallationNo,
                    Position = o.Position,
                    ReservedBy = o.ReservedBy,
                    ReservedFor = o.ReservedFor,
                    SessionStartTime = o.SessionStartTime,
                    ElapsedSec = o.ElapsedSec,
                    AlertCame = o.AlertCame,
                    AlertUnCapSec = o.AlertUnCapSec,
                    IsEnabled = true,
                    Status = string.Empty
                }).ToList();
            }
            catch (Exception Ex)
            {
                ExceptionManager.Publish(Ex);
            }

            return(rsltGameCapDetails);
        }
Exemple #30
0
        private ISingleResultDto <EntityDto> SingleResultDto(ISingleResult <Card> result)
        {
            var resultDto = new SingleResultDto <EntityDto>(result);

            resultDto.SetData(result, Mapper);
            return(resultDto);
        }
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     try
     {
         int voidtype = 1;
         lstPromotionalVoid = objprom.BGetPromoVoidDetails(voidtype, NoOfRecordsInPage);
         dgVoidGridView.DataContext = lstPromotionalVoid as ISingleResult<PromotionalClassVoidDetails>;
         if (lstPromotionalVoid == null) return;
     }
     catch (Exception ex)
     {
         ExceptionManager.Publish(ex);
     }
 }
        public CashDeskManagerAllDetails(ISingleResult<rsp_CDM_GetCashierTransactionsDetails_New> lstTickets, DateTime startDate, DateTime endDate, string FooterText,
            bool? chkCashDeskTicketIn, bool? chkCashDeskTicketOut, bool? chkHandpays, bool? chkShortPays, bool? chkVoidVouchers, bool? chkjackpot, bool? chkProghandpays, bool? chkVoidTransactions,
            bool? chkTicketIn, bool? chkTicketOut, bool? chkActive, bool? chkVoidCancel, bool? chkExpired, bool? chkException,
            bool? chkLiability, bool? chkPromo, bool? chkNCTicketIn, bool? chkNCTicketOut, int userNo, int RouteNo)
        {
            try
            {

                InitializeComponent();


                lstCashierTransactionsDetails = lstTickets.ToList();
                this.DataContext = lstCashierTransactionsDetails;
                this.StartDate = startDate;
                this.EndDate = endDate;
                this.sFooterText = FooterText;

                this.chkCashDeskTicketIn = chkCashDeskTicketIn;
                this.chkCashDeskTicketOut = chkCashDeskTicketOut;
                this.chkHandpays = chkHandpays;
                this.chkShortPays = chkShortPays;
                this.chkVoidVouchers = chkVoidVouchers;
                this.chkjackpot = chkjackpot;
                this.chkProghandpays = chkProghandpays;
                this.chkVoidTransactions = chkVoidTransactions;
                this.chkTicketIn = chkTicketIn;
                this.chkTicketOut = chkTicketOut;
                this.chkActive = chkActive;
                this.chkVoidCancel = chkVoidCancel;
                this.chkExpired = chkExpired;
                this.chkException = chkException;
                this.chkLiability = chkLiability;
                this.chkPromo = chkPromo;
                this.chkNCTicketIn = chkNCTicketIn;
                this.chkNCTicketOut = chkNCTicketOut;
                this.user = userNo;
                this.iRoute_No = RouteNo;

                objCashDeskManager = CashDeskManagerBusinessObject.CreateInstance();
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
            }
        }
        private void btnVoid_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (dgVoidGridView.Items.Count > 0)
                {
                    int TicketId = (dgVoidGridView.SelectedItem as PromotionalClassVoidDetails).PromotionalID;
                    if (MessageBox.ShowBox("MessageID436", BMC_Icon.Question, BMC_Button.YesNo) == System.Windows.Forms.DialogResult.No)
                        return;
                    try
                    {
                        int result = objprom.BVoidStatusUpdate(TicketId, System.Environment.MachineName, Security.SecurityHelper.CurrentUser.User_No);
                        MessageBox.ShowBox("MessageID414", BMC_Icon.Information);
                        /* audit*/
                        string VoidEXdate = ((PromotionalClassVoidDetails)dgVoidGridView.SelectedItem).dtExpire.ToString();
                        string VoidPromationNumber = ((PromotionalClassVoidDetails)dgVoidGridView.SelectedItem).PromotionalID.ToString();
                        string voidNumberofTickets = ((PromotionalClassVoidDetails)dgVoidGridView.SelectedItem).TotalTickets.ToString();
                        string voidAmount = ((PromotionalClassVoidDetails)dgVoidGridView.SelectedItem).TotalTicketAmount.ToString();
                        string voiddate = DateTime.Now.ToString();
                        string promationalName = ((PromotionalClassVoidDetails)dgVoidGridView.SelectedItem).PromotionalName.ToString();
                        //Refresh the grid
                        int voidtype = 1;
                        dgVoidGridView.DataContext = null;
                        lstPromotionalVoid = objprom.BGetPromoVoidDetails(voidtype, NoOfRecordsInPage);
                        dgVoidGridView.DataContext = lstPromotionalVoid as ISingleResult<PromotionalClassVoidDetails>;
                        PromoVoidAudit(VoidPromationNumber, voidNumberofTickets, voidAmount, VoidEXdate, promationalName, voiddate);
                        if (lstPromotionalVoid == null) return;
                    }
                    catch (Exception ex)
                    {
                        LogManager.WriteLog("Promotional Void : " + ex.Message, LogManager.enumLogLevel.Error);
                    }

                }
            }


            catch (Exception ex)
            {
                LogManager.WriteLog("Promotional Void : " + ex.Message, LogManager.enumLogLevel.Error);
            }
        }
        private static FLMRequiredExtensionsType BuildFlmRequiredExtention(X509Certificate2 x509Certificate2, ISingleResult<flm_GetFacilityInfoResult> facilityInfoCollection, ArrayList secureDeviceArray)
        {
            FLMRequiredExtensionsType flmRequiredExtention = new FLMRequiredExtensionsType();

            flm_GetFacilityInfoResult facilityInfo = facilityInfoCollection.First();

            #region Build the FacilityInfo element
            flmRequiredExtention.FacilityInfo = new FLMRequiredExtensionsTypeFacilityInfo();
            flmRequiredExtention.FacilityInfo.FacilityID = "urn:x-facilityID:" + facilityInfo.URI_Mapping + ":" + facilityInfo.Site_Code.ToString();
            flmRequiredExtention.FacilityInfo.AnnotationText = new UserTextType();
            flmRequiredExtention.FacilityInfo.AnnotationText.language = "en-us";
            flmRequiredExtention.FacilityInfo.AnnotationText.Value = "FLM for site " + facilityInfo.Site_Name;
            flmRequiredExtention.FacilityInfo.FacilityName = new UserTextType();
            flmRequiredExtention.FacilityInfo.FacilityName.Value = facilityInfo.Site_Name;

            #endregion

            #region Build the SecureDeviceList element
            flmRequiredExtention.SecurityDeviceList = new SecurityDeviceListType();

            ArrayList secureDeviceCombinedTypeArray = new ArrayList();

            flm_GetFacilitySecureEquipmentResult currentDevice = null;
            X509Certificate2 deviceCertificate = null;
            ArrayList versionInformation = null;
            foreach (flm_GetFacilitySecureEquipmentResult secureDevice in secureDeviceArray)
            {
                if ((null != currentDevice) && (currentDevice.Equipment_Id == secureDevice.Equipment_Id)) // It still the same device (get next version element)
                {
                    AddInfoType(versionInformation, secureDevice);
                    currentDevice = secureDevice;
                    continue;
                }
                else // the next device in the list
                {
                    #region Add the last completed device to the array
                    if ((null != currentDevice) && (null != deviceCertificate))
                    {
                        CombinedType securityDevice = BuildSecurityDeviceCombinedType(currentDevice, versionInformation, deviceCertificate);
                        secureDeviceCombinedTypeArray.Add(securityDevice);
                    }
                    #endregion

                    currentDevice = null;
                    deviceCertificate = null;
                    versionInformation = null;

                    #region Get the serial number of the next device. Skip this device if we cannot get the serial number
                    if ((null == secureDevice.Serial_Number) || (secureDevice.Serial_Number.Length < 1))
                    {
                        continue;
                    }
                    #endregion

                    #region Get the certificate of the next device. Skip this device if we cannot get the certificate
                    string deviceCertificateChainString = secureDevice.Cert_String;
                    if (null == deviceCertificateChainString)
                    {
                        continue;
                    }

                    int certificateCount = X509Certificate_ClassLibrary.X509CertificateClassLibrary.GetBeginCertificateCount(deviceCertificateChainString);
                    if (certificateCount < 1)
                    {
                        continue;
                    }

                    string deviceCertificateString = X509Certificate_ClassLibrary.X509CertificateClassLibrary.GetBeginCertificate(0, deviceCertificateChainString);
                    if (null == deviceCertificateString)
                    {
                        continue;
                    }

                    deviceCertificate = X509Certificate_ClassLibrary.X509CertificateClassLibrary.BuildCertificate(deviceCertificateString);
                    if (null == deviceCertificate)
                    {
                        currentDevice = null;
                        continue;
                    }
                    #endregion

                    currentDevice = secureDevice;
                    versionInformation = new ArrayList();

                    AddInfoType(versionInformation, secureDevice);
                }
            }
            #endregion

            #region Add the Secure Device List to the Required Extention
            flmRequiredExtention.SecurityDeviceList.Items = new CombinedType[secureDeviceCombinedTypeArray.Count];
            int index = 0;
            foreach (CombinedType device in secureDeviceCombinedTypeArray)
            {
                flmRequiredExtention.SecurityDeviceList.Items[index] = device;
                index++;
            }
            #endregion

            return flmRequiredExtention;
        }