Ejemplo n.º 1
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="uploadZipInfoId"></param>
    private void SetUploadedFileDetail(Int32 uploadZipInfoId)
    {
        var masterDal       = new MasterDAL();
        var eUploadZipInfos = masterDal.GetListUploadedFiles("", "", "", "", 0, "", uploadZipInfoId, 2)[0];

        string  filename = eUploadZipInfos.FileName.Substring(eUploadZipInfos.FileName.LastIndexOf("\\") + 1, eUploadZipInfos.FileName.Length - eUploadZipInfos.FileName.LastIndexOf("\\") - 1);
        Decimal filesize = (Convert.ToDecimal(eUploadZipInfos.FileSize) / (1024 * 1024));

        filesize = Decimal.Round(filesize, 2);

        spfilename.InnerHtml      = HttpUtility.HtmlEncode(filename) + " </br> (" + HttpUtility.HtmlEncode(filesize) + " MB)";
        speventdetail.InnerHtml   = HttpUtility.HtmlEncode(eUploadZipInfos.Event.Host.Name) + ", " + HttpUtility.HtmlEncode(eUploadZipInfos.Event.Host.Address.Address1) + ", " + HttpUtility.HtmlEncode(eUploadZipInfos.Event.Host.Address.City) + ", " + HttpUtility.HtmlEncode(eUploadZipInfos.Event.Host.Address.State) + ", " + HttpUtility.HtmlEncode(eUploadZipInfos.Event.Host.Address.Zip);
        speventdate.InnerHtml     = Convert.ToDateTime(eUploadZipInfos.Event.EventDate).ToShortDateString();
        spuploaddate.InnerHtml    = Convert.ToDateTime(eUploadZipInfos.UploadStartTime).ToShortDateString();
        spuploadtime.InnerHtml    = Convert.ToDateTime(eUploadZipInfos.UploadStartTime).ToShortTimeString();
        spcustomertotal.InnerHtml = eUploadZipInfos.TotalCount.ToString();

        string firstname  = eUploadZipInfos.UploadedBy.FranchiseeUser.User.FirstName;
        string middlename = eUploadZipInfos.UploadedBy.FranchiseeUser.User.MiddleName;
        string lastname   = eUploadZipInfos.UploadedBy.FranchiseeUser.User.LastName;

        sptechname.InnerText = firstname + (middlename.Length > 0 ? " " + middlename + " " : " ") + lastname;

        if (eUploadZipInfos.TotalCount > 0)
        {
            spsuccesspercentage.InnerHtml = Decimal.Round(Convert.ToDecimal(((Decimal)(eUploadZipInfos.TotalCount - eUploadZipInfos.FailureCount) / eUploadZipInfos.TotalCount) * 100), 2).ToString();
            spfailedpercentage.InnerHtml  = Decimal.Round(Convert.ToDecimal(((Decimal)eUploadZipInfos.FailureCount / eUploadZipInfos.TotalCount) * 100), 2).ToString();
        }

        ReadFromTextFiles(eUploadZipInfos.LogFilePath);
    }
Ejemplo n.º 2
0
    /// <summary>
    /// this method is used for adding new and updating the information regarding the SecurityQuestion which is
    /// called on clicking save button.
    /// </summary>
    private void UpdateSecurityQuestion()
    {
        MasterDAL masterDal        = new MasterDAL();
        var       securityquestion = new ESecurityQuestion();

        securityquestion.Description = txtDescription.Text;
        securityquestion.Name        = txtName.Text;

        securityquestion.Active = true;
        Int64 returnresult;

        if (hfSecurityQuestionID.Value.ToString().Equals(""))
        {
            returnresult = masterDal.SaveSecurityQuestion(securityquestion, Convert.ToInt32(EOperationMode.Insert));
            if (returnresult == 0)
            {
                returnresult = 9999990;
            }
            //service.AddSecurityQuestion(securityquestion, usershellmodulerole1, out returnresult, out temp);
        }
        else
        {
            securityquestion.SecurityQuestionID = Convert.ToInt32(((DataTable)(ViewState["DSGRID"])).Rows[grdSecurityQuestion.Rows[Convert.ToInt32(hfSecurityQuestionID.Value)].DataItemIndex]["SecurityQuestionID"]);
            returnresult = masterDal.SaveSecurityQuestion(securityquestion, Convert.ToInt32(EOperationMode.Update));
            if (returnresult == 0)
            {
                returnresult = 9999991;
            }

            //service.UpdateSecurityQuestion(securityquestion, usershellmodulerole1, out returnresult, out temp);
        }
        errordiv.InnerHtml         = (String)GetGlobalResourceObject("Resource", "msgDatabaseResult" + returnresult.ToString());
        hfSecurityQuestionID.Value = "";
        GetSecurityQuestion();
    }
