コード例 #1
0
 private void UpdateOrganizationLogo(int orgId)
 {
     try
     {
         string orgName      = OrganizationInfo.GetOrgLegalNameByOrgId(orgId);
         string fileName     = string.IsNullOrEmpty(orgName) ? "temp" : orgName + ".jpg"; //Server.HtmlEncode(fUpload.FileName);
         string RootPath     = ConfigurationManager.AppSettings["LogoUploadLocation"];
         string Completepath = RootPath + orgId + @"\" + fileName;                        // Server.MapPath(RootPath + orgId + @"\" + fileName);
         if (!Directory.Exists(RootPath + orgId))
         {
             Directory.CreateDirectory(RootPath + orgId);
         }
         if (System.IO.File.Exists(Completepath))
         {
             System.IO.File.Delete(Completepath);
         }
         //fUpload.SaveAs(Completepath);
         string stt = CreateThumbnail(Completepath, orgName);
         OrganizationInfo.UpdateOrganizationLogoPath(orgId, orgId + @"/" + stt);
     }
     catch (Exception ex)
     {
         new SqlLog().InsertSqlLog(0, "RegistrationFormUS.aspx UpdateOrganizationLogo", ex);
     }
 }
コード例 #2
0
    /// <summary>
    /// use to show the Delivery detail in popup
    /// </summary>
    /// <param name="DeliveryID"></param>
    public void LoadPopInfobyInvoiceId(int InvoiceID)
    {
        Invoice objInvoice = new Invoice(InvoiceID);

        lblTo.Text             = Conversion.ParseString(objInvoice.OrganizationForName);
        lblInvoiceID.Text      = Conversion.ParseString(objInvoice.InvoiceID);
        lblinvoiceDate.Text    = Conversion.ParseString(objInvoice.InvoiceDate.ToShortDateString());
        lblInvoiceAmount.Text  = objInvoice.InvoiceAmount.ToString("C");
        lblDate.Text           = Conversion.ParseString(objInvoice.DueDate.ToShortDateString());
        lblFrom.Text           = OrganizationInfo.GetOrgLegalNameByOrgId(objInvoice.Organizationid);
        lblOrganizationId.Text = objInvoice.Organizationid.ToString();

        gvInvoicesDetails.DataSource = Invoice.getInvoiceTiresInfo(objInvoice.Organizationid, Conversion.ParseString(InvoiceID));
        gvInvoicesDetails.DataBind();



        //try
        //{

        //    DataSet ds = Invoice.getDeliveryInvoices(UserOrganizationId, _deliveryIds);

        //    gvInvoicesinfo.DataSource = ds;
        //    gvInvoicesinfo.DataBind();

        //    string[] loads = objDelivery.LoadIds.Split(',');
        //    lblTotalLoads.Text = Conversion.ParseString(loads.Length);
        //    int count = 0;
        //    gvAllTire.DataSource = Loads.getTiresInfoByLoadIds(objDelivery.LoadIds, 1, 0, out count);
        //    gvAllTire.DataBind();
        //    lblLoadTireCount.Text = Conversion.ParseString(count);
        //}
        //catch (Exception ex)
        //{
        //}
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UserInfo userinfoobj = new UserInfo(LoginMemberId);

        lblRoleName.Text    = "(" + userinfoobj.RoleName + ")";
        lblSubRoleName.Text = userinfoobj.SubRoleName;

        UserInfo obj = UserInfo.GetCurrentUserInfo();

        litLoginName.Text = obj.Login;

        //lblRoleName.Text = obj.RoleName;
        //lblSubRoleName.Text = obj.SubRoleName;


        if (obj.LastLoginDate != null && obj.LastLoginDate != DateTime.MinValue)
        {
            //29 October, 2012//11:00am
            litLastLoginDate.Text = String.Format("Last Login on <b>{0}</b>at &nbsp; <b>{1}</b>", obj.LastLoginDate.ToString("dd MMMM, yyyy"), obj.LastLoginDate.ToString("hh:mm tt"));

            litLastLoginNotAvailable.Visible = false;
            litLastLoginDate.Visible         = true;
        }
        else
        {
            litLastLoginNotAvailable.Visible = true;
            litLastLoginDate.Visible         = false;
        }
        if (!IsPostBack)
        {
            lblcompanyname.Text = OrganizationInfo.GetOrgLegalNameByOrgId(UserOrganizationId);
            int stateid = OrganizationInfo.getStateId(obj.OrganizationId);
            try
            {
                DataSet ds1 = OrganizationInfo.GetStateCodeByStateId(stateid);
                litRole.Text = ds1.Tables[0].Rows[0]["StateName"].ToString();
            }
            catch { }
            DataTable dt = OrganizationInfo.GetLogoPath(obj.OrganizationId);

            if (dt != null && dt.Rows.Count > 0)
            {
                string str = ConfigurationManager.AppSettings["LogoUploadLocation"] + dt.Rows[0]["vchLogoPath"].ToString();
                if (string.IsNullOrEmpty(dt.Rows[0]["vchLogoPath"].ToString()))
                {
                    imgLogo.Visible        = false;
                    imgLogoDefault.Visible = true;
                }
                else
                {
                    imgLogo.Visible        = true;
                    imgLogoDefault.Visible = false;
                    str = str.Replace("//", "/");
                    imgLogo.ImageUrl = str;
                }


                //  litRole.Text = dt.Rows[0]["StateName"].ToString();// +" " + dt.Rows[0]["RoleName"].ToString();
            }
            else
            {
                imgLogo.Visible        = false;
                imgLogoDefault.Visible = true;
            }
            DataSet ds    = Notifications.getAllNotifications(UserInfo.GetCurrentUserInfo().UserId, UserOrganizationId, false, true, 100000, 1);
            int     count = ds.Tables[0].Rows.Count;
            if (count == 0)
            {
                lblnotficationcount.Text = "";
            }
            else
            {
                lblnotficationcount.Text = count.ToString();
            }
            BasePage objBase = new BasePage();

            ds = UserInfo.GetAllActiveLanguages();

            DataRow dr = ds.Tables[0].Select("LanguageId =" + objBase.LanguageId)[0];
            //litLangauge.Text = Convert.ToString(dr["CountryName"]);
            img.Src = "/images/" + Convert.ToString(dr["Flag"]);
            lvmessagesmain.DataSource = Notifications.getAllNotifications(UserInfo.GetCurrentUserInfo().UserId, UserOrganizationId, false, true, 10, 1);
            lvmessagesmain.DataBind();
        }
    }