Ejemplo n.º 3
0
        private bool GetCustomerList()
        {
            bool callResult = false;
            bool zipResult  = false;

            var organizationId = CurrentOrganizationRole.OrganizationId;

            var masterDal = new MasterDAL();
            List <ECustomers> customersOnCall = masterDal.SearchCustomersOnCall(txtFirstName.Text.Replace("'", "''"),
                                                                                txtLastName.Text.Replace("'", "''"), txtZipCode.Text, 0, txtCallBackNo.Text, txtCustomerID.Text, txtMemberId.Text, txtHicn.Text, txtPhoneNumber.Text, txtEmail.Text, organizationId, txtMbiNumber.Text);

            if (customersOnCall != null && customersOnCall.Count > 0)
            {
                callResult = true;
            }

            if (callResult == false && (txtZipCode.Text.Length > 0 || (txtCallBackNo.Text.Length > 0 && txtCallBackNo.Text != "(___)-___-____")))
            {
                customersOnCall = masterDal.SearchCustomersOnCall(txtFirstName.Text.Replace("'", "''"),
                                                                  txtLastName.Text.Replace("'", "''"), txtZipCode.Text, 1, txtCallBackNo.Text, txtCustomerID.Text, txtMemberId.Text, txtHicn.Text, txtPhoneNumber.Text, txtEmail.Text, organizationId, txtMbiNumber.Text);
                if (customersOnCall != null && customersOnCall.Count > 0)
                {
                    zipResult = true;
                }
            }

            return(callResult || zipResult);
        }
Ejemplo n.º 4
0
    private void GetPriority()
    {
        ETaskPriorityType[] priority = null;
        var masterDal = new MasterDAL();
        //Mode '3' used for getting all Active TaskPriorityTypes
        var listTaskPriorityType = masterDal.GetTaskPriorityType(string.Empty, 3);

        if (listTaskPriorityType != null)
        {
            priority = listTaskPriorityType.ToArray();
        }

        if (priority != null && priority.Length > 0)
        {
            for (int count = 0; count < priority.Length; count++)
            {
                ddlPriority.Items.Add(new ListItem(priority[count].Name.ToString(), priority[count].TaskPriorityTypeID.ToString()));
            }
            if (ddlPriority.Items.FindByText("Medium") != null)
            {
                ddlPriority.SelectedIndex = -1;
                ddlPriority.Items.FindByText("Medium").Selected = true;
            }
        }
    }
Ejemplo n.º 5
0
        /// <summary>
        /// 初始化密码
        /// </summary>
        /// <returns></returns>
        public bool UpdatePassWrod(string StrPass)
        {
            byte[]    pass = Encrypt(StrPass);
            MasterDAL dal  = new MasterDAL(connectionString);

            return(dal.UpdatePassWord(_masterid, pass));
        }
Ejemplo n.º 6
0
    private void UpdateItem()
    {
        var objitem = new EItem
        {
            ItemCode         = txtItemCode.Text,
            SKUCode          = txtSKUCode.Text,
            ManufacturerName = txtManfName.Text,
            ManufacturerID   = txtManfID.Text,
            InventoryItemID  = Convert.ToInt32(ddlInventory.SelectedItem.Value),
            Notes            = txtNote.Text
        };

        long addinvitem = 0;

        divErrorMsg.Visible = true;
        var masterDal = new MasterDAL();

        if (hfItemID.Value.Equals(""))
        {
            addinvitem            = masterDal.SaveItem(objitem, Convert.ToInt32(EOperationMode.Insert));
            divErrorMsg.InnerText = addinvitem == 999998 ? "Item code already exits." : "Item has been added successfully.";
        }
        else
        {
            objitem.ItemID = Convert.ToInt32(grdItem.DataKeys[Convert.ToInt32(hfItemID.Value)].Value);

            addinvitem = masterDal.SaveItem(objitem, Convert.ToInt32(EOperationMode.Update));

            divErrorMsg.InnerText = addinvitem == 0 ? "Item has been updated successfully." : "Item has been not updated due to internal error";
        }

        hfItemID.Value = "";
        GetAllItems();
    }
Ejemplo n.º 7
0
    private void GetAllActiveInventory()
    {
        var masterDal         = new MasterDAL();
        var listInventoryItem = masterDal.GetInventoryItem(string.Empty, 3);

        EInventoryItem[] invitemobject = null;

        if (listInventoryItem != null)
        {
            invitemobject = listInventoryItem.ToArray();
        }

        if (invitemobject.Length > 0)
        {
            ddlInventory.Items.Add(new ListItem("Select Inventory Name", "0"));

            for (int count = 0; count < invitemobject.Length; count++)
            {
                if (IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.CheckRole((long)Roles.FranchiseeAdmin) && invitemobject[count].ItemType.TestAssociated)
                {
                    continue;
                }

                ddlInventory.Items.Add(new ListItem(invitemobject[count].Name, invitemobject[count].InventoryItemID.ToString()));
            }
        }
    }
Ejemplo n.º 8
0
    protected void ibtnGo_Click(object sender, ImageClickEventArgs e)
    {
        var masterDal = new MasterDAL();
        //TODO:(Sandeep) Page Out of Use. Need Check with Bidhan
        List <EEvent> eevent = null; // txtSearchevent.Text.Length > 0 ? masterDal.SearchEventDetails(0, txtSearchevent.Text, "", "", "", "", "", 3) : masterDal.SearchEventDetails(0, string.Empty, "", "", "", "", "", 3);

        DataTable dtEvent = new DataTable();

        dtEvent.Columns.Add("EventID");
        dtEvent.Columns.Add("EventName");
        dtEvent.Columns.Add("Date");
        dtEvent.Columns.Add("Zip");
        if (eevent.Count > 0)
        {
            for (int icount = 0; icount < eevent.Count; icount++)
            {
                dtEvent.Rows.Add(new object[] { eevent[icount].EventID, eevent[icount].Name, eevent[icount].EventDate, eevent[0].Host.Address.ZipID.ToString() });
            }
            grdEventDetails.DataSource = dtEvent;
            grdEventDetails.DataBind();
        }
        else
        {
            ClientScript.RegisterStartupScript(typeof(string), "sfjscode", "alert('no records found');", true);
        }
    }
Ejemplo n.º 9
0
        /// <summary>
        /// 更新用户信息
        /// </summary>
        public bool Update()
        {
            MasterDAL dal = new MasterDAL(connectionString);

            return(dal.Update(_masterid, _mastername, _truename, _sex, _birthday, _deptid, _position, _position_desc,
                              _office_phone, _mobile, _home_phone, _email, _ruzhitime));
        }
Ejemplo n.º 10
0
        public ContentResult Delete(long eventId)
        {
            var   masterDal    = new MasterDAL();
            short returnresult = masterDal.RemoveEvent(eventId); // Need to replace with Repository method

            return(Content(returnresult.ToString()));
        }
Ejemplo n.º 11
0
    /// <summary>
    ///
    /// </summary>
    private void GetCustomerListfromDB()
    {
        Int16  pagenumber, pagesize;
        int    eventid;
        string eventtext, eventdatefrom, eventdateto;

        pagenumber = Convert.ToInt16(ViewState["PageNumber"]);
        pagesize   = Convert.ToInt16(ViewState["PageSize"]);
        eventid    = Convert.ToInt32(ViewState["EventID"]);

        eventtext     = ViewState["EventText"].ToString();
        eventdatefrom = ViewState["EventDateFrom"].ToString();
        eventdateto   = ViewState["EventDateTo"].ToString();

        var           masterDal = new MasterDAL();
        List <EEvent> arrevents = null;

        int itotalrecords = 0;

        if (chkNoImages.Checked)
        {
            arrevents = masterDal.GetEventsMissingRecordDetail(2, pagenumber, pagesize, eventid, eventtext, eventdatefrom, eventdateto, out itotalrecords);
        }
        else if (chkNoResults.Checked)
        {
            arrevents = masterDal.GetEventsMissingRecordDetail(0, pagenumber, pagesize, eventid, eventtext, eventdatefrom, eventdateto, out itotalrecords);
        }
        else if (chkParResults.Checked)
        {
            arrevents = masterDal.GetEventsMissingRecordDetail(1, pagenumber, pagesize, eventid, eventtext, eventdatefrom, eventdateto, out itotalrecords);
        }

        ViewState["TotalRecords"] = itotalrecords;
        LoadGridCustomers(arrevents);
    }
Ejemplo n.º 12
0
    public String GetCcRepInstruction(long eventId)
    {
        var masterDal           = new MasterDAL();
        var strCcRepInstruction = masterDal.getCCRepInstructionForEvent(eventId);

        return(strCcRepInstruction);
    }
Ejemplo n.º 13
0
    public string[] GetMatchingCityByStateName(string prefixText, int count, string contextKey)
    {
        List <string> items = new List <string>();

        var objDAL = new MasterDAL();

        try
        {
            if (!string.IsNullOrEmpty(contextKey))
            {
                foreach (DataRow dr in objDAL.GetCityOnStateName(contextKey, prefixText).Tables[0].Rows)
                {
                    items.Add(dr["Name"].ToString());
                }
            }
            else
            {
                foreach (ECity dr in objDAL.GetCity(prefixText, 2))
                {
                    items.Add(dr.Name);
                }
            }
        }
        catch (Exception ex)
        {
            items.Add(ex.Message);
        }

        return(items.ToArray());
    }
Ejemplo n.º 14
0
    public List <string> GetMatchingMarketingOffers(string prefixText)
    {
        MasterDAL masterDal = new MasterDAL();
        int       icount    = 0;

        return(masterDal.GetMarketingOfferPaged(prefixText, 2, 1, 50, out icount).Select <EMarketingOffer, string>(marketingOffer => marketingOffer.MarketingOffer + " [" + marketingOffer.MarketingOfferID + "]").ToList <string>());
    }
Ejemplo n.º 15
0
    public List <EPaymentDetail> GetCustomerEventPaymentDetail(long eventCustomerId)
    {
        var masterDal = new MasterDAL();
        List <EPaymentDetail> arrpaymentdet = masterDal.GetPaymentDetailsforEventCustomerList(eventCustomerId);

        return(arrpaymentdet);
    }
Ejemplo n.º 16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string strFileName   = Request.QueryString["FileName"];
        string strEventId    = Request.QueryString["EventID"];
        string strSourceCode = Request.QueryString["SourceCode"];
        string serverName    = ConfigurationManager.AppSettings["MMPAth"];
        string strContent    = getContent(serverName + strFileName);

        ////////////TO UPDATE THE SMART TAGS
        strContent = strContent.Replace("[SourceCode]", strSourceCode);
        var masterDal = new MasterDAL();
        //EventService.EEvent[] objEvent = objEventService.GetEvent("235", "1");
        Int64 eventid;

        Int64.TryParse(strEventId, out eventid);
        List <EEvent> objEvent   = masterDal.SearchFreeEventDetails(eventid, "", string.Empty, string.Empty, "", "", "", 0, 1);
        string        strAddress = objEvent[0].Host.Address.Address1 + "<br />" + HttpUtility.HtmlEncode(objEvent[0].Host.Address.City) + "," + HttpUtility.HtmlEncode(objEvent[0].Host.Address.State) + " " + HttpUtility.HtmlEncode(objEvent[0].Host.Address.Zip);

        strContent = strContent.Replace("[EventVenue]", strAddress);
        strContent = strContent.Replace("[HostName]", HttpUtility.HtmlEncode(objEvent[0].Host.Name));
        strContent = strContent.Replace("[EventDate]", Convert.ToDateTime(objEvent[0].EventDate).ToString("MM/dd/yyyy"));
        //////////////

        dvPrintAd.InnerHtml = System.Web.Security.AntiXss.AntiXssEncoder.HtmlEncode(strContent, true);
    }
Ejemplo n.º 17
0
    /// <summary>
    /// this method is used for activating the selected City(s).
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnActivate_Click(object sender, ImageClickEventArgs e)
    {
        Int64 returnresult;

        //HealthYes.Web.UI.CityService.ECity[] Cities = GetSelectedCity();
        //CityService service = new CityService();

        string strSelectedCityIDs = GetSelectedCityIDs();

        //if (Cities.Length > 0)
        if (strSelectedCityIDs.Length > 0)
        {
            //service.ActivateCity(Cities, "1", "1", "1", out returnresult, out temp);

            MasterDAL masterDAL = new MasterDAL();
            returnresult = masterDAL.SaveCity(strSelectedCityIDs, Convert.ToInt32(EOperationMode.Activate));
            if (returnresult == 0)
            {
                returnresult = 9999994;
            }

            errordiv.InnerHtml = (String)GetGlobalResourceObject("Resource", "msgDatabaseResult" + returnresult.ToString());
            hfCityID.Value     = "";
            if (Request.QueryString["searchtext"] != null)
            {
                SearchCity(Request.QueryString["searchtext"].ToString());
            }
            else
            {
                GetCity();
            }
            //GetCity();
        }
    }
Ejemplo n.º 18
0
        private void GetDropDownInfo()
        {
            var masterDal  = new MasterDAL();
            var objcountry = masterDal.GetCountry(string.Empty, 3).ToArray();

            string strCountryId = objcountry[0].CountryID.ToString();

            ViewState["CountryID"] = objcountry[0].CountryID.ToString();
            CountryId = ViewState["CountryID"].ToString();

            var objstate = masterDal.GetState(string.Empty, 3);

            ddlphystate.Items.Clear();
            ddlphystate.Items.Add(new ListItem("Select State", "0"));

            ddlphyMaillingstate.Items.Clear();
            ddlphyMaillingstate.Items.Add(new ListItem("Select State", "0"));

            for (int icount = 0; icount < objstate.Count; icount++)
            {
                if (objstate[icount].Country.CountryID.ToString().Equals(strCountryId))
                {
                    ddlphystate.Items.Add(new ListItem(objstate[icount].Name, objstate[icount].StateID.ToString()));
                    ddlphyMaillingstate.Items.Add(new ListItem(objstate[icount].Name, objstate[icount].StateID.ToString()));
                }
            }
        }
Ejemplo n.º 19
0
        public void LoadFromID(string masterid)
        {
            MasterDAL dal   = new MasterDAL(connectionString);
            Master    model = dal.GetMasterByMasterid(masterid);

            if (model != null)
            {
                _id            = model.Id;
                _masterid      = model.MasterId;
                _mastername    = model.MasterName;
                _mobile        = model.Mobile;
                _office_phone  = model.Office_phone;
                _password      = model.Password;
                _position      = model.Position;
                _position_desc = model.Position_Desc;
                _ruzhitime     = model.RuzhiTime;
                _sex           = model.Sex;
                _truename      = model.TrueName;
                _birthday      = model.Birthday;
                _createdate    = model.CreateDate;
                _createid      = model.CreateId;
                _createname    = model.CreateName;
                _deptid        = model.DeptId;
                _email         = model.Email;
                _home_phone    = model.Home_Phone;
                _lizhitime     = model.LizhiTime;
            }
        }
        private void GetCcRepInstruction(long eventId)
        {
            var masterDal           = new MasterDAL();
            var strCcRepInstruction = masterDal.getCCRepInstructionForEvent(eventId);

            _txtCallCenterNotes.Text = strCcRepInstruction;
        }
Ejemplo n.º 21
0
    private void GetStatus()
    {
        ETaskStatusType[] status = null;

        var masterDal = new MasterDAL();
        // Mode '3' used here for getting All Active Status Type
        var listTaskStatusType = masterDal.GetTaskStatusType(string.Empty, 3);

        if (listTaskStatusType != null)
        {
            status = listTaskStatusType.ToArray();
        }

        if (status != null && status.Length > 0)
        {
            for (int count = 0; count < status.Length; count++)
            {
                ddlStatus.Items.Add(new ListItem(status[count].Name, status[count].TaskStatusTypeID.ToString()));
            }
            if (ddlStatus.Items.FindByText("In Progress") != null)
            {
                ddlStatus.SelectedIndex = -1;
                ddlStatus.Items.FindByText("In Progress").Selected = true;
            }
        }
    }
Ejemplo n.º 22
0
    /// <summary>
    /// this method is used for activating the selected country(s).
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnActivate_Click(object sender, ImageClickEventArgs e)
    {
        Int64 returnresult;

        ///HealthYes.Web.UI.CountryService.ECountry[] Countries = GetSelectedCountry();

        ECountry[] Countries = GetSelectedCountry();
        ///CountryService service = new CountryService();

        if (Countries.Length > 0)
        {
            ///service.ActivateCountry(Countries, "1", "1", "1", out returnresult, out temp);
            StringBuilder strCountryID = new StringBuilder(String.Empty);
            foreach (ECountry oCountry in Countries)
            {
                strCountryID.Append("," + oCountry.CountryID.ToString());
            }
            strCountryID.Remove(0, 1);
            MasterDAL masterDAL = new MasterDAL();
            returnresult = masterDAL.SaveCountry(strCountryID.ToString(), Convert.ToInt32(EOperationMode.Activate));
            if (returnresult == 0)
            {
                returnresult = 9999994;
            }
            divErrorMsg.Visible   = true;
            divErrorMsg.InnerHtml = (String)GetGlobalResourceObject("Resource", "msgDatabaseResult" + returnresult.ToString());
            hfCountryID.Value     = "";
            GetCountry();
        }
    }
Ejemplo n.º 23
0
    /// <summary>
    /// this method is used for adding new and updating the information regarding the country which is
    /// called on clicking save button.
    /// </summary>
    private void UpdateCountry()
    {
        MasterDAL masterDAL = new MasterDAL();
        ECountry  country   = new ECountry();


        country.Description = txtDescription.Text;
        country.Name        = txtName.Text;
        country.CountryCode = txtCountryCode.Text.ToUpper();
        country.Active      = true;
        Int64 returnresult;

        if (hfCountryID.Value.ToString().Equals(""))
        {
            returnresult = masterDAL.SaveCountry(country, Convert.ToInt32(EOperationMode.Insert));
            if (returnresult == 0)
            {
                returnresult = 9999990;
            }
        }
        else
        {
            country.CountryID = Convert.ToInt32(((DataTable)(ViewState["DSGRID"])).Rows[grdCountry.Rows[Convert.ToInt32(hfCountryID.Value)].DataItemIndex]["CountryID"]);

            returnresult = masterDAL.SaveCountry(country, Convert.ToInt32(EOperationMode.Update));
            if (returnresult == 0)
            {
                returnresult = 9999991;
            }
        }
        divErrorMsg.Visible   = true;
        divErrorMsg.InnerHtml = (String)GetGlobalResourceObject("Resource", "msgDatabaseResult" + returnresult.ToString());
        hfCountryID.Value     = "";
        GetCountry();
    }
Ejemplo n.º 24
0
    public string[] GetAllFutureEvents_nonSSL(string prefixText, int count, string contextKey)
    {
        //GetEmployeeForFranchisor
        List <string> items     = new List <string>();
        var           masterDal = new MasterDAL();
        List <EEvent> objEvent  = masterDal.GetFranchiseeEvent(3, Convert.ToInt32(contextKey), prefixText);

        try
        {
            string eventname;
            string eventid = string.Empty;


            foreach (EEvent eevent in objEvent)
            {
                eventname = eevent.Name + "[" + "ID:" + eevent.EventID.ToString() + "]";
                items.Add(eventname);
            }
        }
        catch (Exception ex)
        {
            items.Add(ex.Message);
        }

        return(items.ToArray());
    }
Ejemplo n.º 25
0
    private void UpdateItemType()
    {
        var inventoryitem = new EInventoryItem();

        inventoryitem.Name        = txtName.Text;
        inventoryitem.Description = txtDescription.Text;

        inventoryitem.ItemType = new EItemType
        {
            ItemTypeID = Convert.ToInt32(rbtlstconsumable.SelectedItem.Value)
        };

        if (rbtlstconsumable.SelectedItem.Text.IndexOf("TestsAssociated") > -1)
        {
            inventoryitem.Test = new List <ETest>();

            //itemlen = 0;
            for (int icount = 0; icount < chklsttestassociated.Items.Count; icount++)
            {
                if (chklsttestassociated.Items[icount].Selected == true)
                {
                    var test = new ETest();
                    test.TestID = Convert.ToInt32(chklsttestassociated.Items[icount].Value);
                    inventoryitem.Test.Add(test);
                }
            }
        }

        long addinvitem = 0;
        var  masterDal  = new MasterDAL();

        if (hfItemTypeID.Value.ToString().Equals(""))
        {
            addinvitem            = masterDal.SaveInventoryItem(inventoryitem, Convert.ToInt32(EOperationMode.Insert));
            divErrorMsg.Visible   = true;
            divErrorMsg.InnerHtml = addinvitem == 0
                                       ? "Item has been added successfully."
                                       : "Item has not been added due to internal error.";
        }
        else
        {
            inventoryitem.InventoryItemID = Convert.ToInt32(grdItemType.DataKeys[Convert.ToInt32(hfItemTypeID.Value)].Value);

            addinvitem = masterDal.SaveInventoryItem(inventoryitem, Convert.ToInt32(EOperationMode.Update));
            if (addinvitem == 0)
            {
                addinvitem = 9999991;
            }

            divErrorMsg.Visible   = true;
            divErrorMsg.InnerText = addinvitem == 0
                                      ? "Item has been updated successfully."
                                      : "Item has not been updated due to internal error.";
        }


        hfItemTypeID.Value = "";
        GetInventoryItem();
    }
        public int CreateMyAccountSignup(EndUserDetails eu)
        {
            int       status = -1;
            MasterDAL dal    = new MasterDAL();

            dal.CreateMyAccountSignup(eu);
            return(status);
        }
        public string GetUIDGenerated(string LoginId_UserName)
        {
            string    UIDGenerated = null;
            MasterDAL dal          = new MasterDAL();

            UIDGenerated = dal.GetUIDGenerated(LoginId_UserName);
            return(UIDGenerated);
        }
Ejemplo n.º 28
0
        /// <summary>
        /// 添加用户
        /// </summary>
        /// <returns>返回新用户的ID</returns>
        public int Add()
        {
            MasterDAL dal = new MasterDAL(connectionString);

            _id = dal.AddMaster(_masterid, _mastername, _password, _truename, _sex, _birthday, _deptid, _position,
                                _position_desc, _office_phone, _mobile, _home_phone, _email, _createid, _createname, _createdate, _ruzhitime);
            return(_id);
        }
        public DataSet FillDropdownsViaXMLs(string whichxml)
        {
            DataSet   ds  = new DataSet();
            MasterDAL dal = new MasterDAL();

            ds = dal.FillDropdownsViaXMLs(whichxml);
            return(ds);
        }
Ejemplo n.º 30
0
    void SearchTemplateForFranchise(string filterstring, long franchiseeid)
    {
        var masterDal = new MasterDAL();
        List <EScheduleTemplate> objscheduletemplate = masterDal.GetEventScheduleTemplate(filterstring, franchiseeid, 3);

        if (objscheduletemplate != null && objscheduletemplate.Count > 0)
        {
            DataTable tbltemp = new DataTable();
            tbltemp.Columns.Add("TemplateName");
            tbltemp.Columns.Add("Dateadded", typeof(DateTime));
            tbltemp.Columns.Add("Status");
            tbltemp.Columns.Add("TemplateID");
            tbltemp.Columns.Add("Global");
            tbltemp.Columns.Add("IsGlobal", typeof(bool));

            for (int count = 0; count < objscheduletemplate.Count; count++)
            {
                string global = "";

                if (objscheduletemplate[count].Global)
                {
                    global = "True";
                }
                else
                {
                    global = "False";
                }

                if (objscheduletemplate[count].IsActive == true)
                {
                    tbltemp.Rows.Add(new object[] { objscheduletemplate[count].Name, Convert.ToDateTime(objscheduletemplate[count].DateCreated), "Active", objscheduletemplate[count].ScheduleTemplateID, global, objscheduletemplate[count].Global });
                }
                else
                {
                    tbltemp.Rows.Add(new object[] { objscheduletemplate[count].Name, Convert.ToDateTime(objscheduletemplate[count].DateCreated), "InActive", objscheduletemplate[count].ScheduleTemplateID, global, objscheduletemplate[count].Global });
                }
            }

            if ((SortDirection)ViewState["SortTemplate"] == SortDirection.Descending)
            {
                tbltemp.DefaultView.Sort = ViewState["SortExp"].ToString() + " desc";
            }
            else
            {
                tbltemp.DefaultView.Sort = ViewState["SortExp"].ToString() + " asc";
            }
            tbltemp             = tbltemp.DefaultView.ToTable();
            ViewState["DSGRID"] = tbltemp;

            dgviewtemplates.DataSource = tbltemp;
            dgviewtemplates.DataBind();
        }
        else
        {
            divErrorMsg.InnerText = "No Record found";
            divErrorMsg.Visible   = true;
        }
    }